weblogic 10 + struts 2.1 convention plugin + war 錯(cuò)誤解決方案
這種情況下 會(huì)出現(xiàn) no action found error,或者指找到相應(yīng)的jsp,找不到對應(yīng)的action類,以至于不過action,直接跳轉(zhuǎn)到j(luò)sp的情況,這種情況需要以下步驟來解決:1、更新struts2到最新版,我的是2.1.8
2、項(xiàng)目中src目錄加入 META-INF文件夾,如果你不是直接在war中加入該文件夾,例如:在eclipse中項(xiàng)目的src加入該文件夾,則需要讓該文件夾包含文件,任意一個(gè)文件都可以,這樣export war的時(shí)候才會(huì)export meta-inf文件夾,才會(huì)有效果。
3、配置struts.xml加入如下屬性:
- <constant?name="struts.convention.action.fileProtocols"?value="jar,zip"?/>??
- <constant?name="struts.convention.action.includeJars"?value=".*?/_wl_cls_gen.*?jar(!/)?"?/>??
<constant name="struts.convention.action.fileProtocols" value="jar,zip" /> <constant name="struts.convention.action.includeJars" value=".*?/_wl_cls_gen.*?jar(!/)?" />
問題解決!
posted on 2010-12-24 14:55 duansky 閱讀(574) 評論(0) 編輯 收藏 所屬分類: Java