Java Web Applications
Subject:   error 404- servlet would not load
Date:   2003-07-14 04:40:52
From:   anonymous2
Response to: error 404- servlet would not load

I have my project folder and i have made modification in my server.xml i have added

context path

in the web.xml in the webapps /web-inf folder i am doing the servlet mapping.. but it is taking the file from the root only


<display-name>Application </display-name>




what is the solution ?..plz write back soon

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • error 404- servlet would not load
    2005-11-17 02:41:24  Shreyas [View]

    Tomcat has following folders
    bin, common, conf, logs, server, shared, temp and webapps

    The classpath is an environment variable that tells the java compiler javac.exe where to look for class files to import or java.exe where to find class files to interpret.

    The path is an environment variable that tells the command processor where to look for executable files. e.g. *.exe, *.com and *.bat files.

    Compiling a servlet
    You require to include in your classpath
    D:\j2sdk1.4.2_03\lib\tools.jar, where j2sdk1.4.2_03 is a java installation. now you can compile servlet source file, with javac

    Setting tomcat to allow servlets to run
    create your WApp folder containing web application this contains WEB-INF and folders like classes, lib and web.xml folders.

    In web.xml folder of above web application you require to include

    Add following text in tomcat_instal\conf\server.xml
    before </Host> tag

    <Context path="/WApp"

    To execute servlet on Tomcat server
    at classpath include tomcat_dir\bin
    and type at command prompt startup
    At browser
    will give you servlet.