出现的问题:
message No action instance for path /Admin/login could be createddescription The server encountered an internal error (No action instance for path /Admin/login could be created) that prevented it from fulfilling this request.这是怎么回事啊,我仔细检查了自己的路径 没有问题啊
message No action instance for path /Admin/login could be createddescription The server encountered an internal error (No action instance for path /Admin/login could be created) that prevented it from fulfilling this request.这是怎么回事啊,我仔细检查了自己的路径 没有问题啊
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"><struts-config>
<data-sources />
<form-beans >
<form-bean name="loginForm" type="com.struts.form.LoginForm" />
</form-beans> <global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="loginForm"
input="/Admin/adminLogin.jsp"
name="loginForm"
parameter="method"
path="/Admin/login"
scope="request"
validate= "true"
type="com.struts.action.AdminLoginAction">
<forward name="logoutSuccess" path="/Admin/toLogin.html" />
<forward name="loginSuccess" path="/Admin/adminIndex.jsp" />
</action>
</action-mappings>
<message-resources parameter="com.struts.ApplicationResources" />
<!--配置struts-menu插件-->
<plug-in className="net.sf.navigator.menu.MenuPlugIn">
<set-property property="menuConfig" value="/WEB-INF/menu-config.xml"/>
</plug-in>
<!--配置Validator插件-->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml" />
<set-property property="pathnames" value="/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>
如果是,从这个页面发送的请求还能跳转到此页面么?想想!!!。。
把这句话删了
后面没有在转到adminLogin.jsp啊,是adminIndex.jsp页面啊~
<action
attribute="loginForm"
input="/Admin/adminLogin.jsp"
name="loginForm"
parameter="method"
path="/Admin/login"
scope="request"
validate= "true"
type="com.struts.action.AdminLoginAction">
<forward name="logoutSuccess" path="/Admin/toLogin.html" />
<forward name="loginSuccess" path="/Admin/adminIndex.jsp" />
</action>这里的path如果是path="/Admin/login",path="/Admin/toLogin.html" 等,都使用一级路径,即改成类似path="/Admin",登录成功后的路径为path="/toLogin.jsp";
http://explorer1987.javaeye.com/blog/286438