Hi!
No, because there is no place to login here...

You propose (if I anderstand correctly) such a way:
case 1:
jsp submit (1)-> form validate -> APIcall() returns no errors -> action
case 2:
jsp submit (1)-> form validate -> APIcall() returns _errors_ -> validation fails -> back to calling jsp with _prefilled fields_ as in step (1)


But I need something like this:
case 1:
jsp submit (1)-> APIcall() returns no errors -> <next>
case 2:
jsp submit (1)-> APIcall() returns _errors_ -> validation fails -> login jsp submit -> login action/check auth -> back to calling jsp with _prefilled fields_ as in step (1)


Yaroslav Novytskyy


Nandan wrote:
Did you try using checking the call to API method in the validate() method of your Action class and returning an ActionErrors if the call failed?

--------------------------------------
How happy is the blameless vestal's lot!
The world forgetting, by the world forgot.
Eternal sunshine of the spotless mind!
Each pray'r accepted, and each wish resign'd
----- Original Message ----- From: "Yaroslav Novytskyy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Monday, May 16, 2005 1:08 PM
Subject: Re: Saving context in web application with exception-driven authentication



Hi!

Sorry for being insistent, but does anyone have any thoughts about this question?

Yaroslav Novytskyy

I'm looking for a suitable solution for the following problem which concerns authentication.

In my application the logon process is triggered by an exception which is thrown by the call of an API function. The important moment is that my web application cannot know whether the user has the rights to call this function before it is actually called. The function throws a specific exception in case if the user has insufficient rights.

Upon receiving this exception the application must display the logon page. After logging in, the user has to be automatically redirected to the input page of the Action where the API function was initiated. The form of the input page must contain the values which the user had entered before the API function failed.

The question is: how do I do it? I am already using the Struts ExceptionHandler to trigger the login form upon catching the specific exception. I suspect that I'll have to store the "context" (the ActionForm of the input page) in the session scope - but I don't know how to make the "substitution" of the input JSP form with the saved "context" (how to fill the page form fields with the values entered by the user before he had to log in).


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to