JSP与servlet之间跳转传值

一、JSP跳转的方式:

1、href

<a
  href="<%=path%>/servlet/ProductMain?type=book" ><span lang=EN-US><span
  lang=EN-US>书籍类</span></span></a>

2、onclick

<input type="button" onclick="window.location.href='<%=path%>/servlet/ProductAdd?type=<%=type %>'" value="添加">

传参

原文地址:https://www.cnblogs.com/xingyyy/p/3485982.html