Posts

Showing posts from September, 2012

apache shiro 404 and 500

in java web application you can easily set 400 and 500 error pages via web.xml like this <error-page> <error-code>500</error-code> <location>/500.jsp</location> </error-page> <error-page> <error-code>400</error-code> <location>/404.jsp</location> </error-page> <error-page> <error-code>404</error-code> <location>/404.jsp</location> </error-page> this means when someone clicks on a url which is 404 or 500 server will show them the pages you got in your app. this is better then showing them default server error pages. you can see good 404 examples from here anyway while I was developing a web application with apache shiro I could not show my 404 or 500 pages and it was throwing a no securitymanager at this thread exceptions. after I research on this I find out that the example of shiro is not enough. because there was just a filter and it points /*. I