This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi Friends Can anybody me the solution for my doubt i am facing in my application? Doubt is.... In a jsp file under certain condition if that condition met i am redirecting to one jsp otherwise i am redirecting to another jsp? I am using response.sendRedirect(String url); method to redirect from one page to another page.I used both the relative url as well as the absolute url as a parameter to that method. This is working fine in IE 5.0 and above.Also in Netscape 6.0 and above. But only in Netscape 4.76 browser,the session values are lost [turned to null value] if i am using sendRedirect method.I know that session values are persist between pages until the user session is expired.But in this case only in Netscape 4.76 my session gets expired with sendRedirect method. Also i noted that if i am specifying the port number in the browser url to invoke the page then the session value will be lost.If i invoke the jsp page without giving port number then the session value is there it will take to me to exact destination page. Also if i am using <jsp:forward> tag to forward to the destination page when that condition met then the session value is there.This will working in all the browsers. Friends Can you tell me what i am doing wrong??? Thanks & Regards Kumaran.S
Well, the JSP v1.1 spec says that jsp:foward only takes relative URLs, so I'm surprised a full URL works for you using jsp:forward (doesn't in my servlet container). But anyway, check out the generated .java file from your .jsp that does the forward. See how your jsp:forwards are rewritten as a servlet. BTW, this code: