Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authorization Interceptor

Tim Sparg
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I previously posted this on the EJB forum but haven't received any response, so I thought I should repost it here and see if anybody knows the answer

I have the an Authorization Interceptor that only allows something to proceed if it it has the correct role.

This is implemented as follows:

Here is a simple example of something that the interceptor will go around.

This works correctly, however the Application Server returns a HTTP 500 exception.
How would I make the server return a HTTP 401 (Unauthorised) Exception instead of the 501?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic