In many cases, a portlet is designed to dispatch to one or more JSPs. This lets you format the presentation of the portlet output in a page. The Helloworld portlet uses a simple page located at <ATG2007.3dir>/Portlet/helloworld/helloworld/helloworld/html/index.jsp. There is nothing that makes this page different from a non-portlet JSP that uses a form handler.

The Helloworld index.jsp page uses the HelloWorldFormHandler. This line in the index.jsp page sets the actionURL variable, which is used in the action attribute of a form tag:

<c:set var="actionURL"><portlet:actionURL/></c:set>

The core of the index.jsp page accesses the HelloWorldFormHandler with the form and input submit tags from the dpsel tag library.

<dspel:form method="post" action="${actionURL}">
 <table>
 <tr>
 <td><label class="portlet-form-label" for="message">
 <fmt:message key="label-message"/></label></td>
 <td><dspel:input iclass="portlet-form-input-field" type="text"
 bean="HelloWorldFormHandler.message" id="message"/></td>
 </tr>
 <tr>
 <td>&nbsp;</td>
 <td><dspel:input iclass="portlet-form-button" type="submit"
 bean="HelloWorldFormHandler.update"/></td>
 </tr>
 </table>
</dspel:form>
 
loading table of contents...