Can servlet security annotations apply to different urls?

Solution Verified - Updated -

Issue

  • Can servlet security annotations apply to different url paths? For instance, we have a servlet bound to /foo/*. We'd want /foo/secure/* requests to this servlet to require authentication and all other requests to be unsecured. Is there anyway to achieve that via annotations?

Environment

  • JBoss Enterprise Application Platform (EAP) 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.