This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes errors!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "errors!!" Watch "errors!!" New topic
Author

errors!!

kumar nagur
Greenhorn

Joined: Oct 22, 2003
Posts: 9
Hai guys,
I have my java in C:\s1studio_jdk\j2sdk1.4.1_02
java and javac are working fine.
I have my tomcat in c
when i tried to compile the program I am getting the following errors.
my program is in first folder.
so,
C:\>cd first
C:\first>javac HelloWorld11.java
HelloWorld11.java:4: package javax.servlet does not exist
import javax.servlet.*;
^
HelloWorld11.java:5: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloWorld11.java:7: cannot resolve symbol
symbol : class HttpServlet
location: class HelloWorld11
public class HelloWorld11 extends HttpServlet {
^
HelloWorld11.java:9: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorld11
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
HelloWorld11.java:9: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorld11
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
HelloWorld11.java:10: cannot resolve symbol
symbol : class ServletException
location: class HelloWorld11
throws IOException, ServletException
^
6 errors
Sunil Karumuri
Greenhorn

Joined: Oct 20, 2003
Posts: 3
Add servlet.jar to the classpath.
It should be under <TOMCAT_HOME>\common\lib
The servlet API is not part of standard J2SE.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: errors!!
 
Similar Threads
please help...new to servlets
urgent help needed
How to Deploy servlet using Tomcat 5
compilation error while running simple servlet code
error with compiling servlet