我都想问这个问题啊,如何可以获得session里的所有变量的名和对应的值
解决方案 »
- org.apache.jasper.JasperException: Unsupported encoding: gb2312
- 如何用JDBC远程连接数据库??
- 求ab两点距离,java面试时遇到的麻烦
- 请问在Struts的Action中怎么样取到checkbox的值??并添加到数据库中?
- ectable如何国际化
- 程序开发中避免下载中断
- 100分求英文html在线编辑器
- JSP字符串的截取(分数全送)
- 请问一个问题
- 如何将各种时间统一格式化为“YYYY-MM-DD hh:mm:ss”?
- 請問applet在tomcat裡面需要放在哪個路徑下面?為甚麼我在jbuilder7裡面運行正常,放到tomcat下面總是找不到類?請行家指點,多謝!
- jconnect.jar和jconn2.jar对中文显示的影响
<%
request.getSession().setAttribute("sesExampleA","0001");
request.getSession().setAttribute("sesExampleB","abcd");
request.getSession().setAttribute("sesExampleC","defg");
%>
<a href=next.jsp>下一页</a>next.jsp
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.*" %>
<%
request.getSession().setAttribute("nextExample","nextValue");Enumeration e = request.getSession().getAttributeNames() ;
String sName = "" ;
while(e.hasMoreElements()){
sName = e.nextElement().toString() ;
out.print("<br>"+sName+"==="+request.getSession().getAttribute(sName));
}
%>
request.getSession().setAttribute("sesExampleA","0001");
request.getSession().setAttribute("sesExampleB","abcd");
request.getSession().setAttribute("sesExampleC","defg");
<%
session.setAttribute("sesExampleA","0001");
session.setAttribute("sesExampleB","abcd");
session.setAttribute("sesExampleC","defg");
%>
<a href=next1.jsp>下一页</a>next1.jsp<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.*" %>
<%
session.setAttribute("nextExample","nextValue");Enumeration e = session.getAttributeNames() ;
String sName = "" ;
while(e.hasMoreElements()){
sName = e.nextElement().toString() ;
out.print("<br>"+sName+"==="+session.getAttribute(sName));
}
%>以上两个例子我都测试过!