You can achieve this using the
<intercept-url> element
The intercept-url element can be used to define a pattern which is matched against the URLs of incoming requests using an ant path style syntax.
For example with Spring 3.0 + using SpEL:
<http auto-config="true" use-expressions="true">
<intercept-url pattern="/common/*" access="permitAll" />
<intercept-url pattern="/registered/*" access="hasAnyRole('ROLE_USER,ROLE_ADMIN')" />
<intercept-url pattern="/admin/**" access="hasRole('ROLE_ADMIN')" />
</http>
If you don't have SpEL support then use like this:
<http auto-config='true'>
<intercept-url pattern="/common/*" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/registered/*" access="ROLE_USER,ROLE_ADMIN" />
<intercept-url pattern="/admin/*" access="ROLE_ADMIN" />
</http>
Documentation
Update - If you are doing forwards in your JSP/JSP, you need to set the once-per-request="false" on the http element.
See also: