<nobr id="e0j6h"></nobr>
    1. <option id="e0j6h"><span id="e0j6h"></span></option>

      <nobr id="e0j6h"></nobr>

    2. <option id="e0j6h"></option>
    3. Source Code for Session Example

      import java.io.*;
      import java.util.*;
      import javax.servlet.*;
      import javax.servlet.http.*;
      
      public class SessionExample extends HttpServlet {
      
          public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException
          {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
      
              HttpSession session = request.getSession(true);
      
              // print session info
      
              Date created = new Date(session.getCreationTime());
              Date accessed = new Date(session.getLastAccessedTime());
              out.println("ID " + session.getId());
              out.println("Created: " + created);
              out.println("Last Accessed: " + accessed);
      
              // set session info if needed
      
              String dataName = request.getParameter("dataName");
              if (dataName != null && dataName.length() > 0) {
                  String dataValue = request.getParameter("dataValue");
                  session.setAttribute(dataName, dataValue);
              }
      
              // print session contents
      
              Enumeration e = session.getAttributeNames();
              while (e.hasMoreElements()) {
                  String name = (String)e.nextElement();
                  String value = session.getAttribute(name).toString();
                  out.println(name + " = " + value);
              }
          }
      }
      日本美丽人妻被黑人大黑炮,中文字幕无码亚洲视频,久久se精品一区二区三区,黄色三级免费网站 <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <ı> <ı> <ı> <ı> <ı> <ı>