• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic