Tuesday, October 9, 2012

Hide the browser toolbar in jsp

I am so tired with testers raising bugs they get when they click on the browser back button.
So, its better to hide the browser buttons altogether.

Here is the code.

My web.xml has my welcome file to index.jsp, which in turn just redirects the control to my Login.jsp.

web.xml


        /pages/Login.jsp

index.jsp

<%
response.sendRedirect("login.do");
%>

Where login.do is my action mapping.
Now, I change my index.jsp to



This opens my application in a new browser, where the browser toolbar and menubar do not appear...and I get rid of my Back and Forward button bugs. Hmpfffff!!!

No comments:

REFACTORING

 What is Refactoring? A software is built initially to serve a purpose, or address a need. But there is always a need for enhancement, fixin...