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!

HttpServlet cannot be resolved to a type

843841Jan 12 2007 — edited Jan 14 2007
Hey everyone,

Im trying to get a servlet running but I get the following errors

javax.servlet.ServletException: Error instantiating servlet class SimpleXSLTServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
java.lang.Thread.run(Unknown Source)



java.lang.Error: Unresolved compilation problems:
HttpServlet cannot be resolved to a type
ServletConfig cannot be resolved to a type
ServletException cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
ServletException cannot be resolved to a type
The method getServletContext() is undefined for the type SimpleXSLTServlet

SimpleXSLTServlet.<init>(SimpleXSLTServlet.java:23)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
java.lang.Thread.run(Unknown Source)


I already included the servlet/api.jar in the build path, but i dont understand why its not working with that. Im running a tomcat 6.0.2.

any help would be appreciated!
thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2007
Added on Jan 12 2007
3 comments
930 views