你要看你的struts-config.xml配置文件的路径对不对。
解决方案 »
- struts2调用action后,怎么返回原来页面
- 一个奇怪的页面问题
- 请教 自学JAVA的书
- struts+spring+hibernate 操作据越来越慢
- spring+struts中找不到action,怎么弄啊,
- eclipse平台下开发得新版velocity+webwork+hibernate例子程序。供初学者下载研究。(来者有分)
- 求installanywhere的下载地址
- 求助 关于WebLogic 7 的问题
- 请问:可以在EJB里打开一个SOCKET与另一个地点的SERVER上的SERVLET通信吗?
- Mac 下无法启动JAVA JAR文件
- 如何在Action中调用webservice服务?
- java.lang.IllegalStateException: getOutputStream() has already been called for this response
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><struts-config>
<data-sources /> <form-beans>
<form-bean name="login/LoginAF"
type="com.swei.web.login.LoginAF" />
</form-beans> <global-exceptions /> <global-forwards>
<forward name="login" path="/login.jsp" />
<forward name="index" path="/index.jsp" />
</global-forwards> <action-mappings>
<action name="login/LoginAF" scope="request" parameter="method"
path="/login/LoginAction" type="com.swei.web.login.LoginAction">
<forward name="succeed" path="/index.jsp" />
</action>
</action-mappings> <message-resources className="org.apache.struts.action.ActionMessages" parameter="com.swei.commons.properties.ApplicationResources" /> <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
<!--
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
</plug-in>
-->
</struts-config>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><struts-config>
<data-sources /> <form-beans>
<form-bean name="login/LoginAF"
type="com.swei.web.login.LoginAF" />
</form-beans> <global-exceptions /> <global-forwards>
<forward name="login" path="/login.jsp" />
<forward name="index" path="/index.jsp" />
</global-forwards> <action-mappings>
<action name="login/LoginAF" scope="request" parameter="method"
path="/login/LoginAction" type="com.swei.web.login.LoginAction">
<forward name="succeed" path="/index.jsp" />
</action>
</action-mappings> <message-resources className="org.apache.struts.action.ActionMessages" parameter="com.swei.commons.properties.ApplicationResources" /> <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
<!--
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
</plug-in>
-->
</struts-config>
直接后右面的parameter就可以了。