2011-02-04 4 views
0
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) 

何が原因ですか?どのように修正できますか?Strutsエラー:Strutsディスパッチャーが見つかりません

答えて

2

スタックトレースは、例外メッセージが説明していることを確認しているようです。おそらく、login.jspページをレンダリングしようとします。このJSPでは、いくつかのstrutsタグが使用されています。しかし、リクエストがStrutsフィルタを通過していないため、タグは機能しません。

Struts(およびその他のアクションベースのフレームワークAFAIK)では、すべてのURL(画像、スクリプトなどの静的リソースを除く)はcebtralサーブレットまたはフィルタを指している必要があります。 JSP。 JSPを直接呼び出すと、それはもはやMVCではなく、タグは機能しません。

関連する問題