IllegalStateException is coming if I use sendRedirect() method..
Shashi Kala
Ranch Hand
Joined: Jan 27, 2008
Posts: 46
posted
0
Hi Ranchers,
I am having a HTML page, which is devided as frames. There is 3 frames in this page named as first,left and content. In content frame I have a login page. Here when user clicks on login button, In content frame, some other jsp page should gets displayed(say the jsp page is welcome.jsp).
For this, Previously I have used
But the problem here is..If I login once..it is coming properly. If I click on some other button in another frame and logout..Now in case if I login again an error is coming like..
HTTP Status 500
description The server encountered an internal error() that prevented it from fulfilling this request.
As shown above the error is coming..So what I did means instead of using sendRedirect() method, I simply assigned the frame location to "/abc/welcome.jsp". Now it is working fine..But I just want to know what was the problem with sendRedirect() method. In which case, the above error will come?
The exception itself gives the reason. And response has been committed means that you have already written the response to the client , so now you dont have control over it. Please see this FAQ entry for more information.
after checking all the necessary conditions for the login stuff. This tag doesn't notify the browser about the new page. The new page is opened but you need to notice that the address in the address bar remains the same.
Hi Nishant Kr welcome to Javaranch , If you want to edit a post(posted by you of course), then you can do it by simply clicking the icon.
Hope this helps [ August 07, 2008: Message edited by: Amit Ghorpade ]
Nishant Kr
Greenhorn
Joined: Aug 07, 2008
Posts: 8
posted
0
Mr Ghorpade,
Can you please answer to the topic...? If you don't have that much of ability or kind nature to help somebody, you better be in peace. I find most of your forums to be useless....!
"Nishant Kr", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.
Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Be aware that accounts with invalid display names are disabled.