simple login application

ok..this is the situation...

all applications are routed through a login page...

so if we have a url like www.abc.com/appA/login?param1=A&param2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...

so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanks

[886 byte] By [hari786a] at [2007-11-27 11:44:30]
# 1

what error are you getting?

SoulTech2012a at 2007-7-29 17:56:12 > top of Java-index,Java Essentials,Java Programming...
# 2

Well, you wouldn't do that with Java Programming much (this is the Java Programming forum and not the Servlets forum).

Best way is to use a Filter. If the user isn't logged in, then stash the parameters in the user's session and forward to the login page. After a successful login, forward to the actual requested page with those parameters.

DrClapa at 2007-7-29 17:56:12 > top of Java-index,Java Essentials,Java Programming...
# 3

i dont know how to take that query string from the url into the servlet first of all..

hari786a at 2007-7-29 17:56:12 > top of Java-index,Java Essentials,Java Programming...
# 4

Well, as I hinted before, that's a question about Servlets.

DrClapa at 2007-7-29 17:56:12 > top of Java-index,Java Essentials,Java Programming...
# 5

> i dont know how to take that query string from the

> url into the servlet first of all..

take a look at request.getQueryString("parameterName");

Manuel Leiria

manuel.leiriaa at 2007-7-29 17:56:12 > top of Java-index,Java Essentials,Java Programming...