invalid path was requested

invalid path was requested 即"無效的路徑被請求"
在根目錄下某個頁面執行一下動作:
<a href="javascript:void(0);" οnclick="top.mainFrame.location.href='${f.url}&flag=1'">對應的鏈接</a>
發生此錯誤,
但是將鏈接地址放在href 即"<a href="${f.url}&flag=1"></a>"中就沒有問題.
<1>因爲,href超鏈接和window中location.href的根路徑地址不一樣,我們可以讓我們的地址後退一級,即加個"../",或者在地址前加個basepath,
即:<a href="javascript:void(0);" οnclick="top.mainFrame.location.href='<%=basepath%>${f.url}&flag=1'">

<a href="javascript:void(0);" οnclick="top.mainFrame.location.href='<%=request.getco%${f.url}&flag=1'">

<2>,可能你的strust1.2配置文件中的path="/xx.do" 和你的請求地址不匹配,

<3>,可能你的strust1.2配置文件中的forward="/url" 路徑不對
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章