I'am having issues redirecting users in a Java application. This is the scenario:
1. Old URL was www.app1.com hosted on JBoss Server. Application is built using JSP.2. Now, we moved the app to a different server and had to change URL to www.app2.com.3. When users use the old URL to access the application, instead of log-in page, we show a page with a simple message asking them to click on new URL.(This link is a simple href tag). We also ask them to save this new URL in their favourites which is how they access the application.4. Now, when they click on the URL posted on the old server page, it redirects to the log-in page on new Server. They save this link in their favourites. The application works fine for that session. But when they access the application next time using the favourites, it opens login page on new Server, but doesnot let them access when they enter user-id and pwd.
This is the reason, when they clicked on the URL link on the old server for the first time, application opened up but the URL was something like this:
www.app2.com/?jsession........(some query string) and they saved this link. So, instead of saving www.app2.com, it also saved the query string.(some session id from old server).
Can anyoone suggest how to get rid of this issue.
P.S: First I used simple href html tag, then I used JSP redirect tag(in this case, it directly redirects without showing them the page on Old Server). But in both the cases, when new server page opens, it has this query string at the end. How can I get rid of this query string.
I know that I can get rid of it on the new server when they submit the page but I donot want to touch the code on new server.