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.

JSP toolbar menu<br />

The JSP option on the toolbar contains helpful tools to add dynamic content. You<br />

can see the current list of options in Figure 8-2 on page 258. If you select an<br />

option that needs further clarification, such as parameters, a name, options, etc.,<br />

a window will pop up allowing you to enter the necessary information. For<br />

example, if you select Insert Include from the JSP pull-down, you will see a<br />

window (such as Figure 8-3) allowing you to name the file to include and to pass<br />

parameters to it.<br />

Figure 8-3 Inserting a JSP include<br />

The resulting code added to the JSP would look like Example 8-6.<br />

Example 8-6 JSP include code<br />

<br />

<br />

<br />

For all the options you see, the processing is intelligent. For example, if you<br />

select Insert Results from Bean but have not defined a useBean, then you will<br />

get a message saying that the useBean needs to be defined first.<br />

Content assist<br />

The content assist menu can be used to select code or tags to enter. You can<br />

open the content assist menu by using Ctrl+spacebar, or by right-clicking the<br />

editor window and selecting Content Assist.<br />

Chapter 8. Working with JSPs 259

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

Saved successfully!

Ooh no, something went wrong!