【struts1.2】我又测试不通了..
之前有个问题,也是我问的已经解决了。
http://topic.csdn.net/u/20110922/11/f33791c6-ff7d-4f75-9424-34770c5b01cd.html
现在又出现另一个问题了...我完全按照之前的写法写的,主页能进去但是每次提交就不行了.
上代码
form
web.xml
struts-config.xml
LoginAction.java
每次点提交就会在这个页面
http://localhost:8080/LoginAction.do?method=Login
然后一片空白,myeclipset的控制台也不报错...
而且我想在LoginAction中用System.out.println("1")也不出东西,看来是没有进入Action啊
求指点啊...
http://topic.csdn.net/u/20110922/11/f33791c6-ff7d-4f75-9424-34770c5b01cd.html
现在又出现另一个问题了...我完全按照之前的写法写的,主页能进去但是每次提交就不行了.
上代码
form
<form id="form1" name="login" method="post" action="/LoginAction.do?method=Login">web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Login.jsp</welcome-file>
</welcome-file-list>
</web-app>struts-config.xml
<?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></data-sources>
<global-exceptions></global-exceptions>
<global-forwards></global-forwards>
<action-mappings>
<action path="/LoginAction" type="com.dsxx.Action.LoginAction"
parameter="method">
<forward name="loginsuccess" path="/index.jsp"></forward>
<forward name="loginfail" path="/fail.html"></forward>
</action>
</action-mappings>
</struts-config>
LoginAction.java
package com.dsxx.Action;
import javax.servlet.http.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action{
public ActionForward Login(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
ActionForward forward=new ActionForward();
forward=mapping.findForward("loginfail");
return forward;
}
}每次点提交就会在这个页面
http://localhost:8080/LoginAction.do?method=Login
然后一片空白,myeclipset的控制台也不报错...
而且我想在LoginAction中用System.out.println("1")也不出东西,看来是没有进入Action啊
求指点啊...
...全文
相关推荐
Struts 1.2 如何测试ActionPDF
这是来自于老师的,他把博客上的内容做成PDF给我们,在此上传,大家可以免费下载,给大家提供个方便,希望大家多多光临,留个言哈...
struts2测试工具
具体做什么用的,忘记了,各位随意下载~~~~~~~~~~~~~~~~~~~~~不知道什么鬼策略,莫名把下载积分提了这么高.~~~
struts1和struts2的区别
struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别
测试struts2中action
测试struts2中的action
Migrating From Struts1 To Struts2
MigratingFromStruts1ToStruts2.pdf


