File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes The type javax.servlet.http.HttpServletRequest cannot be resolved. iIt is ndirectly referenced... 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 » Products » Tomcat
Bookmark "The type javax.servlet.http.HttpServletRequest cannot be resolved. iIt is ndirectly referenced..." Watch "The type javax.servlet.http.HttpServletRequest cannot be resolved. iIt is ndirectly referenced..." New topic
Author

The type javax.servlet.http.HttpServletRequest cannot be resolved. iIt is ndirectly referenced...

p hasini
Ranch Hand

Joined: Oct 24, 2009
Posts: 92

I am using Tomcat6.0.18 and Struts2 and Eclipse Galileo.
When I run the application it is displaying the following error.



exception

javax.servlet.ServletException: Filter execution threw an exception

root cause

java.lang.Error: Unresolved compilation problems:
The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files
The import javax.servlet.http.HttpServletRequest cannot be resolved
The import javax.servlet.http.HttpSession cannot be resolved
HttpServletRequest cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpSession cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletRequest cannot be resolved to a type

com.cmc.apard.actions.MiscellaneousBillsAction.<init>(MiscellaneousBillsAction.java:1)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:532)
java.lang.Class.newInstance0(Class.java:372)
java.lang.Class.newInstance(Class.java:325)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:119)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:150)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:139)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:109)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:287)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:387)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)



How to resolve this error
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

did you put servlet and jsp jar into your class path?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The type javax.servlet.http.HttpServletRequest cannot be resolved. iIt is ndirectly referenced...
 
Similar Threads
problem with starting Struts2
The server encountered an internal error () that prevented it from fulfilling this reque:
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
Exception in Struts namespace
Spring error when injecting beans