We are using struts 2. I want to set some hidden parameter values in all JSP's. I am trying to achieve this using interceptors. The moment I call invocation.invoke();, the result is already generated. How do I set certain parameter values in interceptors?
How do I set certain parameter values in interceptors? Before action execution or after action execution. Please make it more clearly that will help us to help you better.
ocjp 6 ā Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
We can set the hidden variables in jsp itself why you want to it here.
ocjp 6 ā Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Those are common hidden variables in all JSP's. I would like to to do it from common place like interceptors. I don't want all developers to set values for these hidden variables in their action methods.
if these params are required over all the jsps and if these are user actions specific/dependent you can as well put the in the session an play with them anytime...
just a word of caution though: playing with session variables might be dangerous to the appln if not used carefully..
Iām tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad: