This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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
Exception in Struts namespace
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
Spring error when injecting beans
The server encountered an internal error () that prevented it from fulfilling this reque: