Integrate Oracle 9iAS in jbuilder5 step by step to develop Web applications (2)

Source: Internet
Author: User
Article 2: publish a simple webapp example.

The simplest thing is helloworld. Let's use servlet to output a hello World and release it to the Solaris.

The following example assumes that you have mastered the servlet Development Method in JB, and correctly configured the Kerberos in JB according to the first article in this article.

Step 1: Open JB and create a new Web application. We name it helloworld. On the context settings page, we name the context "test" and click Generate war. We need to generate a war file. The directory is wwwroot. Complete.

Then, create a servlet in this project, named helloservlet, click Next, and finish. Then we change the output in the automatically generated helloservlet. Java to Hello world.

Compile and test run. JB will run the servlet with its own tomcat. We can see that Hello world is displayed normally.

Create a new ear, which can be found on the new-enterprise page. Click "Next" and take the default value of the system. When setting web modules, click "test. War. Add test. War to the ear. This ear file is named helloworld. Ear.

Right-click helloworld. eargrp and select Properties from the pop-up menu. Select the target container name to be published on the property page of deployment. We chose Jiwei. (This is what we set in the first article ).

Step 2: Release the tool to the image search center.

First, start your Solaris server, and then pop up the release window of the Solaris from tools-EJB delopyment. Click deploy. Wait a moment. If it is released normally, OK. Access http: // localhost/Hello/helloservlet in IE and you will see hello World.

If you have changed the servlet, how can I re-release it? It's easy. Let's change the output to Chinese. In helloservlet. Java, change the output string to "Hello, China ."

Right-click helloworld. eargrp, rebuild it, and recompile it. Redeploy it and republish it. Well, refresh it in IE and you will find that the output string has become Chinese.

Everything is that simple. Please contact yancheng@sharetop.com if you have any questions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.