你的struts.config 里面关于这个action的配置
解决方案 »
- java 一个单选按钮可以同时帮定 onclick 和onchange事件吗 急!!
- 学习 基于J2EE的教务管理系统
- ###跪求高手####
- 如何实现两台内网服务器一个域名 实现内外网同时访问两台服务器
- 后台输出正常,跳转到页面就乱码,都是用一套框架,只有这一个表如此
- spring AOP 的关注点
- 分不够了但还是希望能够帮忙!我这里有一个album实体类和picture实体类,两个相互关联,在jsp页面中怎么根据album的到他的第一个pictureId呢
- 问一个关于Arraylist和树形菜单的问题。
- 求Tomcat5.0.28版,在线等!
- filter和struts的问题?
- spring可以运行在apache服务器下吗
- 打听个消息,Hibernate有没有支持Java 6的计划?
<!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>
<form-beans>
<form-bean name="actionForm" type="jbstruts.myActionForm" />
</form-beans>
<action-mappings>
<action name="actionForm" type="jbstruts.UserLoginAction" validate="true" input="/userLogin.jsp" scope="request" path="/UserLoginAction">
<forward name="loginSuccess" path="/bosom.jsp" />
<forward name="loginFailure" path="/failure.jsp" />
</action>
<action name="actionForm" type="jbstruts.IndexAction" validate="true" input="/bosom.jsp" scope="request" path="/indexAction">
<forward name="success" path="/display.jsp" />
<forward name="failure" path="/failure.jsp" />
</action>
</action-mappings>
</struts-config>
{ //这一句把用户名传给下一页
userLoginForm.setLastName(userName);
userLoginForm.setPassword(password);
System.out.println("11111111111111");
return (actionMapping.findForward("loginSuccess"));
}
else
{
System.out.println("22222222222"); return (actionMapping.findForward("loginFailure"));
} 加上两行调试信息 看看跳到哪里
LZ的UserLoginAction是从Action继承出来的,Action默认执行的方法是execute方法,所以perform没有被执行。可以从DispatchAction继承,然后在form中指定执行perform方法。<action name="actionForm" type="jbstruts.UserLoginAction" validate="true" input="/userLogin.jsp" scope="request" path="/UserLoginAction" parameter="method">
<html:hidden property="method" value="perform"/>
return new ActionForward(actionMapping.getInput()); // 返回到初始
在form里加入了<html:hidden property="method" value="perform"/>
重启了下Tomcat 可是还是不行 浏览器还是空白
地址栏显示如下
http://127.0.0.1:8080/strutsdemo/UserLoginAction.do;jsessionid=6AFA5E8B42D157A42E75CFF67C5FAC54我再试试7楼的
你extends action就只能用execute,他默认的
只有你extends despathchaction指定parameter才可以用别的名称作为方法名的...
把我们丢到凉快点的地方去怎么样,比如,非洲?
hey, this man was still white this morning!
嘿,早上这哥们还是个白人呢!
在Fox River的每一天,他都希望Susan在洗完碗筷后能轻轻展开他的信,默默地读:“There was a candle in the window, just waitin' for me to walk up them front steps. When I wake up from nightmare, I feel I still love you, Susan.” T-bag: You think you are the only one who feels betrayed? I…lovedyou, Susan. Real love. For the first time in my life... And then…andthen what you do to me like that just throw me back into the dark andtoss me out of the back door...I have sins in the past. But when I metyou, the person, that one who did all the terrible things, he died. AndI was reborn. By the grace of your love I was a new man, a better man.When you sent me here to this place with these people, you bring thatdirty bastard right home.
你认为只有你觉得被人背叛了吗?我曾经爱过你,Susan.我生命中的第一次真爱。而你。。而你所做的,却是把我扫地出门,重新赶回黑暗之中。我过去是有过罪恶,但当我遇见你的那一刻,那个做尽坏事的人就已经死了,而我则获得了重生。在你爱情的光辉中,我成了一个新的人,一个更好的人。当你把我送进这里,与这些人为伍时,过去那个肮脏的罪人又将复活。
天堂与地狱的一线之隔,原来是爱。