Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,26 @@ PhotoAlbum/wwwroot/uploads/*
*.log

# Maven
target/

# Package files (except lib directory dependencies)
**/target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

# Package files
*.war
*.ear
*.zip
*.tar.gz
*.rar

# JAR files (but keep lib/ directory JARs for Ant project)
# JAR files (Maven will manage dependencies)
*.jar
!lib/*.jar

# IDE
.idea/
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ A simple photo gallery web application built with pure Servlet/JSP and H2 in-mem

## Prerequisites

- Java 8+
- Apache Ant 1.9+
- Java 11+
- Apache Maven 3.6+
- Application Server: Tomcat 8.5+ / GlassFish 7 / WebSphere Liberty 25.x

## Quick Start

### 1. Build

```bash
ant war
mvn clean package
```

### 2. Deploy (choose one)

**GlassFish:**
```bash
cp dist/photo-album.war $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy/
cp target/photo-album.war $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy/
$GLASSFISH_HOME/bin/asadmin start-domain
# Access: http://localhost:8080/photo-album/
```

**WebSphere Liberty:**
```bash
cp dist/photo-album.war $WLP_HOME/usr/servers/defaultServer/dropins/
cp target/photo-album.war $WLP_HOME/usr/servers/defaultServer/dropins/
$WLP_HOME/bin/server run defaultServer
# Access: http://localhost:9080/photo-album/
```

**Tomcat:**
```bash
cp dist/photo-album.war $CATALINA_HOME/webapps/
cp target/photo-album.war $CATALINA_HOME/webapps/
$CATALINA_HOME/bin/catalina.sh run
# Access: http://localhost:8080/photo-album/
```
Expand All @@ -61,4 +61,4 @@ $CATALINA_HOME/bin/catalina.sh stop
- Jakarta Servlet 6.0 / JSP 3.1 / JSTL 3.0
- Pure JDBC (no ORM)
- H2 2.2.224 in-memory database (auto-initialized)
- Apache Ant 1.9+ build
- Apache Maven 3.6+ build
138 changes: 0 additions & 138 deletions build.xml

This file was deleted.

34 changes: 34 additions & 0 deletions jar-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# JAR Files Analysis

This document tracks the analysis of all JAR files in the project and their availability in Maven Central Repository.

## JAR Files Status

- [x] **commons-fileupload-1.5.jar** - Exists in Maven central repository
- GroupId: commons-fileupload
- ArtifactId: commons-fileupload
- Version: 1.5
- Added to pom.xml

- [x] **commons-io-2.11.0.jar** - Exists in Maven central repository
- GroupId: commons-io
- ArtifactId: commons-io
- Version: 2.11.0
- Added to pom.xml

- [x] **h2-2.2.224.jar** - Exists in Maven central repository
- GroupId: com.h2database
- ArtifactId: h2
- Version: 2.2.224
- Added to pom.xml

- [x] **jakarta.servlet-api-6.0.0.jar** - Exists in Maven central repository
- GroupId: jakarta.servlet
- ArtifactId: jakarta.servlet-api
- Version: 6.0.0
- Scope: provided (provided by servlet container)
- Added to pom.xml

## Summary

All 4 JAR files are available in Maven Central Repository and have been added to pom.xml as Maven dependencies. No system-scoped dependencies are required.
Binary file removed lib/commons-fileupload-1.5.jar
Binary file not shown.
Binary file removed lib/commons-io-2.11.0.jar
Binary file not shown.
Binary file removed lib/h2-2.2.224.jar
Binary file not shown.
Binary file removed lib/jakarta.servlet-api-6.0.0.jar
Binary file not shown.
79 changes: 79 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.photoalbum</groupId>
<artifactId>photo-album</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>

<name>Photo Album Application</name>
<description>A simple photo gallery application using Servlet/JSP</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
<!-- Jakarta Servlet API (provided by container) -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>

<!-- Apache Commons FileUpload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.5</version>
</dependency>

<!-- Apache Commons IO -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>

<!-- H2 Database -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
</dependency>
</dependencies>

<build>
<finalName>photo-album</finalName>
<plugins>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<!-- Maven WAR Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.