users@glassfish.java.net

Re: Can we use _at_RolesAllowed on a servlet?

From: Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Tue, 30 Mar 2010 20:46:59 +0530

Sarah kho wrote:
> Hi
>
> Can you please let me know whether we can use @RolesAllowed on a
> Servlet or not?
> I am testing a Servlet with this annotation but even not authenticated
> users can access the Servlet. Does it meant to be used on servlets as
> well?
you cannot use @RolesAllowed but there are other standard annotations
defined in JavaEE6 : see
http://blogs.sun.com/swchan/entry/follow_up_on_servlet_3
>
> thanks.
>