#30 Avoid Session Variable Abuse

When programming an application to run in a web server or app server, there is often the need to retain a value from interaction to interaction.  It is easy, and very temping, to create a new session variable at the moment, and store a value there, and retrieve it at a different point in the interaction.  It is an easy solution, that causes a large maintenance problem, this post explains why. Continue reading

#12 context path and browser redirecting

What is the URL to the application? There is one, and that is the one that the user places into the browser in order to access the application. Unfortunately, along the way, the request will pass through many intermediate services which will distort the request headers. Many of the TomCat services designed to provide information about the context of the running application will return incorrect values. Thus we must be very clear on how to get those values correctly and consistently across the application, so that when the browser is forwarded it is always successful. Continue reading

#8 The “go” parameter

Web pages can be designed to be reusable like subroutines that go and do something for the user, and then return. For example, the login may need more information, redirecting to a page to prompt for that information, and when done return to the page you were on. These pages need to be designed to be able to redirect correctly back to the original. This post proposes a convention to use to make all such pages work the same way. Continue reading