Unacceptable. Define de filter, wrap your forms in a custom tag and, also, define an interceptor in you web app? Since to much to remember to make it work.Tim Holloway wrote:
1. The traditional method of setting an exception interceptor in web.xml. This is done the same for JSF as it is for non-JSF webapps.
Could you exlpain a little more? Maybe an example?Tim Holloway wrote:
2. Catching the exception in the outbound leg of the filter. This one's more questionable, since there may be content already sent out, but at least you can log the status code and squirrel it away in a session parameter or something like that.
Unacceptable.Tim Holloway wrote:
3. Subclassing the form tag itself. If you've already gone through the agony of creating custom JSF tags, you've already got the practice. Just produce the parameter as part of the rendering process.
Tim Holloway wrote:
4. Creating a special-action form element tag. This is basically just a way of coding the hidden parameter, except that it's more meaningful in business terms. Plus, it allows you to specify additional options, if desired. This is probably better than subclassing the form tag, since you don't have 2 different types of form tags - just forms tagged with special behavior.
Carl Manschold wrote:What is your purpose with this?
Tim Holloway wrote:This seems to be a really complicated solution to what appears to be a simple problem.
Why is is necessary to go to the trouble of injecting a parameter on each and every JSF form submit? It's complicating the app, it's extra network traffic, it's a potential security hole, and last - but not least - if the server is just going to "talk to itself", why bother? Why not just keep the information on the server in a session object (or, if it's global, in an application-scope object)?