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.
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?
java.lang.IllegalStateException: Cannot forward after response has been committed.
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.
"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.