struts问题:找不到该网页
在struts-config.xml里面已经配好了,可是出现始终是找不到该网页,请问是怎么回事啊?怎么解决啊?
比如在一个login.jsp里面有<html:link action="/login">list</html:link>
然后在struts-config.xml里面有
<form-beans>
<form-bean name="demoForm" type="com.demo.struts.action.DemoForm" />
</form-beans>
<action-mappings>
<action path="/login"
type="com.demo.struts.action.LoginAction"
attribute="demoForm"
scope="request"
validate="false">
<forward name="failure" path="/index.jsp"/>
<forward name="success" path="/list.jsp"/>
</action>
</action-mappings>
而在LoginAction.java里面有
package com.demo.struts.action;
import java.sql.*;
import java.util.*;
import javax.servlet.http.*;
public class LoginAction extends Action {
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception{
return (actionMapping.findForward("success"));
}
}