struts1/2?
不就是一个forward或者result么?
这都搞不清楚?

解决方案 »

  1.   

    //Action里面把对象设置到Session
    request.getSession().setAttribute("对象", 对象名);页面取值
    对象.属性名
      

  2.   

    在struts-config.xml的<forward name="" path=""/> 
    在path中写你想要转到达的.jsp页面了
      

  3.   

    这是action里RegForm regForm = (RegForm) form;
    request.setAttribute("regForm", regForm);
    return new ActionForward("/regResult.jsp");页面 
    <%RegForm regForm = (RegForm)request.getAttribute("regForm"); %>
    帐号:<%=regForm.getAccount() %><BR>
    密码:<%=regForm.getPassword() %><BR>
    个人信息:<%=regForm.getInfo() %><BR>
    隐藏表单:<%=regForm.getHiddenInfo() %><BR>
    性别:<%=regForm.getSex() %><BR>
    来自:<%=regForm.getHome() %><BR>
    爱好:<%
    String[] fav = regForm.getFav();
    for(int i=0;i<fav.length;i++){
    out.println(fav[i]);
    }
     %><BR>
     是否会员:<%=regForm.isInteam() %><BR>
     喜爱的书本:<%
    String[] books = regForm.getBooks();
    for(int i=0;i<books.length;i++){
    out.println(books[i]);
    }
     %>我很懒,随便粘贴的,都是初学者,加油
      

  4.   

    在Action里面存值在想要的作用域中,然后在页面去取值.在页面里可通过"EL表达式,Jsp标准动作,<%= %>,Struts自带标签..."一些方法去取值.
      

  5.   

    在Action里面存值在想要的作用域中,然后在页面去取值.在页面里可通过"EL表达式,Jsp标准动作,<%= %>,Struts自带标签..."一些方法去取值.
      

  6.   

    struts1 : action 中: request.setAttribute("name", username);    
         jsp中 :<%=request.getAttribute("name")%>struts2 在action 中定义属性时,加上它的set、get方法,在页面就可以直接取,例如:
    action 中  private String username; public void setUsername(String username){
           this.username=username;
      } public String getUsername(){
           return username;
      }jsp中 
    ${username} 就可以得到在action中username的值
      

  7.   

    看一些网上的教程,里面有很详细的解释。推荐http://bbs.langsin.com/
      

  8.   

    写出来。在CreateAction里面的execute()的return之前写上request.setAttribute("list",jsp页面要的东西);return new ActionForward("/页面名.jsp");    (在工程的跟目录)即WEB-INF下面。这总知道吧干脆用脚本算了
    jsp页面
    <%
       Object obj = request.getAttribute("list");
    %>