29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.2.3 JSP wizard<br />

Figure 8-8 Palette view<br />

The JSP wizard takes you step-by-step through the process of creating a JSP. To<br />

create a new JSP file, do the following:<br />

1. To launch the New JSP File wizard, select File -> New -> JSP File.<br />

2. Select the appropriate container for the file from the list of project folders (and<br />

subfolders). The folder that you choose should be under the WebContent<br />

folder of the Web project. If a JSP file is not under this folder, then it will not be<br />

included in the WAR file that is deployed to the server. In addition, link<br />

validation will not encompass files that are not under the WebContent folder.<br />

3. Type a file name into the appropropriate field.<br />

4. Ensure that the appropriate option is displayed in the Markup Language<br />

drop-down list. In addition, if you select the Create as JSP Fragment check<br />

box, this file will be created as a fragment that can be added to another JSP<br />

file. Other JSP files can include JSP fragments using a JSP include directive.<br />

Creating a fragment causes the resulting file to end in a .jspf or .jsf extension.<br />

You will not be prompted for DOCTYPE information, because a fragment<br />

cannot stand alone as a Web page, and it would invalidate any JSP file that<br />

included it. Also, depending which markup language you select, you can<br />

select the Use XML Style Syntax option to create a JSP file that adheres to<br />

XML style tagging.<br />

Chapter 8. Working with JSPs 263

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!