It was discussed here. It can be done by filter if you wrap up a response and will provide your output stream which will control HTML content and cut protected elements. However this approach looks a bit complicated for me.
You can have a format (probably a xml structure) that would map user to the input elements that is unprotected for him for a particular page.Now you can write a taglib , that will make use of this xml to decide whether the field to be rendered should be protected or unprotected for this user. In this way you will develope a complete infrastructure for handling this issue in the application.
Hello all and thanks for the fast reply filters is the answer indid but im trying to find implement it in as much as less painful way . that is im trying to avoid adding ( surrounding ) the html elements with <c:if > and such . i have 600 pages what im thinking about is ( i dont know if it can be done ) to add some function or some other thing to each html element this function or indicator will be checked by the filter before it renders to the output . so all the logic will be in the filter side and it be written once . can it be done ?
Originally posted by Meir Yan: what im thinking about is ( i dont know if it can be done ) to add some function or some other thing to each html element this function or indicator will be checked by the filter before it renders to the output . so all the logic will be in the filter side and it be written once . can it be done ?
It reminds me a custom JSF component I made for some similar kind of thing. Anyway, you can achieve this kind of behavior using custom tag. Filter is not the best solution here, I believe.
Thanks for the reply well i cant do jsf because i dont have jsf only jsp but can you or someone please give me example code or some thing to go from there ? for me to understand ?
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
a bit of art, as a gift, that will fit in a stocking