Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Servlet in Weblogic 5.1

Posted on 2003-04-01
Medium Priority
Last Modified: 2010-04-20
Hi i installed weblogic 5.1 in my system. it is working with jsp. i don't know how to work servlets in weblogic 5.1(not 6.1). where can i put the servlet class in weblogic , and what are the neccary changes should i do in the system.
could u guide me.
thanking you for your best cooperation

Question by:anmadhu

Accepted Solution

thanassis earned 1500 total points
ID: 8252209
Creating a Servlet:
Create a New Project (Main Menu | File | New Project). Enter "HelloWorld" as the project name. As you won't need standard libraries, remove them from the project: press Advanced button, select Search Classpath and make sure that check boxes 'Include standard libraries' and 'Include Classpath' are cleared. Press OK button.

Create a New Package:
Name it "hello" and choose Open in New Tab from the speedmenu.

Create a new servlet "HelloWorld" using Class by Pattern icon on the toolbar.

Edit doGetmethod
where you see:
//Write your code here
change it with:
 out.println("Hello world");

Compiling and running a Servlet
Edit weblogic.properties
where you see: #weblogic.httpd.register.servlets=weblogic.servlet.ServletServlet
change it with:

Start Weblogic Server 5.1.0:

Main Menu | Tools | EJB Deployment Expert

Select Application Server Platform: 'Start Weblogic Application Server 5.1'.

Check 'Start Weblogic Server 5.1.0 (normal mode)' and uncheck 'Start Weblogic Server 5.1.0 (debug mode)'. Press Next.

Set root directory of Weblogic Server 5.1.0 and press Finish button to start the server.

Note: Alternatively you can start Weblogic Server 5.1.0 from the Windows Start | Programs | Weblogic 5.1.0 | Weblogic Server.

Run Together's Main Menu | Tools | EJB Deployment Expert

Select "Weblogic Application Server 5.1" as the target server and make sure that checkboxes "Add librares, required for..." and "Process Servlet(s)" are checked, while the other check boxes are cleared. Press Next.

Set paths to jdk1.2 (e.g. c:\jdk1.2.2), Weblogic (e.g. c:\wls51) and paths where you want to place the resulting Servlet default (%WL_HOME%myserver\servletclasses) and temporary files. Press Finish.

If the compile process successfully completed, the Message Pane should display the following message:

//WLS51: Finished with 0 Errors, 0 Warnings.//

Note: To be sure your created .jar file was successfully deployed to Weblogic server, go to the server console. If the console displays
EJB home interface: 'hello.HelloHome' deployed bound to the JNDI name: 'hello.HelloHome' "
 it means that our bean is successfully deployed.

Running the Servlet
Open your browser and set address http://localhost/servlets/hello/HelloWorldServlet. You should see "Hello World".

Hope its OK now!

Author Comment

ID: 8293988
Thanx thanassis , for your reply.
thank you

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question