tomcat and servlet

hi to all... i've configured my tomcat 6.0 for the deployment of servlet but i always get a 404 error, servlet not available...

environment variables:

classpath has been pointed to servlet-api.jar ans jsp-api.jar

java_home set to point to jdk folder

configuration of tomcat:

conf/web.xml: uncomment servlet/* and its corresponding servlet mapping

conf/context.xml: set reloadable="true"

still when i do all of this nothing works! even my html pages! error page not found...

whats the problem?

plz help with the configuration of tomcat

heartful thx

[615 byte] By [victoriousa] at [2007-11-26 15:46:46]
# 1

when u try in the browser to load the servlet using http://localhost........(whatever) u must make sure that wat u have typed there is the place where u have stored the file.....

make sure of that.

that means, the folder where u have intalled tomcat..

servlet-examples>web-inf>classes..store it here..

then type..

http://localhost/servlet-examples/servlet/filename..

just try it out...

Message was edited by:

KayDeE

KayDeEa at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
i did exactly that... i tried a simple HelloServlet, saved it in ROOT/WEB-INF/classes and accessed it with http://localhost/servlet/HelloServlet... still doesnt work... /servlet/HelloServlet not available
victoriousa at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

not root.

form where u have installed tomcat u must be having a folder called servlet examples right:

look, this is where i have stored my servlets..

C:\tomcat\webapps\servlets-examples\WEB-INF\classes\MyFristServlet.java

don't store in root folder.

and after that type in browser

i take it that u have written the servlet mapping and all that in that xml file no?

http://localhost/servlet-examples/servlets/ServletName

u must be having a servlet examples folder, this is where all the readymade examples are stored.

try those out first.

if they work then in that case do the same thing for ur other progs that u made on ur own

Message was edited by:

KayDeE

KayDeEa at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
is the java_home in caps in the environment variables?if so please check that and try again
kelkum2003a at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
u also need to set the environment variable for the JRE_HOME and that of the jdk must be 1.5 and upper . check this it should work, i just tried and it works fine for me
kelkum2003a at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
many thanks to all... it works just fine now...
victoriousa at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
ahem....my duke dollars....sooo..?just kidding!!:-)
KayDeEa at 2007-7-8 22:06:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...