ooops

sorry !


Il giorno 27/mag/08, alle ore 08:56, Antonio Petrelli ha scritto:

Please ask this question to the Struts Users mailing list:
http://struts.apache.org/mail.html

Ciao
Antonio

2008/5/27 Andrea Vettori <[EMAIL PROTECTED]>:
Hi,

I have a login interceptor that checks the presence of a token in the
session. If the token is not present it returns LOGIN; if present it invokes
the action. LOGIN is a global result that calls the login action.

What I want to do is: after the login is completed the system should process
the original request with all the parameters.

I already can do this composing the request URL getting the action name, context, parameters name and values from ActionInvocation in the interceptor and storing it in a session variable and after the login redirect to that
URL.

What I want to know is if it exists a better way to do this, for example saving the ActionInvocation object insted of composing the URL and then use
that to execute the original action in the interceptor.



Something like this :


public String intercept (ActionInvocation ai) {

      if (session contains saved invocation)
continue that invocation and clear session saved invocation
      else {
              if (session contains token)
                      ai.invoke()
              else
                      return LOGIN
      }
}



I dont' like using the "composed URL method" even if it works, because it
has some "hardcoded" values (i.e. the .action suffix) and because it
converts all parameters to strings and then back to their original variables
type when the URL is used in the redirect.


Thanks

--
Ing. Andrea Vettori
Consulente per l'Information Technology


---------------------------------------------------------------------
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]


--
Ing. Andrea Vettori
Consulente per l'Information Technology


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

Reply via email to