Two Laptop Bag*
The moose likes JSP and the fly likes Mislead to believe that the page is completed without any errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Mislead to believe that the page is completed without any errors" Watch "Mislead to believe that the page is completed without any errors" New topic
Author

Mislead to believe that the page is completed without any errors

Timothy Toe
Ranch Hand

Joined: Oct 19, 2002
Posts: 156
Settings in the jsp:
---------------------
<%@ page autoFlush="true" %>

Background knowledge :
----------------------
If error occured BEFORE the 1 batch of buffered output is flushed, the JSP container will stop processing the current problematic page and redirect to the error page (either the default ugly one or a programmer defined user friendly one).
If error occured AFTER the 1 batch of buffered output is flushed, the JSP container will also stop processing the current problematic page, flush the remaining output in the 2nd (let's assume 2nd) batch of buffered output produced before the error occurred. No redirection.

Problem :
---------
It is fine with me for the 1st case. For the 2nd case, I understand that redirection cannot happen anymore as the HTTP header is already sent to the browser with the 1st batch of buffered output.
What I find misleading/dangerous is that although an error occured, the status bar in IE shows "Done" and the page too, does not have any error message. The browser user had been mislead to believe that the page is completed without any errors.
Karan V Praba
Ranch Hand

Joined: Oct 31, 2002
Posts: 41
hai


Karan V Praba.
Karan V Praba
Ranch Hand

Joined: Oct 31, 2002
Posts: 41
Hai Timothy Toh ,
The status in browser(IE) DONE tells the excution status of browser.For example we can examine that "[B]opening http://hostname/XXX.xx[b]" as status text when we try to access the page.It will not imply the error in the page or in the URL.(Even error in the ERL,it used to show "[b]Done[b]" ).
Timothy Toe
Ranch Hand

Joined: Oct 19, 2002
Posts: 156
So you agree with me that it is misleading ? This is especially so when the incomplete erroneous page (so happen) looks fine to the user.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mislead to believe that the page is completed without any errors
 
Similar Threads
jsp:forward action (was Static and dynamic inclusion in jsp)
Double Submission
flush !
Struts Loop breaks at specific number of characters
jsp:include