Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

"Cannot resolve symbol" error when compiling servlet using Tomcat5.0

843841May 21 2004 — edited May 21 2004
Hi

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2004
Added on May 21 2004
3 comments
291 views