After user logged-in, query and find out the user's role. If he is admin, using setAttribute set the value. Then in JSP using getAttribute, get the value and disable the button.
<% if (user.equalsIgnoreCase("admin")) {
String val = (String) request.getAttribute("role");
add DISABLED property in the button....
}else{
%>
put the button here which is not disabled...
<%}%>
That is not so hard :)
Simple example:
<form action="test.jsp" method="post">
<input type="text" name="address" />
<input type="text" name="number" />
<%
if( request.getAttribute("user").getUserName().equals("admin"))
{
%>
<input type="submitAdmin" value="Insert new address and number" />
<%
}
else
{
%>
<input type="submitUser" value="Search for address and number" />
<%
}
%>
</form>
<%
if(check the logged in is administrator)
{%>
<input type = submit value="somevalue" disabled>
}
else
{%>
<input type = submit value="somevalue">
<%}%>
%>
i think it works