This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I think gmail application adds these parameters and redirects it to the client. Then the client is sending request to the server with these parameters.
Thanks for your reply. Could you please elaborate?
Thanks again!
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
posted
0
Hi Faisal.
I think in gmail application, the redirection happens like this(this is my assumption, there may be better approaches than this),
Here attributes 'paramOne' and 'paramTwo' are set some where in the application.
Anselm Paulinus
Ranch Hand
Joined: Sep 05, 2003
Posts: 389
posted
0
Chinmaya Chowdary wrote:Hi Faisal.
I think in gmail application, the redirection happens like this(this is my assumption, there may be better approaches than this),
Here attributes 'paramOne' and 'paramTwo' are set some where in the application.
Now we are in 'mail' web application, and one of its jsp wants to do redirect, and it can be done by
.
In the above code the JSTL's <c:url >tag is used for URL rewriting and URL encoding. At the end it produces
/mail/?fs=1&view=tl
with 'jsessionid' if the client disables cookies(like /mail/;jsessionid=...) and sets the attribute 'var' in page scope like,
Here the values '1' and 'tl' are produced by 'paramOne' and 'paramTwo' that are set some where in the application.
Now we have to get the attribute 'var' that was set in the page socpe. It can be done by Now we have the URL and we are about to redirect it by using response object's sendRedirect(String str) method, like Now the redirection wil happens. During redirecting, the client(browser) sends the request to the server by using the url
Now the DD checks the url pattern, here it is '/'(default servlet) and finds the appropriate servlet and sends the parameters 'fs=1&view=tl' to it, process it and finally the response will be sent to the client.
For me, the only difference between www.example.com/login/? and www.example.com/login? is that the first one will map to a servlet mapped to /login/* and the other one is mapped to /login. So basically both the paths can map to a servlet (this is of course if the application on this domain is mapped to ROOT)...