Editing JSP files

You can create JSP files or edit those you created, add data from other Java™ beans, and customize the result tables.

JSP files allow you to do the following and more:

When a Web server like WebSphere® Application Server processes the JSP file, it performs the following actions:

You can customize the JSP file, adding your own text and images using JavaScript™, HTML, or JSP scriptlet tagging in Page Designer. These tags and script will be included in the HTML file created by the Web server and returned to the requesting browser.

Double-click a JSP file to open the file in Page Designer. Using the Page Designer JSP menu, you can insert the following JSP elements:

After adding these elements, you can select them and edit the contents in the Attributes view, or use the Source page to edit or add additional content using content assist. You can also edit using the Quick Edit view. You can drag-and-drop or use smart double-click to add elements from the Snippets view.

If you use JSP expressions in attribute values along with other text, the entire attribute value must be enclosed in quotation marks. Even though this is not technically required by Web servers during production, it is required in the development environment in order for links fix-up, highlighting, and content assist to work correctly. For example, a tag such as:

<IMG src=file<%=object.getFileNumber()%>.gif%>
should be written as:

<IMG src="file<%=object.getFileNumber()%>.gif">
or, better, entirely inside the JSP expression, as in:

<IMG src=<%="file"+object.getFileNumber()+".gif"%>>
or, the best way to write it is with quotes and inside the JSP expression, as in:

<IMG src="<%="file"+object.getFileNumber()+".gif"%>">

 

Related concepts

JSP technology

Custom tag libraries

 

Related tasks

Creating Web pages

Editing JSP tag parameters

Adding custom JSP tags

Debugging JSP files

Testing JSP files on a server

Adding an embedded file to a JSP page