熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

講解jsp中的所有session

2013-11-15 12:08:12  來源: JSP教程 
  1. <%@ page contentType="text/html; charset=gb" language="java" import="javasql*" errorPage="" %>
  2. <%@ page import="javautil*"%>
  3. <html>
  4. <head>
  5. <meta httpequiv="ContentType" content="text/html; charset=gb">
  6. <title>無標題文檔</title>
  7. </head>
  8. <body>
  9. <%
  10. Enumeration e=sessiongetAttributeNames();
     
  11. String temp;
     
  12. for (;ehasMoreElements();){
     
  13.   temp=(String)enextElement();
     
  14.   outprint(temp+"="+(String)sessiongetAttribute(temp)+"<br>");
     
  15. }
  16. %>
  17. </body>
  18. </html>

From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20372.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.