servlet中如何根据不同的条件转道不同的页面?
求助!
求助!
2006-12-16 22:26
用
+++++++++++++++++++++
String toUrl = "/page1.jsp";
if(condition1){
toUrl = "/page2.jsp";
}
else if(condition2){
toUrl = "/page3.jsp";
}
+++++++++++++++++++++
getServletConfig().getServletContext().getRequestDispatcher(toUrl).forward(request,response);
判断
不知道你问的是这个吗?

2006-12-17 00:46
2006-12-17 08:53