Tutorials to .com

Tutorials to .com » Jsp » Application » Jbuilder5 a step by step in the integration of Oracle 9iAS Application Development WEB (2)

Jbuilder5 a step by step in the integration of Oracle 9iAS Application Development WEB (2)

Print View , by: iSee ,Total views: 12 ,Word Count: 493 ,Date: Tue, 25 Aug 2009 Time: 4:09 AM

Second, release a simple webapp example.

The simplest is to Helloworld, and the following we will use servlet output a hello world, posted to the oc4j on the bar.

The following example of the premise that you have the hands of JB in the development of Servlet-based approach and in accordance with this article first described in the JB correctly configured OC4J.

Step one: Open the jb, the newly created a web application. We named helloworld, set in the context page context, we name the name of the called test, click Generate war, we demand generated war file. Directory is wwwroot. .

Then, in this project to create a new Servlet, named HelloServlet, way points, Next, the final Finish. Then we changed automatically generated HelloServlet.java in output Hello world.

Compile, test run, jb would use that comes with tomcat to run this servlet, and can see the normal show a hello world.

Then create a new EAR, in the New - Enterprise page can be found. The way-point Next, take the system default values, to set the web modules, we click on the test.war. Test.war to join in the ear. This ear file is named helloworld.ear.

Right-point helloworld.eargrp, the pop-up menu selected properties. Setting deployment properties page select the target you want to publish container name. We selected jiwei. (That is, we are in the first set).

The second step, we have to publish to the OC4J on the bar.

First start your OC4J server, and then from the Tools - EJB Delopyment where OC4J release of the pop-up window. Point Deploy, wait a bit. If the normal release, OK, in IE to access http://localhost/hello/helloservlet, you can see the show Hello world.

If you change the servlet, how to re-release? Quite simply, we look at the output for the Chinese to change it, change the output string in the HelloServlet.java to "Hello, China."

Right-point helloworld.eargrp, first, rebuild it, and re-compile. And then redeploy it, and re-released. Well, if you refresh in IE, you will find the output string into Chinese.

All's that simple. Have any questions, please contact yancheng@sharetop.com

Java Application / Other Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.