VUsolutions Transferred to AchiKhasi.com

From December 2011, this blog www.VUsolutions.blogspot.com is transferred to http://achikhasi.com/vu/ . So, you may visit http://achikhasi.com/vu/ for latest study related help.

Back to home VUsolutions

VUsolutions Fans Club [join us for MORE solutions]

VUsolutions on Facebook

CS506 Assignment No. 5 Solution

Wednesday, July 06, 2011 Posted In Edit This
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class STimerOut extends HttpServlet {
// Handles the HTTP <code>GET</code> method.


// use rq to read incoming HTTP headers 
// use rs to specify the HTTP response status
public void doGet(HttpServletRequest rq, HttpServletResponse rs)
throws ServletException, IOException {



// tell the browser that we are sending back html
rs.setContentType("text/html"); 

// used to modify println() statements to build a legal web page
PrintWriter out = rs.getWriter();

int t = 60;

/*
system extracts a user ID from a cookie or attached URL data, then uses
that as a key into a table of previously created HttpSession objects.
*/
HttpSession s = rq.getSession();


/*
following statements build a legal webpage 
*/
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE >");
out.println("Session TimeOut ");
out.println("</TITLE>");
out.println("</HEAD>");




out.println("<BODY>");
out.println("<H1>");
out.println("Session TimeOut ");
out.println("</H1>");

out.println("gaining the old time out " +
s.getMaxInactiveInterval());/* getMaxInactiveInterval() gets the maximum
time in seconds for which the session remained
inactive. 

out.println("<BR>");
out.println("<BR>");

s.setMaxInactiveInterval(2*t*t); /* sets the maximum time in seconds for which the 
session can remain inactive. 
out.println("giving new time to get out " +
s.getMaxInactiveInterval());


out.println("</BODY>");
out.println("</HTML>");

Back to home VUsolutions

Shaadi.com: Just create ur account & find ur partner or EARN money, its reall & EASY

VUsolutions Followers (Join NOW and Get Extra Benefits)

Install LATEST toolbar having lot of features - GET solutions on Desktop

toolbar powered by Conduit
Caliplus 300x250 NoFlam VitoLiv 468x60 GlucoLo