81,094
社区成员
发帖
与我相关
我的任务
分享
<!-- URL Rewrite Filter -->
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>logLevel</param-name>
<param-value>WARN</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Struts 2 Filter -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<urlrewrite>
<rule>
<note>
The rule means that requests to /test/status/ will be redirected to
/rewrite-status
the url will be rewritten.
</note>
<from>/test/status/</from>
<to type="redirect">%{context-path}/rewrite-status</to>
</rule>
<outbound-rule>
<note>
The outbound-rule specifies that when response.encodeURL is called (if you are using JSTL c:url)
the url /rewrite-status will be rewritten to /test/status/.
The above rule and this outbound-rule means that end users should never see the
url /rewrite-status only /test/status/ both in thier location bar and in hyperlinks
in your pages.
</note>
<from>/rewrite-status</from>
<to>/test/status/</to>
</outbound-rule>
<rule>
<from>^/html</from>
<to>/admin/</to>
</rule>
<rule>
<from>^/html/user/login/index.html</from>
<to>/admin/userInfo_userLogin.action</to>
</rule>
</urlrewrite>
<!--
原本应该是:
<form name="loginForm" onsubmit="return checkLogin()" action="userInfo_userLogin.action" method="post">
-->
<form name="loginForm" onsubmit="return checkLogin()" action="user/login/index.html" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="31%" height="35" class="login-text02">用户名:<br /></td>
<td width="69%"><input name="loginName" id="loginName" type="text" size="29" value="admin" style="width:200px;"/></td>
</tr>
<tr>
<td height="35" class="login-text02">密 码:<br /></td>
<td><input name="passWord" id="passWord" type="password" size="30" value="123456" style="width:200px;"/></td>
</tr>
<tr>
<td height="35"> </td>
<td><input type="submit" class="right-button01" value="确认登陆"/>
<input type="reset" class="right-button02" value="重 置" /></td>
</tr>
<tr>
<td height="35" colspan=2 align="center">
<span style="color:red;font-size:14px;font-weight:bold;" id="errorMsg">${loginMsg} <% session.removeAttribute("loginMsg"); %> </span></td>
</tr>
</table>
</form>
<script type="text/javascript">
window.location = "showIndex.action?aid=27&bid=19&cid=14&did=17&eid=16";
</script>