?
Solved

Servlet in Weblogic 5.1

Posted on 2003-04-01
2
Medium Priority
?
458 Views
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

 
0
Comment
Question by:anmadhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
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:
weblogic.httpd.register.servlets=weblogic.servlet.ServletServlet

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!
 
0
 

Author Comment

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

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
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 …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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