第二个好象是bean与JSP里的属性对应关系不对,
第一个你打出来看看是不是乱码造成的问题
第一个你打出来看看是不是乱码造成的问题
解决方案 »
- 刚学struts2 按照书上说的,启动tocmat时候出了如下问题
- 关于webservice的问题
- java开发一个网站,要有站内搜索功能,请问前辈们这个怎么做啊
- SSH下如何配置多个数据库之间数据表关联查询?
- Ajax + struts 的问提
- 想转行做java搞web,请教高手介绍学习路径。
- 郁闷了一个星期的strust配置后的启动问题
- 哪里有 Struts 的开发资料下载版的。
- 在程序中如何自动把PNG图转成JPG图呢。。相反也是~~
- Struts环境配置手顺(eclipse版),包括SQL Server的连接!
- Hibernate中merge与update的区别???
- hibernate新手,关于插入数据
ygjbxx的属性:ygxxbh,xm,yhbh、、、、、、、
xtyhb:yhbh,yhmc、、、、、、
yhjs:yhbh,jsbh、、、、、、
xtjsb:jsbh,jsxm、、、、、、
这是access类
public static List getJsxxs(String cond){
String sql="select D.jsbh,D.jsmc from ygjbxx A,xtyhb B,yhjs C,xtjsb D where A.ygxxbh=B.ygxxbh and B.yh=C.yh and C.jsbh=D.jsbh "+cond;
System.out.println(sql);
return Java_reflect.GetBeanList(sql,XtjsbActionForm.class);}public static List getYhjsxxs(int ygxxbh){
//String sql="select D.jsbh from ygjbxx A,xtyhb B,yhjs C,xtjsb D where A.ygxxbh=B.ygxxbh and B.yh=C.yh and C.jsbh=D.jsbh and A.ygxxbh="+ygxxbh;
String sql="select C.jsbh from ygjbxx A,xtyhb B,yhjs C where A.ygxxbh=B.ygxxbh and B.yh=C.yh and A.ygxxbh="+ygxxbh;
System.out.println(sql);
OpenDB open=new OpenDB("sqlserver");
return open.getColList(sql);在XtjsbActionForm里只添加了两个属性jsbh,jsxm
public class YginfoAction extends DispatchAction {
public ActionForward getFirstPage(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {
//YginfoActionForm form = (YginfoActionForm) actionForm;
List list=YginfoAccess.getYginfos("");
request.setAttribute("yginfos",list);
return mapping.findForward("yginfo");
}
public ActionForward operateUpdate(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {
int ygxxbh=Integer.parseInt(request.getParameter("ygxxbh"));
YginfoActionForm form=YginfoAccess.getOneYginfo(ygxxbh);
request.setAttribute("oneyginfo",form);
List htmloptionlist=BmxxAccess.getBMHttpOptionList();
request.setAttribute("htmloptionlist",htmloptionlist);
return mapping.findForward("ygupdate");
}
public ActionForward operateJsxx(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {
YginfoActionForm form = (YginfoActionForm) actionForm;
int ygxxbh=form.getYgxxbh(); List jslist=XtjsbAccess.getJsxxs("");
request.setAttribute("jsxxs",jslist);
List yhjs=XtjsbAccess.getYhjsxxs(ygxxbh);
request.setAttribute("yhjsxxs",yhjs);
return mapping.findForward("xtjsb");
}
public ActionForward executeUpdate(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {
return null;
}
public ActionForward executeYhjsxxs(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {
return null;
}
}