"Cannot resolve symbol" error when compiling servlet using Tomcat5.0
843841May 21 2004 — edited May 21 2004Hi
I am a new user of Tomcat 5.0 and am trying to compile a sample servlet file. However it comes up with the 'Cannot resolve symbol' error pointing towards HTTPServlet, HTTPServletRequest and HTTPServletResponse.
I have set my classpath as an environment variable as follows:
.;%CATALINA_HOME%\common\lib\servlet-api.jar;%CATALINA_HOME%\common\lib\jsp-api.jar;%JAVA_HOME%\bin;%JAVA_HOME%\lib;C:\j2ee1.4\bin;C:\j2ee1.4\lib
The Path has been set to: %JAVA_HOME%\bin;%path%
I am attaching my code as well.
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class TestingServlet extends HTTPServlet
{
public void doGet(HTTPServletRequest request, HTTPServletResponse response) throws ServletException, IOException
{
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>Servlet Testing</TITLE>");
out.println("</HEAD>");
out.println("<BODY>");
out.println("This servlet won't compile!");
out.println("</BODY>");
out.println("</HTML>");
}
}
Could someone please help me with this.
Thanks