I know that every myPage.jsp has an implicit variable for request and response and config and other items but within all of those I cannot find any api to get at the URL of the current page.
1. How can programatically get the current URL?
2. Can I include a file that checks that for every page?
To give you the big picture - here's that I want to do. Include (via include hopefully) an opening set of code in every page, that does the following pseudo code steps...
1. MySession.setCurrentURL(this page's URL)
2. If MySession.isLoggedIn() = false then go to login page.
3. Then in Login page after they login, return to the page that jumped to login.
Make sense? Any answers to my specific questions - OR any "why don't you do it this easier way?" type suggestions are welcomed!
THANKS!!
1. How can programatically get the current URL?
2. Can I include a file that checks that for every page?
To give you the big picture - here's that I want to do. Include (via include hopefully) an opening set of code in every page, that does the following pseudo code steps...
1. MySession.setCurrentURL(this page's URL)
2. If MySession.isLoggedIn() = false then go to login page.
3. Then in Login page after they login, return to the page that jumped to login.
Make sense? Any answers to my specific questions - OR any "why don't you do it this easier way?" type suggestions are welcomed!
THANKS!!