structs中從action返回頁面的問題!
我寫的一個簡單的structs小程式,想從action返回頁面
在structs-config.xml裡配了區域性的forward
<action-mappings >
<action
attribute="wForm"
input="/form/w.jsp"
name="wForm"
path="/w"
scope="request"
type="test.struts.action.WAction" >
<forward name="r" path="/w.jsp" />
</action>
</action-mappings>
在action中寫的是return(mapping.findForward("r"));
執行時報錯如下
java.lang.ExceptionInInitializerError
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1187)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:214)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:120)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3022)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.struts.util.ModuleUtils.(ModuleUtils.java:47)
... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 21 more
如果改成return mapping.findForward("r");
就提示
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
找不到頁面
請問這是什麼原因 謝謝
在structs-config.xml裡配了區域性的forward
<action-mappings >
<action
attribute="wForm"
input="/form/w.jsp"
name="wForm"
path="/w"
scope="request"
type="test.struts.action.WAction" >
<forward name="r" path="/w.jsp" />
</action>
</action-mappings>
在action中寫的是return(mapping.findForward("r"));
執行時報錯如下
java.lang.ExceptionInInitializerError
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1187)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:214)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:120)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3022)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.struts.util.ModuleUtils.(ModuleUtils.java:47)
... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 21 more
如果改成return mapping.findForward("r");
就提示
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
找不到頁面
請問這是什麼原因 謝謝
相關文章
- 請教structs中頁面跳轉的問題Struct
- Structs設計主頁的小問題!急!Struct
- 專案中靜態頁面的安全問題
- 直播平臺開發,解決蘋果手機裡面的網頁返回不重新整理頁面的問題蘋果網頁
- structs2的action實現方式Struct
- 淺談在瀏覽器中輸入URL返回頁面的過程瀏覽器
- layui 分頁元件 ,重新整理後返回第一頁問題UI元件
- 關於Jdon請求彈出新頁面的問題!!!
- 使用javaURL從介面頁面中獲得返回值Java
- 請教:struts中action執行緒安全問題執行緒
- vantUI應用(Tabbar標籤頁)返回上一頁的失效問題UItabBar
- 關於Action中的setAttribute,和session的問題!!!!Session
- 關於action的error問題Error
- 請教高手servlet與JSP頁面的通訊問題?ServletJS
- Struts中的Action跳轉問題!附關鍵程式碼
- Java中形式引數與返回值問題Java
- 求助:初級問題jsp頁面的<select>JS
- 問一個關於SSH整合是在action中應用session的問題Session
- vue從其他頁面返回保持上一頁的狀態Vue
- 開放世界遊戲中的原路返回問題或直接傳送問題分析遊戲
- 解決瀏覽器返回頁面不重新整理的問題瀏覽器
- springboot整合分頁外掛pageHelper 返回全部資料問題Spring Boot
- SPRING整合STRUCTS的小白問題 高手們幫幫忙啊SpringStruct
- 介面的使用注意問題
- 有模有樣解決Flutter裡Webview無法訪問HTTP頁面的問題FlutterWebViewHTTP
- app中無網路頁面的新增APP
- 請問Structs如何捕捉資料庫中prop類的表物件Struct資料庫物件
- ionic3 進子頁面修改資料,帶參返回父頁面的兩種方法
- 關於陣列的物件獲取及排序問題/小程式的多層頁面返回問題陣列物件排序
- SpringBoot分頁查詢 頁碼問題導致返回結果數量為0Spring Boot
- 雲伺服器中iis設定404頁面正常卻返回200狀態碼的問題伺服器
- 從一個問題討論到Decode函式返回值函式
- 解決Spring中ResponseBody返回中文亂碼問題Spring
- 微信支付返回-1,問題排查
- 為什麼單頁面的seo不友好?如何解決這一問題?
- 依然是jivejdon的發帖頁面的空指標異常問題指標
- Struts2中Action動態呼叫DMI出現的一個問題
- jsp頁面中中文亂碼問題JS