An application designed with JSP (JavaServer Pages) pages is an application that can be accessed and run from a browser-based client, typically over the Internet or a corporate intranet. Unlike traditional client-server applications, JSP applications:
Run on a wider variety of client machines and browsers
Run on thinner clients, thereby consuming fewer client-machine resources
Scale to a larger number of simultaneous users
Require less effort to install and maintain
Note: For additional background information about JSP technology, see the JavaSoft web site at http://www.javasoft.com/products/jsp/.
JDeveloper provides facilities to develop a special kind of web application based on a combination of JSP technology and Oracle's Business Components for Java framework. We call this kind of web application a Business Components JSP application—or JSP data application for short.
A JSP data application consists of a set of JSP pages that can use:
JDeveloper's data web bean classes to generate dynamic content together with predefined HTML formatting
JDevelopers's custom data tags to embed dynamic content in HTML formatted pages
JDeveloper's custom data tags, like data web beans, rely on business components as a datasource. You will use data tags when you want to design JSP pages interactively; whereas you can use data web beans when you need reusable components.
Custom data tags are based on the JSP 1.1 specification. The custom tags allow for simplified interaction with Business Components for Java datasources. The tags provide complete access to Business Components and allow viewing, editing, and full DML control. The tag-based approach to building JSP web applications with Business Components does not require extensive Java programming and is very much like coding an HTML page.
Both types of data-aware components rely on a Business Components application module to browse and update an Oracle database.
You use JDeveloper's JSP-related wizards to generate JSP pages. You can create pages individually or as a collection of pages:
JSP Wizard generates a simple "Hello World" JSP page
Data Page Wizard generates databound JSP pages based on a single Business Components view object
Business Components JSP Application Wizard generates a JSP application based on a Business Components application module and the view objects it defines
Additionally, you can insert individual JSP elements that you select into your JSP page using:
Component palette to add data tags and web beans to the JSP page
A JSP data application uses the Business Components for Java framework to browse and update a database. Specifically, a JSP data application communicates with an application module and its associated view objects. When you generate JSP data application using either the Data Page Wizard or the Business Component JSP Application Wizard, you choose which of several JSP forms to generate for the view objects. Each of the JSP forms consists of one or more JSP pages built using JDeveloper-provided data web beans. The generated forms use JDeveloper's custom tag library to coordinate with one another and form a complete UI.
The JSP forms the wizards generate for you include:
Use this form to define a query to a data source represented by a view object. A query form consists of two JSP pages named viewobject_Query.jsp and viewobject_querysubmit.jsp where viewobject is the name of the view object for which the query form was generated. The viewobject_Query.jsp simply renders a standard HTML form with text input fields, which correlate with the view object's attributes. The form has it's ACTION set to viewobject_QuerySubmit.jsp. The viewobject_QuerySubmit.jsp performs the following functions:
Processes the incoming HTML parameters
Sets the Where clause based on the parameter values
Issues a query via the RowsetIterate tag and renders all the rows which correspond to the Where clause
Note: The processing code in viewobject_QuerySubmit.jsp is provided as a basic example of how to process HTML form parameters and set Where clauses using the data tags. Advanced parameter parsing will require additional coding enhancements to the generated viewobject_QuerySubmit.jsp page.
Use this form to browse records from a data source represented by a view object. A Browse Form consists of a single JSP page named viewobject_Browse.jsp where viewobject is the name of the view object for which the Browse Form was generated.
Use this form to edit a record from a datasource represented by a view object. An Edit Form consists of two JSP pages named viewobject_Edit.jsp and viewobject_SubmitEditForm.jsp where viewobject is the name of the view object for which the Edit Form was generated.
Use this form to insert a new record into a data source represented by a view object. An Insert Form consists of two JSP pages named viewobject_Insert.jsp and viewobject_SubmitInsertForm.jsp where viewobject is the name of the view object for which the Insert Form was generated.
In addition to the JSPs associated with the forms above, a JSP page is generated for each view object.