Can I just return null ?

No. Returning null signals Struts that the Action has done everything necessary for the response, and there is nothing for Struts to forward to. That doesn't sound like what you want, or at least not completely.


If you want to send the person back to the calling page when different pages may be calling, you'd need to look at the request -- perhaps you could use the REFERRER header and send a redirect or return an instantly created ActionForward forwarding to that path. If you sent a redirect, you'd return null.

Without understanding your situation completely, I'd think a better response would be to do session validation somewhere else, instead of in a single action. The simplest way would probably be to write an abstract base class, BaseSessionValidatingAction, and implement the validation in that classes 'execute' method; then if validation passes, have the base action call an abstract method like 'executeValidated(...)' which your subclasses would implement.

Does that fit the bill?

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin


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



Reply via email to