Showing posts with label servlet. Show all posts
Showing posts with label servlet. Show all posts

Thursday, January 5, 2012

Determine user in Tomcat

To determine user authentication info in Tomcat, we can use the following:

getRemoteUser()
isUserInRole(String role)

Both methods are under javax.servlet.http.HttpServletRequest.

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...