jsp action中的指向找不到在哪定义的

来源:百度知道 编辑:UC知道 时间:2024/06/20 21:14:18
<c:if test="${pageContext.request.queryString == 'login_failed'}">
<div class="error-message"><fmt:message key="loginerror.invalid" /></div>
</c:if>
<form name="login" id="login" method="POST" action="j_security_check">
<div id="login-form">
<table border="0" width="100%">
<tr height="125">
<td colspan="2" align="center"><span class="big-title"><%--<c:out
value="${application.applicationTitle}" />--%></span><br />
<span class="big-subtitle"><%--<c:out
value="${application.applicationSubtitle}" />--%>工作平台</span></td>
</tr>
<tr height="40">
<td align="right" width="119

struts-config里都不配置找得到个毛哦
如果你要action="j_security_check"
就必须要在相应的xml里配置

这个action=j_security_check是在struts-config里面定义的.你这里要写成j_security_check.do,最好加上项目名,你的项目是test的话就是action="/test/j_security_check.do"

如果struts-config里面配置了 还找不到 就在页面加上这两行代码
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head> <base href="<%=basePath%>"></head>