Adding and deleting JavaServer Pages to a free-form project
You can add or delete JavaServer Pages (JSP) to or from a free-form
project.
Restriction:You
can use the rapid deployment tools for packaging applications at J2EE 1.3
or 1.4 specification-levels. However, the rapid deployment tools do not support
Java EE 5.0 nor J2EE 1.2 specification-level.
Steps
To add a JSP file to a free-form project, use your file management
system to properly place your JSP artifacts into the free-form project. The
directory name of the free-form project has the same string value you had
provided for the -project parameter used in the wrd-config
command.
The following activities occur when you drop a JSP into the free-form
project:
The JSP is mapped to the Web Content folder in the Web module
project. The console output can look like this example when adding a JSP source
file (called MyJSP.jsp) to a free-form project (called MyProject):
[08:15:23 PM] [/MyProject/MyJSP.jsp] Added
[08:15:23 PM] [/MyProject/MyJSP.jsp] coppied to project [MyProject]
[08:15:23 PM] JSP entry added to web.xml: MyJSP
[08:15:23 PM] Servlet mapping added. URL is: [MyProjectWeb/MyJSP]
Tip: If you want to monitor the rapid
deployment activity, run your rapid deployment session with console output.
You can complete this by running the rapid deployment launch tool as follows:
wrd.bat
-monitor
wrd.sh
-monitor
A new servlet entry and servlet mapping entry is created in
the Web deployment descriptor (found in the WebContent\WEB-INF\web.xml file
in the Web module project). The following is an example of the entries in
web.xml:
You can test the JSP running on the server, use the URL displayed
in the console. In this example, the console output provided the following
URL mapping information to the deployed JSP:
[08:15:23 PM] Servlet mapping added. URL is: [MyProjectWeb/MyJSP]
Type http://<machine_name>:<port>/MyProjectWeb/MyJSP in
the address bar and press Enter. Where <machine_name>
is the host machine where WebSphere® Application Server runs. By default, WebSphere Application
Server runs on port 9080.
To delete JSP files from a free-form project, use your file management
system to properly remove your JSP artifacts from the free-form project. The
directory name of the free-form project has the same string value you had
provided for the -project parameter used in the wrd-config
command.
The following activities occur when you remove a JSP from the free-form
project:
The console output can look like this example when removing
a JSP source file (called MyJSP.jsp) from a free-form project (called MyProject):
[08:19:40 PM] [/MyProject/MyJSP.jsp] Deleted
[08:19:40 PM] Servlet Mapping removed from web.xml /MyJSP
[08:19:40 PM] JSP entry removed from web.xml MyJSP