This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I'm not sure exactly what's causing your exception, but rather than checking for a logged in session at the start of each JSP page why aren't you using a servlet filter?
But can you please tell me how can I use Servlet Filter as I am using Struts Framework. If U provide me these detail that would be a great help of me.........
Originally posted by Prateek Sharma: If U provide me these detail
Please use real words when posting to the forums. Abbreviations such as "U" in place of "you" only serve to make your posts more difficult to read and less likely to generate useful responses.
Look up servlet filter. You can configure one to be called prior to any protected page in your site by associating with a specific servlet mapping (*.do for example). The filter can do the session checking so that you only have to write it once and not worry about it in any of your servlets, actions or JSPs. [ July 20, 2008: Message edited by: Bear Bibeault ]
kelby zorgdrager
Greenhorn
Joined: Feb 05, 2008
Posts: 12
posted
0
without seeing your entire jsp it's kind of hard to say why you are getting this exception.
that being said, the most common case is you are performing some work on the output stream after the response header is sent back.
in your code, right after your response.sendRedirect("...") add a return statement. the return will "stop" the processing of the jspService method, preventing any further manipulation of the output stream by the jsp to occur.
if this solves the problem, then you need to go back into your code and change the logic so that after you call sendRedirect the flow control stops naturally.
<a href="http://www.J2EETraining.com" target="_blank" rel="nofollow">J2EE Training / Java EE Training ... Learn Java EE </a>
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.