struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s-sbergg <s-sbe...@haw-landshut.de>
Subject The Struts dispatcher cannot be found.
Date Wed, 10 Oct 2018 03:33:10 GMT
Hello,
Struts version 2.5.17

I am trying to setup struts 2 on tomcat, but there is coming up an 
error. The .jsp was opened directly. If there are more files needed to 
figure out what is wrong, feel free to ask.

Error-message:

HTTP Status 500 – Internal Server Error

Type Exception Report

Message An exception occurred processing JSP page /web/welcome.jsp at 
line 15

Description The server encountered an unexpected condition that 
prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing JSP 
page /web/welcome.jsp at line 15

12:     <title>Welcome</title>
13: </head>
14: <body>
15: Hello User: <s:property value="name"/>
16: </body>
17: </html>


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:594)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:491)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

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:53)
	org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:40)
	org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:45)
	org.apache.jsp.web.welcome_jsp._jspx_meth_s_005fproperty_005f0(welcome_jsp.java:131)
	org.apache.jsp.web.welcome_jsp._jspService(welcome_jsp.java:95)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:453)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)


web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="my" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
          version="4.0">

     <display-name>Archetype Created Web Application</display-name>
     <filter>
         <filter-name>struts2</filter-name>
         
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
     </filter>
     <filter-mapping>
         <filter-name>struts2</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
     <jsp-config>
         <taglib>
             <taglib-uri>struts-tags.tld</taglib-uri>
             
<taglib-location>/WEB-INF/lib/struts2-core.jar</taglib-location>
         </taglib>
     </jsp-config>
     <welcome-file-list>
         <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
</web-app>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message