Question about servlet to run in apache tomcat 4.0
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ashutosh_Pandey
Posted On:   Monday, December 12, 2005 07:29 AM

I hvae created a servlet in my editplus editor. i Have created the folder named foo under webapps,created a folder named WEB-INF under foo and under web-inf the folder classes and my directory structure is like that c: omcat 4.0webappsfooweb-infclasses. after doing these steps i save my servlet name Hello.java under c:jdk1.3 inHello.Java and compile the servlet like that c:>jdk1.3>bin>javac Hello.java -classpath "c: omcatcommonlibservlet.jar" the compiler javac is compiling the servlet perfectly.After compiling the servlet i copy and paste the Hello.class file in the classes folder. but when i run the servlet in the tomcat server by giving the path http://localhost:8080/foo/hello    More>>

I hvae created a servlet in my editplus editor. i Have created the folder named foo under webapps,created a folder named WEB-INF under foo and under web-inf the folder classes
and my directory structure is like that c: omcat 4.0webappsfooweb-infclasses.

after doing these steps i save my servlet name Hello.java under c:jdk1.3 inHello.Java
and compile the servlet like that
c:>jdk1.3>bin>javac Hello.java -classpath "c: omcatcommonlibservlet.jar"
the compiler javac is compiling the servlet perfectly.After compiling the servlet i copy and paste the Hello.class file
in the classes folder.
but when i run the servlet in the tomcat server by giving the path http://localhost:8080/foo/hello
The server gives the error 404: the requested resource locathost:8080/foo/hello not available.
Kindly answer me how to compile and run the servlet in the apache tomcat 4.0 server in a very easy manner and step by step.
Thanking you
Ashutosh Pandey

   <<Less
About | Sitemap | Contact