How to set the classpath for servlet and jsp???
843841Oct 27 2007 — edited Nov 19 2007i add C:\tomcat-5.0\common\lib\servlet-api+jsp-api to the class path from DOS prompt, as show below:
set CLASSPATH=%classpath%;C:\tomcat-5.0\common\lib\servlet-api.jar;C:\tomcat-5.0\common\lib\jsp-api.jar
then, i compile the servlet:
javac FirstServlet.java
no error
and i copy the .class file into C:\tomcat-5.0\webapps\servlets-examples\WEB-INF\classes
i set the JAVA_HOME enviroment variable as below:
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_08
i start the tomcat version 5.0 and run web browser and type http://localhost:8080/servlets-examples/servlet/FirstServlet
i get the error message:
HTTP Status 404 - /servlets-examples/servlet/FirstServlet
type Status report
message /servlets-examples/servlet/FirstServlet
description The requested resource (/servlets-examples/servlet/FirstServlet) is not available.
Apache Tomcat/5.0.30
Can anybody tell me how to solve the problem. Thanks a lot.