我把重要的都贴出来了,高手帮看看有什么问题,为什么提交后不跳转显示Success.jsp的信息呢?

解决方案 »

  1.   

    没有人帮看看吗?
    提交以后地址变成这样:
    http://localhost:8080/LoginStruts/login.do;jsessionid=C627EA16A71B9BCAA740DDBCEA60DD62但是页面是空白的,
    成功跳转后,应该显示JavaBean的字段值啊!
      

  2.   

    login.jsp<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %><html:html locale="true">
    <head>
    <title>
    <bean:message key="login.jsp.title" />
    </title>
    </head>
    <body>
    <html:errors/>
    <logic:present name="userbean" scope="request">
    <bean:message key="login.jsp.suc" />
    <bean:write name="userbean" property="userName"/>
    </logic:present>
    <html:form action="/login.do" focus="userName">
    <table>
    <tr>
    <td>
    <bean:message key="login.jsp.username" />
    </td>
    <td>
    <html:text property="userName" size="16" maxlength="16"></html:text>
    </td>
    </tr>
    <tr>
    <td>
    <bean:message key="login.jsp.password" />
    </td>
    <td>
    <html:text property="passWord" size="16" maxlength="16"></html:text>
    </td>
    </tr>
    <tr>
    <td>
    <html:submit property="Submit" value="Submit"></html:submit>
    </td>
    <td>
    <html:reset/>
    </td>
    </tr>
    </table>
    </html:form>
    </body>
    </html:html>Success.jsp
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %><html:html locale="true">
    <head>
    <title>
    <bean:message key="login.jsp.title" />
    </title>
    </head>
    <body>
    <logic:present name="userbean" scope="request">
    <bean:message key="login.jsp.suc" />
    <bean:write name="userbean" property="userName"/>
    </logic:present>
    </body>
    </html:html>

      

  3.   


    errors.add("userName", new ActionMessage("login.error.noa", "a"));什么意思啊
    你可以把用户名密码的值在action里输出,。。看是否有值。。
    如果你不加判断用户名为 a,b  ,是不是能正确显示成功页面?
    我也是新手
      

  4.   

    你的Success.jsp和你的其他jsp文件是放在同一个文件夹下不?要不是,就是调用不到它,就只有调用空白了!!!!1
      

  5.   

    哎,自己找到错误了.
    exceute-----> execute写错了也不抱错误,真难找啊!!!
      

  6.   

    是不是你的struts包和你方法里用的方法名版本不一致,也就是说你用的可能是struts1.2的包,但是用的是struts1.0的执行方法,这样也会出现空页面,而且什么错误都不报.
      

  7.   

    我也遇到过版本的问题,但是那是标签库的问题.locale="true"不认识,jsp-config也不认识.
    不过我的这个问题就是因为execute写错了造成的....多谢楼上的提醒..