29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Preferences, and then expanding the Web and XML Files<br />

preferences.<br />

v. Ensure that the proper content type is selected in the Content Type<br />

drop-down list. The default depends on the markup language.<br />

vi. Select the Document Type that you wish to associate with the JSP file.<br />

The default depends on the markup language.<br />

vii. Specify a cascading style sheet (CSS) file to to be referenced by the<br />

new JSP file. Typically, CSS files are located in the theme folder under<br />

the WebContent folder. You can use Add to choose a style sheet from<br />

the file system. Use Remove to delete a style sheet from the list, or<br />

use the arrow buttons to rearrange the order in which the file<br />

references the style sheets. If a style sheet is already associated with<br />

the project in which you are creating the new file, that style sheet is the<br />

default.<br />

viii.Click Next to select specific method stubs and add deployment<br />

information to the Web project's web.xml file. Select any appropriate<br />

method stubs to be created in the servlet that is deployed for this JSP<br />

file. If you select the Add to web.xml check box, the JSP file, along<br />

with its display name, and any URL mappings and initialization<br />

parameters associated with the JSP file will be automatically included<br />

in the Web project deployment descriptor file. Note that the File Name<br />

value provided in the first page of the wizard is automatically mapped<br />

to the Servlet Name value on this page, as well the URL Pattern<br />

mappings. These mappings are not updated if you change the original<br />

value in the File Name field.<br />

6. Click Finish to create the file in the project that you have selected. As a<br />

default, the new file opens in Page Designer, in the Design page.<br />

8.3 Using JSPs in the Online Catalog sample<br />

Now that you have seen some of the aids, try using them to build a JSP. Much of<br />

the coding that you do will probably end up to be straight typing, but remember<br />

that there are many aids to ease the process. It will take practice to become<br />

familiar with what is available.<br />

Chapter 8. Working with JSPs 265

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

Saved successfully!

Ooh no, something went wrong!