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 worlds 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
Re: response.sendRedirect problem
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
Re: response.sendRedirect problem
r u putting ur code in finally block. coz thats the only way that after your response.sendRedirect statement your remaining code below it is being executed. Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -Original Message- From: srinivas tadikonda [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 9:22 PM 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 file://response.sendRedirect (trailrecords.jsp); System.out.println(Redireced); % _ Join the world's largest e-mail service with MSN Hotmail. Click http://g.msn.com/1HM1ENIN/c157??PI=44344 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
Re: response.sendRedirect() problem to Irawan
HI Please refer the following page Microsoft http://support.microsoft.com/support/kb/articles/Q222/0/64.ASP Netscape http://home.netscape.com/security/notes/nocache.html -Original Message- From: Irawan [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 5:23 PM To: [EMAIL PROTECTED] Subject: Re: response.sendRedirect() problem to Irawan Once you set the cache to no, it is up to the browser to honor the request I believe. Also in your case, what I would check is to make sure that the code is working correctly. So you are saying that all the data/content are exactly the same as the other user? Have you try using 2 different browser (e.g. netscape and IE)? If you have VisualAge for Java (IBM-- the one I am using is the enterprise edition cannot say for other edition) there is a websphere test environment included there, try debug your code in the test environment to make sure the code is doing what it suppose to. At 02:59 AM 8/27/01, you wrote: Hello Jason. I used the following response.setHeader methods inside my jsp page. still the page is not getting refreshed. but for me At 02:38 AM 27/08/2001 -0500, you wrote: Jason, I got these lines of code from one of my colleague in prev department. I would say that you can set all the header that normally can exists in the html code, since the idea is setting the header information when you are about to send the resulting html page to the browser. What else are you trying to set in the response? I may not understand exactly what you are looking for. At 01:57 AM 4/27/01, you wrote: hi I want to know where did you found this code? because I want to know more about this. Is it have more setting can set throw response? Jason - Original Message - From: Irawan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 9:51 AM Subject: Re: response.sendRedirect() problem Sure can. From your code add the following 3 lines: response.setHeader(Pragma, No-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); I believe it is because of some differencies on how IE and Netscape handle it, that's why you need to add those to make sure it works. At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products /jsp /faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.c om/j guru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets = == 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets = == 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets == = 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
Re: response.sendRedirect() problem to Irawan
hi I want to know where did you found this code? because I want to know more about this. Is it have more setting can set throw response? Jason - Original Message - From: Irawan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 9:51 AM Subject: Re: response.sendRedirect() problem Sure can. From your code add the following 3 lines: response.setHeader(Pragma, No-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); I believe it is because of some differencies on how IE and Netscape handle it, that's why you need to add those to make sure it works. At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products/jsp /faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.com/j guru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem to Irawan
Jason, I got these lines of code from one of my colleague in prev department. I would say that you can set all the header that normally can exists in the html code, since the idea is setting the header information when you are about to send the resulting html page to the browser. What else are you trying to set in the response? I may not understand exactly what you are looking for. At 01:57 AM 4/27/01, you wrote: hi I want to know where did you found this code? because I want to know more about this. Is it have more setting can set throw response? Jason - Original Message - From: Irawan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 9:51 AM Subject: Re: response.sendRedirect() problem Sure can. From your code add the following 3 lines: response.setHeader(Pragma, No-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); I believe it is because of some differencies on how IE and Netscape handle it, that's why you need to add those to make sure it works. At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products/jsp /faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.com/j guru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem to Irawan
Hello Jason. I used the following response.setHeader methods inside my jsp page. still the page is not getting refreshed. but for me At 02:38 AM 27/08/2001 -0500, you wrote: Jason, I got these lines of code from one of my colleague in prev department. I would say that you can set all the header that normally can exists in the html code, since the idea is setting the header information when you are about to send the resulting html page to the browser. What else are you trying to set in the response? I may not understand exactly what you are looking for. At 01:57 AM 4/27/01, you wrote: hi I want to know where did you found this code? because I want to know more about this. Is it have more setting can set throw response? Jason - Original Message - From: Irawan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 9:51 AM Subject: Re: response.sendRedirect() problem Sure can. From your code add the following 3 lines: response.setHeader(Pragma, No-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); I believe it is because of some differencies on how IE and Netscape handle it, that's why you need to add those to make sure it works. At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products/jsp /faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.com/j guru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem to Irawan
yah .. you are correct, i have tried it by my self too but still no changed. The page still cant refresh automaticly. ==thx,a Java Addicted - Original Message - From: Senthil Raja V To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 3:59 PM Subject: Re: response.sendRedirect() problem to Irawan Hello Jason.I used the following response.setHeader methods inside my jsp page.still the page is not getting refreshed.but for me
Re: response.sendRedirect() problem to Irawan
Hi. Actually if I use setHeader no cache what is happening ? Is the files are not stored in C:\WINDOWS\Temporary Internet Files ? In my case i am not using any redirects but using encodeUrl and opening files in separate single window. The page opened in separate window is retained unchanged, ie not refreshed. Regards Senthil At 07:34 PM 27/08/2001 +0800, you wrote: yah .. you are correct, i have tried it by my self too but still no changed. The page still cant refresh automaticly. == thx, a Java Addicted === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem to Irawan
Once you set the cache to no, it is up to the browser to honor the request I believe. Also in your case, what I would check is to make sure that the code is working correctly. So you are saying that all the data/content are exactly the same as the other user? Have you try using 2 different browser (e.g. netscape and IE)? If you have VisualAge for Java (IBM-- the one I am using is the enterprise edition cannot say for other edition) there is a websphere test environment included there, try debug your code in the test environment to make sure the code is doing what it suppose to. At 02:59 AM 8/27/01, you wrote: Hello Jason. I used the following response.setHeader methods inside my jsp page. still the page is not getting refreshed. but for me At 02:38 AM 27/08/2001 -0500, you wrote: Jason, I got these lines of code from one of my colleague in prev department. I would say that you can set all the header that normally can exists in the html code, since the idea is setting the header information when you are about to send the resulting html page to the browser. What else are you trying to set in the response? I may not understand exactly what you are looking for. At 01:57 AM 4/27/01, you wrote: hi I want to know where did you found this code? because I want to know more about this. Is it have more setting can set throw response? Jason - Original Message - From: Irawan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 9:51 AM Subject: Re: response.sendRedirect() problem Sure can. From your code add the following 3 lines: response.setHeader(Pragma, No-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); I believe it is because of some differencies on how IE and Netscape handle it, that's why you need to add those to make sure it works. At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products /jsp /faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.c om/j guru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED
Re: response.sendRedirect() problem to Irawan
Did you add the no cache to the page open in the separate window also? If the new page open in the other window is also a jsp/servlet, then you also have to add the code there. The code to set the page to no cache is specific only for that particular page. When the page set to 'no cache' then the browser should not save the content to your machine. So that the next time you access the page again it should called the page again as if it is never access before. At 06:52 AM 8/27/01, you wrote: Hi. Actually if I use setHeader no cache what is happening ? Is the files are not stored in C:\WINDOWS\Temporary Internet Files ? In my case i am not using any redirects but using encodeUrl and opening files in separate single window. The page opened in separate window is retained unchanged, ie not refreshed. Regards Senthil At 07:34 PM 27/08/2001 +0800, you wrote: yah .. you are correct, i have tried it by my self too but still no changed. The page still cant refresh automaticly. == thx, a Java Addicted === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
response.sendRedirect() problem
i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. ==thx, A Java Addicted
Re: response.sendRedirect() problem
You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem
Can you tell me how can i do that sir ??? ==thx,H`L - Original Message - From: Irawan To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the datainthe list page jsp.At 11:28 AM 8/26/01, you wrote:i have a silly problem here, if i delete a data in database from my jsppage .. let say in the page i got 10 datas and i deleted one, and afterideleted it i used sendRedirect() method to go back to the list page. Ineed to refresh the page or it will keep showing 10 datas. How can imakeit like refresh it automaticly maybe ..==thx,A Java Addicted===To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoffJSP-INTEREST".For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTERESTDIGEST".Some relevant FAQs on JSP/Servlets can be found at:http://java.sun.com/products/jsp/faq.htmlhttp://www.esperanto.org.nz/jsp/jspfaq.htmlhttp://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem
Sure can. From your code add the following 3 lines: response.setHeader(Pragma, No-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); I believe it is because of some differencies on how IE and Netscape handle it, that's why you need to add those to make sure it works. At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
OOT -- Re: response.sendRedirect() problem
Sorry have to use this mailing list cause I cannot see the email of the person before to send it directly. Are u from indonesia -- I saw that you are sending using balicamp.com mailserver. If so, could you send me email directly at [EMAIL PROTECTED] thanks... At 08:28 PM 8/26/01, you wrote: Can you tell me how can i do that sir ??? == thx, H`L - Original Message - From: mailto:[EMAIL PROTECTED]Irawan To: mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Sent: Monday, August 27, 2001 6:30 AM Subject: Re: response.sendRedirect() problem You may want to try to set so that the browser will not cache the data in the list page jsp. At 11:28 AM 8/26/01, you wrote: i have a silly problem here, if i delete a data in database from my jsp page .. let say in the page i got 10 datas and i deleted one, and after i deleted it i used sendRedirect() method to go back to the list page. I need to refresh the page or it will keep showing 10 datas. How can i make it like refresh it automaticly maybe .. == thx, A Java Addicted === To unsubscribe: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto mailto:[EMAIL PROTECTED][EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.htmlhttp://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSPhttp://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
response.sendRedirect() problem
At the top of my page is an access control code block that checks to see if a user is allowed access to the page. If the user doesn't have access, then they are redirected to an error page. Below the control code is a procedure to deal with a submitted form that updates a database. The problem is if the user is not allowed, the form submission is still allowed and then the user is redirected to the error page, which would allow an unwanted visitor to update the database even though the control code successfully rejects them. The only way I'm able to force the server to redirect before parsing the whole page is to place a "return;" immediately after the redirect at the end of the if() block. Is there a problem with this method, such as the servlet container seeing a return where it shouldn't? Here's my code (Macromedia Ultradev 4 generated): % // *** Restrict Access To Page: Grant or deny access to this page String MM_authorizedUsers="seller"; String MM_authFailedURL="login.jsp"; boolean MM_grantAccess=false; if (session.getValue("MM_Username") != null !session.getValue("MM_Username").equals("")) { if (false || (session.getValue("MM_UserAuthorization")=="") || (MM_authorizedUsers.indexOf((String)session.getValue("MM_UserAuthorization") ) =0)) { MM_grantAccess = true; } } if (!MM_grantAccess) { String MM_qsChar = "?"; if (MM_authFailedURL.indexOf("?") = 0) MM_qsChar = ""; String MM_referrer = request.getRequestURI(); if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" + request.getQueryString(); MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + java.net.URLEncoder.encode(MM_referrer); response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL)); return; //this is added } % Thomas Spellman === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
R: response.sendRedirect() problem
At the top of my page is an access control code block that checks to see if a user is allowed access to the page. If the user doesn't have access, then they are redirected to an error page. Below the control code is a procedure to deal with a submitted form that updates a database. The problem is if the user is not allowed, the form submission is still allowed and then the user is redirected to the error page, which would allow an unwanted visitor to update the database even though the control code successfully rejects them. The only way I'm able to force the server to redirect before parsing the whole page is to place a "return;" immediately after the redirect at the end of the if() block. response.sendRedirect() doesn't stop the execution of a page, the jsp:forward tag does. Maybe this is the problem, try using it instead of redirect. === 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: response.sendRedirect() problem
Thomas wrote: At the top of my page is an access control code block that checks to see if a user is allowed access to the page. If the user doesn't have access, then they are redirected to an error page. Below the control code is a procedure to deal with a submitted form that updates a database. The problem is if the user is not allowed, the form submission is still allowed and then the user is redirected to the error page, which would allow an unwanted visitor to update the database even though the control code successfully rejects them. The only way I'm able to force the server to redirect before parsing the whole page is to place a "return;" immediately after the redirect at the end of the if() block. Is there a problem with this method, such as the servlet container seeing a return where it shouldn't? [...] No problem; that's exactly what you have to do to get it to work as you like. You may want to consider encapsulating all of this code in a custom action instead though. If the access control fails, the custom action can abort the processing of the page (return SKIP_PAGE from the doEndTag() method). Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com Author of JavaServer Pages (O'Reilly), http://TheJSPBook.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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets