blob: 119404257997e0b37e8dca92f79e4bf9205cff7a [file] [log] [blame]
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../../../../../default_style.css" type="text/css">
<link rel="stylesheet" href="../../../../../webtools/wtp.css" type="text/css">
<title>Creating a Web Module</title>
</head>
<body>
<table width="100%" cellspacing="5" cellpadding="2" border="0">
<tbody>
<tr>
<td width="60%" align="left"><font class="indextop">jst j2ee</font>
<br>
<font class="indexsub">Creating a Web Module</font></td><td width="40%"><img width="207" hspace="50" height="129" align="middle" src="../../../../../webtools/images/wtplogosmall.jpg"></td>
</tr>
</tbody>
</table>
<table width="100%" cellspacing="5" cellpadding="2" border="0">
<col width="16">
<col width="*">
<tbody>
<tr>
<td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font face="Arial,Helvetica" color="#ffffff">Intoduction</font></b></td>
</tr>
<tr>
<td valign="top" align="right">&nbsp;</td><td valign="top">
<p>
This test case outlines the steps required to create a Web
Module in a Flexible Java Project.
</p>
</td>
</tr>
<tr>
<td valign="top" align="right">&nbsp;</td><td valign="top">
<br>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font face="Arial,Helvetica" color="#ffffff">Steps</font></b></td>
</tr>
<tr>
<td valign="top" align="right"><img width="16" height="16" border="0" src="../../../../../images/Adarrow.gif"></td><td>
<B>Creating a Web Module</B>
</td>
</tr>
<tr>
<td valign="top" align="right">&nbsp;</td><td valign="top">
<OL>
<LI>
<P>
From any perspective, click
<B>
File &gt; New &gt; Project &gt; Web &gt; Dynamic Web Project
</B>
...
</P>
</LI>
<LI>
<P>Click Next.</P>
<IMG border="0" src="images/flexWebCreationNew1.jpg">
</LI>
<LI>
<P>
In the New Web Module wizard, enter the Project
Name of 'WebProject'.
</P>
<IMG border="0" src="images/flexWebCreationNew2.jpg">
</LI>
<LI>
<P>
Click Next to go to Select Project Facets Page. You can install
additional factets and bind to a runtime.
</P>
<IMG border="0" src="images/flexWebCreationNew2a.jpg">
</LI>
<LI>
<P>
Click Next to go to Settings Page. You can overwrite the
default settings here.
</P>
<IMG border="0" src="images/flexWebCreationNew2b.jpg">
</LI>
<LI>
<P>
Click Finish on New Web Module wizard. Your project
and Web module have now been created.
</P>
</LI>
<LI>
<P>
After the wizard finishes, if you are not already in
the J2EE perspective, you will be prompted to switch
agree by selecting 'Yes'. In the J2EE perspective
you will see the "WebModule" in the Project
Explorer.
</P>
<IMG border="0" src="images/flexWebCreationNew3.jpg">
<P>
After expanding take special notice of the modules
which have been created. The WebModule folder (as
well as the contained WebContent/META-INF,
WEB-INF, JavaSource folders) which represents the
Web module.
</P>
</LI>
<LI>
<P>
Next create a Test java class in the Web Modules
source folder 'JavaSource'. Defaults are
provided in the following image.
</P>
<IMG border="0" src="images/flexWebCreation5.jpg">
<P>Manually build if you have auto-build turned off.</P>
</LI>
<LI>
<P>
Switching now to the Resource perspective the ouput
of the builder can be verified. In the Navigator,
you will see all resources as they exist on disk.
After expanding the Java Project you will notice a
'.deployables' folder. This folder represents the
deployable output (J2EE spec compliant) generated
via the Component Structural Builder.
</P>
<IMG border="0" src="images/flexWebCreationNew4.jpg">
<P>
After expanding take notice of the modules
under the .deployables. You will now see one
representing the 'WebModule'. In the WebModule, take
special notice of the
WEB-INF/classes/sample/Test.class representing the
correct runtime output location for classes created
in a web's JavaSource. Also insure the web.xml and
Manifest.mf are in the correct locations.
</P>
</LI>
</OL>
</td>
</tr>
</tbody>
</table>
</body>
</html>