---
# System prepended metadata

title: Forward傳遞參數

---

# Forward傳遞參數

1.Servlet 對 Servlet

傳送端：request.setAttribute(key,value);

接收端：變數=request.getAttibute(key);

2.Servlet 對 jsp

傳送端：以網址列的參數傳遞

接收端：變數=request.getParameter(參數);