File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts2.0+jsp error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts2.0+jsp error" Watch "struts2.0+jsp error" New topic
Author

struts2.0+jsp error

vineet walia
Ranch Hand

Joined: Feb 16, 2008
Posts: 138



why it is showing this errro?
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 19

16: </tr>
17: <tr><td>  </td></tr>
18: <tr>
19: <td><c:a href="alias.jsp">Interceptor Example</c:a></td>
20: </tr>
21:
22: </table>

vineet walia
Ranch Hand

Joined: Feb 16, 2008
Posts: 138
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_c_005fa_005f0(index_jsp.java:109)
org.apache.jsp.index_jsp._jspService(index_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Raza Mohd
Ranch Hand

Joined: Jan 20, 2010
Posts: 247

You can use Html anchor for that if you want to display jsp page..
or use Struts anchor if anction to all as its not associated to a struts filter (Controller).

Thanks
Raza!


Good luck!!
A small leak can sink a Gigantic ship.>
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Most likely you are accessing the page without running it through the Struts 2 filter, just like the error message says. You might be accessing the JSP page directly, rather than through an action.

It is a Very Bad Idea to use the "c:" prefix for S2 tags, since "c:" is normally reserved for JSTL core tags. I'd strongly recommend using the standard "s:" or something else unlikely to confuse every JSP developer in the world.
 
GeeCON Prague 2014
 
subject: struts2.0+jsp error