JSP页面获取值 public class MovieForm extends ActionForm(){ String mName="2012"; public String getMName(){ return mName;}public void setMName(){this.mName=mName;}}能不能把2012 显示在jsp页面上 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不能。因为你的第二个字母N是大写得。在get/set方法中,只要前两个字母是大写,默认认为你的整个private变量就是全部大写。你改一下mName->MNAME。或者mName->mname,并修改相应得get/set,之后就跟其他得一样。 简单点就request.setAttribute(arg0, arg1)String username=request.getParameter(arg0); <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写法变了。 一楼说的是对的吗,用了好久的struts,不知道有这说法 解决S2SH问题 jquery ajax如何进行跳转 SinaEditor编辑器添加中文字体乱码 ssh+mysql 开发的网站需要注意什么? 怎样在JSP中调出数据库中的值并显示出来? URLEncoder.encode(str, "utf-8") 错误怎么解决 请教在jsp中怎么调用存储过程和执行存储过程? 北京2年java经验 求兼职 怎样把多幅图合成一幅 Web应用选择JavaBean和EJB的理由分别是什么? 在线等:JSP空指针错误 实习8个月,等到拿到毕业证才能转正该不该去
enctype="multipart/form-data">
<html:hidden property="functionName" />
<html:hidden property="functionData" />改了之后,这种方式即可。
form得action对应struts-config.xml对应得action,property="functionData"属性对应直接得你那个mname1.1得,2.×差不多,无非就是action写法变了。