Setting up a basic Web application, step by step
IN PROGRESS
Tim Howe
vsync@quadium.net
Table of Contents
- 1 Introduction
- 2 Set up project
- 3 Wrap in EAR
- 4 XML-RPC
- 5 Connect to database
- 6 Spring MVC
- 7 Viewing and facade
1 Introduction
2 Set up project
2.1 Structure
- build.xml
- build.properties.template
- doc/
-
src/
-
WEB-INF/
- web.xml
- geronimo-web.xml
-
WEB-INF/
2.2 Create build.properties
- Geronimo settings
- javadoc.use (yes/no)
2.3 Descriptors
2.3.1 web.xml
2.3.1.1 servlet
2.3.1.2 servlet mappings
2.3.2 geronimo-web.xml
2.3.2.1 module ID
2.3.2.2 context root
2.4 Servlet
2.4.1 extend HttpServlet
2.4.2 override doGet(HttpServletRequest, HttpServletResponse)
2.5 Deploy
2.5.1 ant deploy
2.5.2 ant undeploy
2.5.3 ant redeploy
3 Wrap in EAR
3.1 Structure
-
src/
-
META-INF/
- application.xml
- geronimo-application.xml
-
META-INF/
3.2 Update build.xml
3.3 Descriptors
3.3.1 application.xml
3.3.1.1 modules
3.3.2 geronimo-application.xml
3.3.2.1 module ID
3.4 Deploy
3.4.1 undeploy WAR version
3.4.2 ant deploy
4 XML-RPC
4.1 Structure
-
src/
-
com/
-
example/
-
hello/
-
rpc/
- HelloServer.java
-
server/
- RPCServlet.java
- HelloServerEngine.java
-
test/
- HelloTestClient.java
-
rpc/
-
hello/
-
example/
-
com/
4.2 build script
4.2.1 Update build.xml
4.2.2 Update build.properties.template
4.2.3 Update build.properties
4.3 code
4.3.1 interface definition
4.3.1.1 HelloServer
4.3.2 server code
4.3.2.1 RPCServlet
4.3.2.2 HelloServerEngine
4.3.3 client code
4.3.3.1 HelloTestClient
4.4 Deploy
4.5 test
5 Connect to database
5.1 Structure
-
sql/
- hello-schema.sql
- hello-data.sql
-
src/
-
META-INF/
- persistence.xml
-
com/
-
example/
-
hello/
-
dao/
- HelloManager.java
-
jpa/
- JpaHelloManager.java
-
model/
- Hello.java
-
dao/
-
hello/
-
example/
-
META-INF/
5.2 build script
5.2.1 Update build.xml
5.2.2 Update build.properties.template
5.2.3 Update build.properties
5.3 code
5.3.1 data model
5.3.2 data access
5.3.3 changes to servers
6 Spring MVC
6.1 Structure
-
jsp/
- index.jspx
-
hello/
- index.jspx
-
src/
-
WEB-INF/
- Hello-servlet.xml
-
com/
-
example/
-
hello/
-
site/
- HelloController.java
-
site/
-
hello/
-
example/
-
WEB-INF/
6.2 build script
6.2.1 Update build.xml
6.2.2 Update build.properties.template
6.2.3 Update build.properties
6.3 descriptors
6.3.1 Hello-servlet.xml
6.4 code
6.4.1 HelloController
7 Viewing and facade
7.1 Structure
-
jsp/
-
hello/
- view.jspx
-
hello/
-
src/
-
com/
-
example/
-
hello/
- Hello.java
-
service/
- HelloEngine.java
- ResourceNotFoundException.java
-
hello/
-
example/
-
com/
