I have a generalised program for authorization. I have a number of number of activities which needs to be authorised by users with Admin rights.
I popup this Authorization JSP in a new popup window whenever it requires authorization using javascripts. After the authorization is done I need to give the success or failure result to the calling JSP. Can anybody tell me how do I go about doing this?
Thanks in advance,
Anish
-
Passing control from one JSP to Another (2 messages)
- Posted by: Anish K
- Posted on: June 20 2001 15:37 EDT
Threaded Messages (2)
- Passing control from one JSP to Another by armr armr on June 21 2001 09:03 EDT
- Passing control from one JSP to Another by Anish K on June 21 2001 16:11 EDT
-
Passing control from one JSP to Another[ Go to top ]
- Posted by: armr armr
- Posted on: June 21 2001 09:03 EDT
- in response to Anish K
Hi Anish,
I was glad to see your question, because I am trying to find the answer to something similar. I have a pop-up window that is generated using a JavaScript from within a JSP page. My problem, is I am unable to get the parameters passed into this pop-up window from the requesting HTML page (generated using JSP). Hope you get an answer to your question and be able to answer mine based on that.
Thanks
Mahesh -
Passing control from one JSP to Another[ Go to top ]
- Posted by: Anish K
- Posted on: June 21 2001 16:11 EDT
- in response to armr armr
I think I have an answer to your problem.
While popping up the new window I assume that you are using window.open() with the first parameter being the name of the JSP you are trying to open. With the name of the JSP, in the same parameter pass the query string.
For eg. in the javascript function you could have
var queryString = "/validate.jsp?userid=" + document.login.userid.value + "&password=" + document.login.pwd.value;
window.open(queryString,"Authorise");
// Here userid and pwd are textfields and password fields
// respectively
This would open up a new window.
In the validate.jsp, using the request object you can get the values passed. You could do it like --
String UserID = request.getParameter("userid");
String Password = request.getParameter("password");
It works for me. Try it.
Anish