On Sat, 17 Feb 2001, you wrote:
> 
> hi everybody....
> 
> i have just downloaded and installed Tomcat and am a complete 
> newbie at it...the installation gave me a few problems like "environment
> out of space " and a few other regarding the class path etc...but i have 
> manged to get it right now....
> 
> the problem is that I dont know how to run my servlets !!!
> I am running Tomcat and Apche on my Windows 2000 machine...
> 
> the path where i am storing my .class files is:
> 
> c:\tomcat\webapps\user\web-inf\classes\hello.class
> 
> i have been told, that one need to add  web.xml file to the 
> classes directory ??
> 
> can some one please tell me :
> 
> 1. Where to store the .class files ?
   You are putting them in the right place
  
> 2. what link to give to the browser ?
    
    If you are running tomcat standalone and have not changed the 
    default port settings then
    http://localhost:8080/user/servlet/hello
    If you have integrated Apache and tomcat then 
    http://localhost/user/servlet/hello

> 3. in what way should i configure the web.xml file ??
>     ( there is already a web.xml file in tomcat\conf\......)

     There are two types of web.xml file. The default which is global
     to tomcat i.e. the one in tomcat\conf. I believe from 3.2 onwards 
     this is no longer read by tomcat so you can forget about it. 
     You can also and should define a web.xml file for each web app.
     This should be deployed in the WEB-INF dir of your app (not the 
     classes dir)
     Take a look at the web.xml file in the examples directory. 
     Also, chapters 9,10 and 14 of the Servlet API spec is the best place 
     to learn how to configure web.xml. It is available at
     http://java.sun.com/products/servlet/

     Hope this helps
     Andrew
     



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to