第1个回答 2012-03-08
如果你用的是servlet,用request对象的方法根据name去取就是了
如果用的struts,在action中定义全局变量并生成get/set方法
例如: location.href="test.action?name1=canshu1&name2=canshu2"|
在action中定义name1,name2就可以了
如果是其他的编程方式请请教别大虾本回答被提问者采纳
第2个回答 2012-03-08
用session可以传
<% session.setAttribute("mycompany",myCompany) %>
想写哪就写哪,呵呵
楼上的老抢我生意啊
session不好的话就用request.
<% request.setAttribute("mycompany",myCompany) %>
然后在servlet 的doPost()方法里
request.setAttribute("mycompany",request.getAttribute("mycompany",myCompany));
这样应该就可以了,不过我觉得麻烦啊