After the sendRedirect statement write return statement. -----Original Message----- From: srinivas tadikonda [mailto:[EMAIL PROTECTED]] Sent: Friday, June 28, 2002 9:52 AM To: [EMAIL PROTECTED] Subject: Re: response.sendRedirect problem
Hi, In my project I am useing 'response.sendRedirect("somefilename.jsp")' . Its working fine. but my problem is each and every page I am checking my session whether its expired or not..if expired I am redirecting to Login page using response.sendRedirect. but once I am useing this , after response.sendRedirect I put some code in my page. Even this is also execting. Actually it should not execute. example code I given here... Here i given two system.out.println statements. Once page redirected means second System.out.println statement will not execute. But its coming to my server. I am useing tomcat 3.2.3. Pleae tell me whether my code is wrong or behavior is like that.. Please tell me solution also <% System.out.println("Redirecting"); response.sendRedirect("trailrecords.jsp"); System.out.println("Redireced"); %> Join the world's largest e-mail service with MSN Hotmail. Click Here =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com