This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to run servlets in J2EE without using war file , please help , urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to run servlets in J2EE without using war file , please help , urgent" Watch "how to run servlets in J2EE without using war file , please help , urgent" New topic
Author

how to run servlets in J2EE without using war file , please help , urgent

santosh vashist
Greenhorn

Joined: May 14, 2001
Posts: 25
I want to run a servlet in J2EE 1.2.1 server , can any one help me by telling where to put the class files etc.it would be greate if any body replies.
thanks in advance
santosh
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Download the servlet 2.2 API from java.sun.com
Everybody working with servlets and JSP should have this document available.
The rules for where things go and how web.xml is configured are way too complex for posting.
Bill
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Hi,

Let's assume I browse to here: http://java.sun.com/products/servlet/2.2/javadoc/index.html

Where in this API does it tell me how to deploy? This is a Programmer's tool to help write servlets. It doesn't at all help me when I want to deploy my servlet.

The unfortunate (or fortunate?) thing about deploying "stuff", is that the actual deployment details are implementation details. In what folder you put class files so that a particular servlet runner can find them, is a detail that is left to the maker of that servlet runner. So everybody does it differently.

In a J2EE server, I think you'd need to bundle your servlet into a WAR file and deploy it as a web component, which would be part of a larger EAR component. This is going from the Reference Implementation, but perhaps other app servers allow just 'simple' servlets to be deployed, without the other stuff. But again, each server is probably different.

If you are using the reference implementation (the one that comes in the dowload of j2sdkee1.2.1), then I can help you with that case. Let me know.
santosh vashist
Greenhorn

Joined: May 14, 2001
Posts: 25
Hi Mike Curwen,
thanks for reply,
Can you please brief little more on the reference implementation. What do you mean by it.But yes I am using J2SDKEE1.2.1 only. can you please help in this regard.
regs,
santosh
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Hi,

The download you got from sun for the j2sdkee1.2.1 contains not only the API and the jar files for creating J2EE apps, but it contains a 'Reference Implementation' (RI) for both the application server, and the deploy tool.

So instead of having to buy a product like iPlanet or WebLogic, you can use the free one included by Sun. There is also a GUI-based deployment tool included with the download.

The best advice I can give you is to download and print off the Developer's Guide. The link for the download in pdf format is: http://java.sun.com/j2ee/j2sdkee/devguide1_2_1.pdf

If you want to view it on the web... http://java.sun.com/j2ee/j2sdkee/techdocs/guides/ejb/html/DevGuideTOC.html

I have gone through this guide from cover to cover, and it is very good at bringing you up to speed on EJB and JSP and Servlets.

Hope that helps.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to run servlets in J2EE without using war file , please help , urgent
 
Similar Threads
j2ee
Installing J2ee in 98
Help needed for IBM's J2ee Certification
Running -server mode on J2SE platform
J2EE begineer