We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Looking For Something at Site? Search Below

Question: 
Analyze following code using your best effort. And then give and explain its output. Yours explanation should not exceed 3-4 sentences. This assignment is based on negative marking if any unnecessary information or too much detail is provided your marks will be deducted.

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class STimerOut extends HttpServlet {

public void doGet(HttpServletRequest rq, HttpServletResponse rs)
throws ServletException, IOException {
rs.setContentType("text/html");
PrintWriter out = rs.getWriter();
int t = 60;

HttpSession s = rq.getSession();

out.println("<HTML>");

out.println("<BODY>");
out.println("<H3>");
out.println(" Making Session based checkOut ");
out.println("</H3>");

out.println("obtain previous time out " +
s.getMaxInactiveInterval());

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


s.setMaxInactiveInterval(2*t*t); // two hours
out.println("setting new time to get out " +
s.getMaxInactiveInterval());

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


}}


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 2675

Replies to This Discussion

lo je jaldi jalid java wala ko mail kar do.. woh accept kar lay gaa. it hundred percent correct ouput. 

Attachments:

please share solution

RSS

Latest Activity

+M.Tariq Malik replied to +M.Tariq Malik's discussion CS403 Assignment 01 Fall 2020 Solution / Discussion in the group CS403 Database Management Systems
5 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS403 Assignment 01 Fall 2020 Solution / Discussion in the group CS403 Database Management Systems
5 minutes ago
+M.Tariq Malik replied to Muhammad Faizan Alam's discussion CS604 - Operating Systems Assignment NO 1 Due Date: 30-November-2020 in the group CS604 Operating Systems
8 minutes ago
+M.Tariq Malik replied to Muhammad Faizan Alam's discussion CS604 - Operating Systems Assignment NO 1 Due Date: 30-November-2020 in the group CS604 Operating Systems
9 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS606 GDB No 01 Fall 2020 Solution / Discussion in the group CS606 Compiler Construction
14 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS606 GDB No 01 Fall 2020 Solution / Discussion in the group CS606 Compiler Construction
14 minutes ago
GM Mughal joined +M.Tariq Malik's group
15 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS312 Database Modeling and Design Assignment 01 Fall 2020 Solution / Discussion in the group CS312 Database Modeling and Design
27 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion CS312 Database Modeling and Design Assignment 01 Fall 2020 Solution / Discussion
27 minutes ago
+M.Tariq Malik added a discussion to the group CS312 Database Modeling and Design
27 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MCM511 Theories of Communication Assignment 01 Fall 2020 Solution / Discussion in the group MCM511 Theories of Communication
30 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MCM511 Theories of Communication Assignment 01 Fall 2020 Solution / Discussion in the group MCM511 Theories of Communication
31 minutes ago

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.