F
fanciex
Unregistered / Unconfirmed
GUEST, unregistred user!
用JCreator2.5编译一个Servlet出错如下,用jb8可编译。我想可能是jCreator配置有问题,如何解决呀?
--------------------Configuration: JDK version 1.4 <Default>--------------------
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:8: package javax.servletdo
es not exist
import javax.servlet.*;
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:9: package javax.servlet.httpdo
es not exist
import javax.servlet.http.*;
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:17: cannot resolve symbol
symbol : class HttpServlet
location: class HelloWorldExample
public class HelloWorldExample extends HttpServlet {
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:20: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorldExample
public voiddo
Get(HttpServletRequest request,
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:21: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorldExample
HttpServletResponse response)
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:22: cannot resolve symbol
symbol : class ServletException
location: class HelloWorldExample
throws IOException, ServletException
^
6 errors
Process completed.
--------------------Configuration: JDK version 1.4 <Default>--------------------
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:8: package javax.servletdo
es not exist
import javax.servlet.*;
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:9: package javax.servlet.httpdo
es not exist
import javax.servlet.http.*;
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:17: cannot resolve symbol
symbol : class HttpServlet
location: class HelloWorldExample
public class HelloWorldExample extends HttpServlet {
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:20: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorldExample
public voiddo
Get(HttpServletRequest request,
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:21: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorldExample
HttpServletResponse response)
^
C:/Tomcat 4.1/webapps/examples/WEB-INF/classes/HelloWorldExample.java:22: cannot resolve symbol
symbol : class ServletException
location: class HelloWorldExample
throws IOException, ServletException
^
6 errors
Process completed.