Creating an Ajax user interface
In this section, we create an input form that initiates an Ajax request to the WebLogic server. The input form is a JSP, which we shall create next. Select File>New and in the New Gallery window, select Web Tier|JSP in Categories and JSP in Items, and click on OK. In the Create JSP window, specify the File Name as input.jsp. Click on OK. The JSP input.jsp gets created. Similarly, add JSPs catalog.jsp for redirecting to if a new catalog entry gets created and an error.jsp JSP for redirecting to if a catalog entry does not get created.
The input form requires a unique catalog id to be specified to create a new catalog entry. The input catalog id in the form is validated against the database content to see if it is already specified.
Sending an Ajax request
The catalog id data added to the HTML form is sent to the server as the catalog id is added (not when the form is completed) and an HTTP servlet returns an XML response that contains information about the...