[EMAIL PROTECTED] wrote the following on 9/9/2005 10:19 AM:

I can see myself doing this check many times in many methods in many backing beans (which extend AbstractViewController). What is the appropriate way to implement this check - or for that matter any other common code? I can of course extend AbstractViewController and write this method there and all my beans can call it... but I kind of think there must be a better way..? (Something like Struts' RequestProcessor..) I thought perhaps this may be where preprocess() can come in handy - however, that method returns void. Plus it is within each backing bean and not common to all backing beans..

I would think JSF could use regular servlet filters? If so, that's where I'd do stuff that you want checked on almost every request. Even in Struts, I wouldn't touch the RequestProcessor. Use a ServletFilter. They are easy to set up and I'll provide an example if you want one. I'm not sure of the implications of using them with JSF, but I'm sure they could be used.

--
Rick

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

Reply via email to