繁体   English   中英

Struts错误:无法找到Struts调度程序

[英]Struts Error: The Struts dispatcher cannot be found

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]
        at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
        at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
        at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
        at jsp_servlet.__login._jsp__tag0(__login.java:115)
        at jsp_servlet.__login._jspService(__login.java:84)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
        at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

是什么导致这种情况,我该如何解决?

堆栈跟踪似乎确认了异常消息的解释:您可能尝试呈现login.jsp页面,并且此JSP使用一些struts标记。 但由于请求没有通过Struts过滤器,标签无法正常工作。

在Struts(以及所有其他基于动作的框架AFAIK)中,每个URL(图像,脚本等静态资源除外)都应指向cettral servlet或过滤器,后者将分派给您的动作,该动作本身将转发给JSP。 如果直接调用JSP,则不再是MVC,并且标记无法工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM