What's Available to JSPs

As mentioned earlier, JSP scriptlets have access to a variety of implicit objects as well as any declared variables and methods. The majority of the work, however, will be handled by the request object, which provides access to the parameters passed to the page and the response object, which writes the information back to the page.

The request object has a variety of methods, the most useful of which are

  • getParameter()

  • getParameterNames()

  • getParameterValues()

The getParameter() method returns the value for a passed in parameter. Parameters are accessed by name and are case sensitive:

<% String objId = request.getParameter( "id" ) %>

The getParameterNames() method returns an enumeration object containing the list of parameter ...

Get PowerBuilder® 9: Internet and Distributed Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.