Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2.0+jsp error

 
vineet walia
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 247
Java MyEclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic