在Action的执行方法中
return null;
就会一片空白

解决方案 »

  1.   

    struts配置里的result里的name里的值和action里的没有对上吧!!
      

  2.   

    没有任何异常信息,显示空白页面
    可能是Action里使用的forward与struts-config.xml里定义的forward名称不匹配。
      

  3.   

    public ActionForward execute(ActionMapping mapping, LogInForm form,
    HttpServletRequest request, HttpServletResponse response) { // Locale locale = getLocale(request);
    // MessageResources messages = getResources(request);
    // HttpSession session = request.getSession(); LogInForm logIn = (LogInForm) form;// TODO Auto-generated method stub System.out.println("userForm is:" + logIn.getUserName());
    String userName = logIn.getUserName();
    if (logIn.getUserName() == "success") { return (mapping.findForward("success"));
    } else {
    System.out.println(logIn.getUserName());
    return (mapping.findForward("error"));
    } }
    action里的跳转也面的代码。没有return null;啊
      

  4.   

    <?xml version="1.0" encoding="UTF-8"?>
    <!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="logInForm" type="com.dong.struts.form.LogInForm" />  </form-beans>  <global-exceptions />
      <global-forwards />
      <action-mappings >
        <action
          attribute="logInForm"
          name="logInForm"
          path="/login"
          scope="request"
          type="com.dong.struts.action.LoginAction">
          <forward  name="error" path="error" redirect="true" />
          <forward  name="success" path="/success" redirect="true" />
        </action>  </action-mappings>  <message-resources parameter="com.dong.struts.ApplicationResources" />
    </struts-config>
    配置文件应该也没问题把。 <form method = "post" name = "login" action="login.do">

        name:<input type ="text" name = "name"><br>
        password:<input type ="password" name = "password"><br>
        <input type = "submit" name ="submmit" value = "submit">
        </form>
    这个是那个登陆时的form.....
      

  5.   

    struts配置里的result里的name里的值和action里的没有对上吧!!
      

  6.   

    我怎么看不明白啊没找到什么result....请明示下哦
      

  7.   

    <forward  name="error" path="error" redirect="true" /> 
    <forward  name="success" path="/success" redirect="true" />
    你配置文件forwar path属性你这是写的什么呢?路径有问题啊 jsp页面的话肯定是.jsp结尾,action的话也得是.do结尾啊 
      

  8.   


    ye 正解
    ----------------------------------------------------------------------
                         Quietly through  .....
      

  9.   

        我也遇到同样的问题了诶,action更不就没进去。但是地址栏变成了.do ,