Developing for WebLogic Server 8.1 with Oracle JDeveloper 10g
Pages: 1, 2, 3, 4, 5

Set the J2EE Web Context root for the Web application in the Project Properties. Select Tools>Project Properties. In the Project Properties frame, select the Common>J2EE node. Specify the context root in the J2EE Web Context Root field. For the example Web application, specify the context root as weblogic-context-root. Next, specify a dependency between the Model project and the View project. Right-click on the View project node, and select New. In the New Gallery frame, select the Common>Dependencies node. Select the EJB JAR deployment profile in the Model project, and click on the OK button.

Figure 18
Figure 18. Project dependencies

Next, create the application deployment profile for the Model-View application. Right-click on the View project node, and select New. In the New Gallery frame, select General>Deployment Profiles in the Categories listed, and select EAR File in the Items listed. Click on the OK button. In the Create Deployment Profile frame, specify a deployment profile name and directory (or select the default values), and click on the OK button. In the EAR Deployment Profile Properties frame, select the Application Assembly node. Select the Web application J2EE module and the EJB application module. Click on the OK button.

Figure 19
Figure 19. EAR Deployment Profile Properties

The application deployment profile node will be added to the Applications-Navigator. Next, deploy the J2EE application to WebLogic Server which has already started. Right-click on the application deployment profile node, and select Deploy to>AppServerConnection1. AppServerConnection1 is the connection to the WebLogic Server.

Figure 20
Figure 20. Deploying to WebLogic Server

The J2EE application will be deployed on WebLogic Server. Access the WebLogic Server administration console with the URL: http://localhost:7001/console. The J2EE application is listed in the Deployments>Applications node.

Figure 21
Figure 21. Application deployed in WebLogic Server

Next, run the client JSP for the session EJB in WebLogic Server with the URL http://localhost::7001/weblogic-context-root/weblogic.jsp. The getAppServer() method of the session EJB will be invoked in the JSP, and the String value returned by the method will be output to the browser.

Figure 22
Figure 22. Run JSP in WebLogic Server

Pages: 1, 2, 3, 4, 5

Next Page ยป