[thelist] JSP help please

Marcus Andersson marcan at home.se
Tue Jan 13 13:27:51 CST 2004


The following assumes that you are using an everything-in-JSP approach
(Model 1) and that you aren't using servlet forwarding and/or any MVC
frameworks (like Struts, WebWork etc).

How about checking what page is accessed? You can do it with:

request.getServletPath();

Then you get the path (without the context path) the user used to access
the page. Do some string extraction and get what page was accessed and
do conditionals on it. This is a quick and dirty solution but it should
work for a small application. Do you need details?

/Marcus



More information about the thelist mailing list