Java Reference
In-Depth Information
2. Enter lines 151 through 192 as shown in Figure 12-26 on page 810.
TextPad displays the code for the remaining actions, including setting other
JSPs or HTML pages as the receiving resource name (Figure 12-28).
JSP
resource name
HTML
resource name
JSP
resource name
HTML
resource name
JSP
resource name
FIGURE 12-28
3. Enter lines 193 through 199 as shown in Figure 12-26.
TextPad displays the code to obtain a RequestDispatcher object and
then forward the request and response objects to the requested resource
(Figure 12-29).
no valid action
submitted
dispatcher
to named
resource
forward()
method
FIGURE 12-29
After forwarding or redirecting a request, the servlet continues to execute. By
arranging the logic to drop to the end of the doPost() method, the servlet thread
completes.
 
Search WWH ::




Custom Search