aspose file tools*
The moose likes Servlets and the fly likes Beginner : How to run a servlet in Apache Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Beginner : How to run a servlet in Apache Tomcat" Watch "Beginner : How to run a servlet in Apache Tomcat" New topic
Author

Beginner : How to run a servlet in Apache Tomcat

rimzim sinha
Greenhorn

Joined: Oct 26, 2004
Posts: 17
Can some one please tell me the directory structure ..i.e. where do we keep servlets , jsp & htmls of an application & how do we call the servlet
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 635

Hope This Helps
Praful
[ November 09, 2004: Message edited by: Praful Thakare ]

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
rimzim sinha
Greenhorn

Joined: Oct 26, 2004
Posts: 17
Thanks but what about web.xml..where shud it sit?
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 635
OOPS.I missed the heart of Webapps ..it must sit (or sleep ) in WEB-INF.

Cheers
-Praful
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
All of these details are covered in the servlet API which you can find from this Sun web site. Everybody seriously interested in programming servlets should have a copy.
Bill
ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
Also Rimzim, bear in mind that your context does not have to be under the Tomcat webapps directory. It can be anywhere in your machine so long as it's got the correct directory structure. This is made possible by the fact that when you go to administration page of Tomcat, you can create new web apps (contexts) and tell Tomcat the path of the apps together with their docBase. The important part here is the docBase. Hope that helps.


In a time of drastic change it is the learners who inherit the future. The learned usually find themselves equipped to live in a world that no longer exists.<br />Eric Hoffer
rimzim sinha
Greenhorn

Joined: Oct 26, 2004
Posts: 17
Thanks did everything but I am getting this error

java.lang.UnsupportedClassVersionError: HelloServlet (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1643

Any Suggestions..?
I m using jdk1.5

Rgds
Rimzim
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beginner : How to run a servlet in Apache Tomcat