怎么实现
我在JSP页面的form表单下面写了一句
<input type=hidden name=flag value="1">
然后在controller层相应方法中做了一个判断:
if(request.getParameter("falg")=="1"){
return "redirect:/findPart.do";
}else{
return "redirect:/findAll.do";
}
这样行吗?为什么我实验了不起作用???
------解决方案--------------------
if(request.getParameter("falg")=="1")这个地方有时候用==不可用,建议换成equals
------解决方案--------------------
+1