Redirection of url

Hi,

I have JSP 1 being hosted in one application server 1, i.e. thats the login page, on succesfull login i need to redirect the control to another JSP 2 hosted in another appilcation server 2.

But if any user tries to access the JSP2 directly i need to throw up a message saying he is currently not logged in.

So while redirecitng from JSP1 i need to pass some paramter or data which can be retrieved in JSP2 and decide on whether the user has come after successful logging in or direclty accessed the JSP2.

If i save something in session,will that be accessible accross two differnet application servers

Please let me know what approach to be used for this or some references.

[716 byte] By [PPBhata] at [2007-11-26 18:53:27]
# 1

Set crossContext="true" in your Webapp servers's context file.

See this thread: http://forum.java.sun.com/thread.jspa?forumID=45&threadID=5138542 someone had a similar question and it shows how to set crossContext="true"

then you could make use of JSTL 1.1 tags

<c:redirect , to send the user over using an HTTP 302 redirect.

I don't know if you'll be able to use ><jsp:forward , because I don't think jsp:forward would work over different contexts - but you can give it a try.>

appy77a at 2007-7-9 6:27:28 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...