Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error

 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have made out a folder under root of tomcat HelloClientServlet
under that
1-META-INF
2-WEB-INF
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"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>

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


<servlet>
<servlet-name>HelloClientServlet</servlet-name>
<servlet-class>HelloClientServlet</servlet-class>
</servlet>


<servlet-mapping>
<servlet-name>HelloClientServlet</servlet-name>
<url-pattern>jaishriram</url-pattern>
</servlet-mapping>


</web-app>

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
gaurav
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
daniel
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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-------

http:\\localhost:8080\ram\jaishriram
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
gaurav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic