I am new to struts2. I have configured struts2 in eclipse indigo. Now i am trying to run a simple application. I am getting this error. I have pasted the required jar files in lib directory of web-inf folder(commons-logging-1.0.4, freemarker-2.3.16, ognl-3.0, struts2-core-2.2.1.1 and xwork-core-2.2.1.1). Please let me know where am i missing.
Find the error that i am getting. Thanks in advance.
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:457)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:105)
org.apache.jsp.index_jsp._jspService(index_jsp.java:75)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.12 logs.
palanisamy subramani
Greenhorn
Joined: Aug 30, 2010
Posts: 29
posted
0
Could you please give more information, like struts.xml code etc..
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
leo jacob
Greenhorn
Joined: May 02, 2011
Posts: 14
posted
0
Thanks Mohan and Subramani for the reply. The problem got resolved. It was an issue with web.xml.
Ganiyu Shefiu
Greenhorn
Joined: Dec 17, 2005
Posts: 9
posted
0
hi Arjun,
i have been battling with same error for days. could you please show me how you resolved it . your web.xml
Thanks for your anticipated response.
Gani
leo jacob
Greenhorn
Joined: May 02, 2011
Posts: 14
posted
0
Hi Gani,
Check whether your application is able to read web.xml. Make sure your web.xml is in Web-Inf folder. If both the things are ok then paste the error and web.xml with your issue.
Ganiyu Shefiu
Greenhorn
Joined: Dec 17, 2005
Posts: 9
posted
0
hi Arjun,
thank you for your reply to my post.
Yes my application is able to read web.xml which i placed in web-inf folder.
i am using struts 2.2.3 and glassfish 3.1 is my application server.
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
root cause
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1 logs.
i am facing the same issue,i downloaded struts 2.2.3 , glassfish 3.1 with latest JDK n Eclipse Indigo...
when i am running a sample exception i am getting the following error == HTTP Status 500 - org.apache.jasper.JasperException: The Struts dispatcher...
Below is my web.xml followed by struts.xml .. any help would be gr888...
--------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>Struts2Validations</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>pkg1.actions</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>