wood burning stoves 2.0*
The moose likes Servlets and the fly likes Running servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Running servlets" Watch "Running servlets" New topic
Author

Running servlets

Claudia Vaz
Ranch Hand

Joined: Nov 13, 2001
Posts: 44
Hi
I'm trying to run a servlet in Tomcat but i'm not hving much sucess.
In the classpath i have ".;c:\jdk1.3.1\src.jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\lib\tools.jar;c:\jdk1.3.1\lib\dt.jar,c:\jdk1.3.1\jre\lib\i18n.jar,c:\jakarta-tomcat-3.2.3\lib\servlet.jar" which has the path to the servlet.jar.
My servlet is in the directory TomcatHome/webapps/mydev/web-inf/classes.
When in this directory i execute the command
javac servletName.java
errors occurs.
Some of these error are:
"ServletName.java:1 cannot resolve symbol
symbol : class HttpServletResponse
location: class servletName
HttpServletResponse res)"
I think he does not recognize the servlet.jar

What i am doing wrong??? Does anynone can hep me!!!
Thanks
Claudia
Sagar Bilgi
Ranch Hand

Joined: Apr 26, 2001
Posts: 37
HI claudia,
see my post in the same forum with topic " compiling servlets under tomcat 4.0"
As was suggested to me by mike I would specify the classpath of the servlet.jar when u are tryong to compile
ex javac - classpath "path to servlet.jar" yourfile.java
hope this helps..
Sagar
 
jQuery in Action, 2nd edition
 
subject: Running servlets
 
Similar Threads
servlet will not compile aargh
failed to compile servlet file
new to Tomcat and JSP&Java Servlet,pls help
How to compile Servlets
Error compoling servlets