在struts1中,,可以在Actionfrom中设置默认值
前台会有效,
但struts2.0中没有ActionForm中,应该怎么设置
才能在访问jsp前得到actionfrom中getter的值

解决方案 »

  1.   

    你是不是没有学过struts2呀
    PO
    public class Dept{
     String deptid; 
     String deptname;
    public Dept(){
     }
    getter,setter 
    }
    public class deptAction extends ActionSupport{
     Dept dept;//PO  
      setter ,getter
     public String dept(){
      return SUCCESS;
    }
    }
    你在页面直接可以用${dept.deptid},${dept.deptname}
    去看我的资源,有很多struts2.x hibernate3.x spring2.x的项目,相信对你有用
      

  2.   

    不知道你所学的指的是什么??
    我是才学struts2的,谢谢你资源
      

  3.   

    那你是意思说还是将form与action分开了
      

  4.   

    <s:property value='subSystemHtml' escape="false"/>
    "subSystemHtml"->action の property