|
Oracle® Application Server Standard Edition One Quick Tour
10g Release 2 (10.1.2) Part No. B15924-01 |
|
![]() Previous |
![]() Next |
JavaServer Pages (JSP) technology is based on Java servlets and, like Java servlets, JSP is a server-side technology. A key difference between JSP pages and servlets is that JSP pages keep static page presentation and dynamic content generation separate. JSP Web page designers use:
HTML tags to design and format the dynamically-generated Web page
JSP standard tags or Java-based scriptlets to call other components that generate the dynamic content on the page
JSP tags from custom tag libraries that generate the dynamic content on the page
After developing a JSP application, the application should have the Web Archive (WAR) format for deployment. According to the J2EE specification, every application must be assembled and packaged as an Enterprise Archive (EAR) file prior to deployment.
The following procedure describes how to develop and prepare for deployment a JSP application using Oracle JDeveloper.
Start Oracle JDeveloper 10g.
Select New from the File menu. The New Gallery window will appear.
Select Application Workspace.
Click OK. The Create Application Workspace window will appear.
Enter a name for the application, and a directory.
Click OK.
Right-click the project that corresponds to the new application, and select New. The New Gallery window will appear.
Expand the Web Tier node by clicking the plus sign (+).
Select JavaServer Pages (JSP) in the Categories section, and JSP Page in the Items section.
Click OK. The Create JSP window will appear.
Enter a file name for the JSP. The file extension should be .jsp. The directory name should not be changed for the application.
Create the JSP using the JSP and HTML elements available on the JSP and HTML Component Palettes.
Save the project as you work on it. The following figure shows Oracle JDeveloper and a simple JSP application.
Run the project by selecting the project name from the Run menu. A browser window will open with the application.
Create a deployment profile for the JSP application. The following procedure describes how to create a deployment profile using Oracle JDeveloper:
Select the project.
Select New from the File menu.
Select Deployment Profiles from the General category, and WAR File from the Items category.
Click OK. The Create Deployment Profile -- WAR File window will appear.
Enter a name and location for the profile.
Click OK. The profile will be added to the project and the WAR Deployment Profile Properties window will appear.
Select items in the left pane and enter the corresponding information in the right pane.
Click OK when done. The location of the WAR and its corresponding EAR file will be shown in the Structure pane.
Deploy the application. The following procedure describes how to deploy the JSP application using the Application Server Control Console.
Select Programs from the Start menu on the taskbar.
Select the Oracle Application Server instance name.
Select Go To.
Select Application Server Control Console. The Application Server Control Console farm page will be displayed in your browser.
Select the middle tier instance.
Select the appropriate OC4J instance or create a new one. The home instance, created during installation, is the default instance for custom applications.
Click Applications.
Click Deploy EAR file. The application deployment wizard will begin and guide you through the deployment process.
The application will be available at the following URL
http://hostname:port/application_name/
In the preceding URL, hostname is the name of the application server, port is the port number for the server, and application_name is the name of the application, without the EAR extension. For example, if the application is myfavorite.ear, then the URL would be as follows:
http://hostname:port/myfavorite/
|
Show Me:
|
|
See Also: For more information about deployment, refer to Oracle Application Server Containers for J2EE User's Guide |