<form action="<%=request.getContextPath() %>/querystu.do?select=chuan" method="post"> querystu.do?select=chuan 你用的是struts1是吧! 用select接收值,在action中封装select 这样就可以得到你传过来的值chuan了或者用bean 假设:一个student bean 属性 name age sex bean中封装 name age sex 如果用 hibernate 会自动封装 jsp的action提交的时候可以写个隐藏的text text的name=student.name 只要在action中封封装一下bean get一下就好了 不需要set
另外 你在action不是封装了qsname ,其实可以直接拿来用的。。
querystu.do?select=chuan
你用的是struts1是吧!
用select接收值,在action中封装select 这样就可以得到你传过来的值chuan了或者用bean
假设:一个student bean 属性 name age sex
bean中封装 name age sex 如果用 hibernate 会自动封装
jsp的action提交的时候可以写个隐藏的text text的name=student.name
只要在action中封封装一下bean get一下就好了 不需要set
HttpServletRequest request, HttpServletResponse response)
throws Exception {
PrintWriter out=response.getWriter();
QSForm fm = (QSForm )form;
out.print("NUll???????????//"+fm.getQsname());
return null;
}大体上是这么个意思,好久没写代码了