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.
找不到頁面
請問這是什麼原因 謝謝
相關文章
- 直播平臺開發,解決蘋果手機裡面的網頁返回不重新整理頁面的問題蘋果網頁
- layui 分頁元件 ,重新整理後返回第一頁問題UI元件
- vantUI應用(Tabbar標籤頁)返回上一頁的失效問題UItabBar
- 使用javaURL從介面頁面中獲得返回值Java
- springboot整合分頁外掛pageHelper 返回全部資料問題Spring Boot
- SpringBoot分頁查詢 頁碼問題導致返回結果數量為0Spring Boot
- 從 URL 到頁面返回的過程?
- Java中形式引數與返回值問題Java
- 解決瀏覽器返回頁面不重新整理的問題瀏覽器
- 有模有樣解決Flutter裡Webview無法訪問HTTP頁面的問題FlutterWebViewHTTP
- vue從其他頁面返回保持上一頁的狀態Vue
- 雲伺服器中iis設定404頁面正常卻返回200狀態碼的問題伺服器
- 關於陣列的物件獲取及排序問題/小程式的多層頁面返回問題陣列物件排序
- 2020-11-19 解決bootstraptable 跳轉返回後到原頁問題bootAPT
- 為什麼單頁面的seo不友好?如何解決這一問題?
- 開放世界遊戲中的原路返回問題或直接傳送問題分析遊戲
- Struts2中Action動態呼叫DMI出現的一個問題
- 關於showModalDialog()對話方塊點選按鈕彈出新頁面的問題
- 微信支付返回-1,問題排查
- Nancy .Net 輕量級mvc框架使用(4)返回資料到頁面的幾種方式NaNMVC框架
- 關於Android中使用BottomNavigationView切換橫屏導致返回主頁的問題AndroidNavigationView
- Flutter 從當前頁面進入一個新的頁面並返回Flutter
- 從列表頁跳轉到詳情頁,返回列表頁時列表頁與之前的狀態相同
- 頁面白屏問題
- vue返回上一頁面如果沒有上一頁面返回首頁Vue
- Go三方庫——structsGoStruct
- Html中引用其他html頁面的幾種方式HTML
- 關於彈窗的內部滑動穿透底層頁面的滑動的問題穿透
- asyUI分頁中,如何實現頁面跳轉,再返回時,...UI
- PHP JSON_decode 返回為 null 問題PHPJSONNull
- Laravel 裡面的 chunk 分塊效率問題Laravel
- Netcore webapi action swagger response返回引數使用匿名型別NetCoreWebAPISwagger型別
- Structs And Interfaces「結構體與介面」Struct結構體
- C++中string轉換為char*型別返回後亂碼問題C++型別
- fiddler 修改請求介面的返回結果
- 一次 nginx 返回 302 問題解決Nginx
- Laravel 集合 where 返回的資料格式問題Laravel
- js-關於iframe:從子頁面給父頁面的控制元件賦值方法JS控制元件賦值
- 如何解決在eclipse中maven工程中建立index.jsp上面的報錯問題EclipseMavenIndexJS