May 2001
Intermediate to advanced
1088 pages
30h 13m
English
Up to this point, the discussion has centered around the request object in Java Server Pages. In case you missed it, the request object in a JSP is an instance of HttpServletRequest. If you recall from Chapter 13, "Servlets," an HTTP servlet receives an instance of HttpServletRequest when its service method is invoked. This means, of course, that you already know how to retrieve form variables in a servlet because you do it the same way you do in a Java Server Page.
Listing 15.6 shows a servlet version of the ShowParameters Java Server Page you saw in Listing 15.5. Again, you can test it out by passing parameters directly in the URL.
package ... |
Read now
Unlock full access