JSP前台显示的问题!!!!

1.
<jsp:useBean id="bean"  scope="request"  class=" ">
<%Bean bean=(Bean)request.getAttribute("abc");%>
作用相同!

2.在前台设置
<input type="hidden"  name="method"  value="add">
就可在Action中区别;
Sample:
String method=request.getParameter("method");

if(method!=null&&method.equals("add")){request.setAttribute("bean",bean);mapping.findForward("a");}

你可能感兴趣的:(bean,jsp)