how to show a custom error page when user fails to see a page (when do not have specific permission) after getting HTTP 500 –
org.springframework.security.access.AccessDeniedException: Access is denied
Exception from custom hasPermission() method.
You can check my previous question here to see my code.
In your struts2 config file you can configure global exceptions like
that will work for application level if you find fine grained exception handling thing you can define it for action level itself
So it depends upon you choice how you want to configure it.for details refer.
Exception handling in Struts2
My suggestion is not to throw every exception as a raw one better create your own exception wrappers and wrap such exceptions in them it will help you to organize your code in better way
Hope this will help you.