namespace決定來了action的訪問路徑,當namespace=“”時,可以接受所有路徑的action,namespace=“/”,
或者"/xxx,或者"/xxx/yyy",對應的action訪問路徑是/index.action,或者/xxx/index.action,或
者/xxx/yyy/index.action.
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort
()+path+"/";
%>
<base href="<%=basePath%>">
在使用namespace時容易出現路徑問題,在會出現路徑問題的jsp頁面中加上base標簽,就不會了。