Download as pdf
Download as pdf
You are on page 1of 1
= 31 HTMLFoms ST http: /localhost:808.... =jack@password=) [<>] [6] [+] @hitp://tocainost:8080/pjbank-3/lo Login Information User Name: jack Password : jill Figure 3.5: The rendered version of Login-procees. je. ‘ch2> Login Information er/> User Nane: Password : request .getParaneter( password") % ehr/> ‘To use this JSP page, the action attribute for any of the previous login forms should be set to Login-process..jsp, as follows: ‘
Often, itis easiest to couple the form and its processing in a single JSP page fragment. This simplifies development because the form data is acquired and processed together. The only major change is that a JSP scriptlet needs to be used to determine whether to display the form or process the form data, as seen in login-all..jsp. One simple technique to solve this difficulty isto test whether a particular input control has been assigned a value (although in production you might instead rely on a validation script to set a Boolean flag).

You might also like