I'm worried that my jsps will be bolated with "if-scriptlets" as a result of my access control system. ie.
...
<td><% if(userBean.isModerator()) { %>
<a href="/servlet/removePost?ID=1212">Remove this post</a>
<% }
else
{ %>
<% } %>
</td>
...
jleech, is this what you ment with the dynamic menus thing? that I should do that kind of checking in a filter and just store the resulting in variable somewhere that is accessible from the jsp.
filter:
...
String removePostString = "";
if(userBean.isModerator())
removePostString = "<a href=\"/servlet/removePost?ID=1212\">Remove this post</a>";
stringsBean.setRemovePost(RemovePostString);
...
jsp:
...
<td>
<jsp:getProperty name="stringsBean" property="removePost"/>
</td>
...
The last sure looks cleaner to me... I guess the different strings could be stored in a file somewhere...
Is this a good idea?
/Niklas Andersson
Sweden