File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes help me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "help me" Watch "help me" New topic
Author

help me

gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
i m begging in front of all of you.
after all efforts i m not be able to run /execute a servlet in tomcat.

i m depressed a lot,i m trying it from last 4-5 days.
my directory is--:

c:\program file\apache group\tomcat4.1\

please please please please please please please please please please please please please please please please please please please please please please please please please ..................................

give me out with the proper solution ,that how to set the environmental variables and where to save up with the files, what extra files i have to create...etc what all stuff is necessary.............please sir i m begging in front of you.

thank you
gaurav
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Need not begging mate. Get this, it will help you more then you want.

Otherwise tell us what you did and what you are doing. and what are you getting???
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Yes, begging is beneath you.

I have some simple servlet applications all written and packaged as war files that you can just drop in the webapps directory of you Tomcat installation and run.

http://simple.souther.us

Start with SimpleServlet.
Once you see that it's running, you'll be able to either modify it or compare with your own app to see what's going wrong.

Let us know how you make out.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
thank you , as per your saying i now understand that we have to save our WAR file in TOMCAT_HOME\webapps\ .and after doin this it have worked ,
btu sorry to disturb you please tell me that how to create WAR file in tomcat.

thank you
gaurav
Ravish Ahuja
Greenhorn

Joined: Nov 29, 2004
Posts: 13
creating a WAR file is not compulsary. however you can make a war file using jar utility.
And make sure your TOMCAT server is running before you try to run your servlet. You can start your server by running startup.bat from bin directory. Before that you have to save the JAVA_HOME variable in the environment variables, which the home of your JDK.

Hope this solves your problem.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Hi,

Bens' link really works.
cheers.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

My point was not that you have to make a war file.
By downloading and deploying one of those apps, you give yourelf a working application that you can refer to.

You can see what the proper directory structure.
You can see a proper servlet declaration and mapping in your web.xml file.

Compare that with your own app and you will see what the problem is.
 
 
subject: help me