Processing HTML forms using servlets, or more often, CGI scripts, is one of the most common operations performed on the Web today. However, that JavaServer Pages (JSPs) can play a significant role in sophisticated form processing is a little-known secret.
Tutorial Details:
Processing HTML forms using servlets, or more often, CGI scripts, is one of the most common operations performed on the Web today. However, that JavaServer Pages (JSPs) can play a significant role in sophisticated form processing is a little-known secret. In certain instances, JSP even excels the capabilities of servlets and Perl scripts in handling HTML forms. In this article, Govind examines the processing of a user registration form using JSP and JavaBeans while implementing the Memento design pattern. It is assumed that the reader is familiar with basic JSP syntax.
Processing HTML forms sounds like a fairly easy task. For simplistic forms, it usually is. However, this "easy task" (as anyone who has written a halfway sophisticated Web application will confirm) can quickly become tedious. This is because handling HTML forms usually involves a lot more than just parsing the request parameters and outputting a response back to the client. Typically, form processing involves multiple components operating in the background, with each component responsible for a discrete task such as state management, data validation, database access, and so on. While there are numerous examples that demonstrate form processing with Perl scripts and servlets, using JSPs for this purpose has received little attention. There is a reason for this. Apart from the fact that JSP is a fairly new technology, many view it as being suitable mostly for handling the presentation of dynamic content sourced from either JavaBeans or servlets. However, as you shall soon see, the combination of JSP with JavaBeans can be a force to reckon with when processing HTML forms.
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Advanced form processing using JSP
View Tutorial: Advanced form processing using JSP
Related
Tutorials:
|