日期:2014-05-16  浏览次数:20389 次

jsp 之间传值

在index.jsp

1.url传参数数
? ? <a? ?href= "../index1.jsp?keyword= &apos;你好 &apos; "/ >
2.采用session? ?或request


<%
? ? session.setAttribute( "keyword ", "你好 &apos; ")
% >在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% > >