Topic: jsp页面取得action中session的问题!!!!

  Print this page

1.jsp页面取得action中session的问题!!!! Copy to clipboard
Posted by: momocha
Posted on: 2003-07-23 15:42

我在action中的perform设置了session,如下::
HttpSession session = request.getSession();
session.setAttribute("name","ywh");
session.setAttribute("footballTop",footballList);

然后我在jsp页面中这样调用:
<%!String name;%>
<% name=request.getParameter("name");%>
ame=<%=name%> 取出来是null...
怎么回事!!!!

2.Re:jsp页面取得action中session的问题!!!! [Re: momocha] Copy to clipboard
Posted by: redmiddle
Posted on: 2003-07-23 17:03

你写错了.应该是
<%!String name;%>
<% name=(String)session.getAttribute("name");%>
ame=<%=name%>


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923