A.servlet里面有
String a=request.getParameter("a");
String b=request.getParameter("b");
String c=request.getParameter("c");
最后A.servlet转发到一个b.jsp页面了
b.jsp页面提交到B.servlet
B.servlet需拿到A.servlet里面的 a,b,c 这三个参数查询数据库,怎么拿到这三个参数。
a,b,c 这三个参数 不是数据库的信息 所以不能从数据库查出来转到b.jsp在提交到B.servlet
A servlet:
setParameter("a");
b.jsp:
name="a"
B servlet:
getParameter("a")
I think you should
request.setAttribute("a",a);
request.setAttribute("b",b);
request.setAttribute("c",c);
Forward to b.jsp, use EL Tag {request.attribute("a")} (it seems to be written like this),
After submission, according to the name attribute of your form, go to getParameter("name attribute") in b.servlet.