jsp 其间传值
jsp 之间传值
在index.jsp
1.url传参数数
<a href= "../index1.jsp?keyword= '你好 ' "/ >
2.采用session 或request
<%
session.setAttribute( "keyword ", "你好 ' ")
% >在index1.jsp
在index1.jsp
1.
<%
String keyword = reuqest.getparamer( "keyword ");
% >
<input type= "text " value= <%=keyword% > >
2.
<%
String keyword = session.getAttribute( "keyword ");
% >
<input type= "text " value= <%=keyword% > >