File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "error" Watch "error" New topic


gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
i have made out a folder under root of tomcat HelloClientServlet
under that
i have do in web.xml as follows..............

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"


<!-- Your servlet definitions go here -->




i have saved it simply (without any package) but not in package and i have made a WAR file and stored it in root\HelloClientServlet\ram.war.

now what to write in url to excess it........

i m writing http:\\localhost:8080\jaishriram (i give jaishriram in servlet-url)
it is giving error

thank you
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Hi Gaurav,
I try to help you.
- Place your war file in <tomcat-webapp>\ram.war
- Access that with http:\\localhost:<port-number>\ram\<your-servlet>

Hope this helps
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

A typical URL for a web app will look something like this:

I don't see a <context path> value in your URL. The context path is basically the name of your web app. It is one of the few properties of a web app not defined in web.xml. Tomcat uses the subdirectory you deploy an app in as the context path. For example if you deploy the app in $CATALINA_HOME/webapps/testApp your URL would be:

Another point to note is the META-INF folder is not required in a web app.

Please too try to give your posts a meaningful subject. The title "error" is not ver descriptive of your problem.
[ January 25, 2005: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
thanks for reply
i have created a WAR file,known as ram.war an save it in HelloClientServlet\ram.war.

i have given the url as-------

it i sgiving the error

and you were saying me that first i should read some book so please tell me that for which book i should go.

thank you
I agree. Here's the link:
subject: error
It's not a secret anymore!