public class MovieForm extends ActionForm(){
  String mName="2012";
  
public String getMName(){
  return mName;
}
public void setMName(){this.mName=mName;}
}
能不能把2012 显示在jsp页面上 

解决方案 »

  1.   

    不能。因为你的第二个字母N是大写得。在get/set方法中,只要前两个字母是大写,默认认为你的整个private变量就是全部大写。你改一下mName->MNAME。或者mName->mname,并修改相应得get/set,之后就跟其他得一样。
      

  2.   

    简单点就request.setAttribute(arg0, arg1)String username=request.getParameter(arg0); 
      

  3.   

    <html:form action="/chapter/chapter.do" method="POST"
    enctype="multipart/form-data">
    <html:hidden property="functionName" />
    <html:hidden property="functionData" />改了之后,这种方式即可。
    form得action对应struts-config.xml对应得action,property="functionData"属性对应直接得你那个mname1.1得,2.×差不多,无非就是action写法变了。
      

  4.   

    一楼说的是对的吗,用了好久的struts,不知道有这说法