This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Provide the correct response URL to turbolinks in the 'X-XHR-Current-Location' header. Used to update the browser | |
* history after an ajax request is redirected. | |
* | |
* @author barry | |
* @since 2013/01/24 11:46 AM | |
*/ | |
public class TurboLinksUrlFilter implements Filter { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* http://pukkaone.github.com/2010/12/22/jsp-precompile-application-start.html | |
* <p/> | |
* Allows for all JSPs to be compiled with a single request to | |
* http://localhost:8080/actrack/index.html?jsp_precompile_all | |
* <p/> | |
* Use a locking flag to make sure that this operation can only be run once (to prevent possible DoS attacks) | |
* | |
* @author barry | |
* @since 2013/01/25 11:46 AM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* JSP tag that renders AntiSamy-filtered HTML, useful for displaying HTML markup in a safe way. | |
* | |
* @author barry pitman | |
* @since 2011/04/14 1:26 PM | |
*/ | |
public class SafeHtmlTag extends TagSupport { | |
private static final long serialVersionUID = 1L; | |
private static final Logger LOG = Logger.getLogger(SafeHtmlTag.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Servlet filter that checks all request parameters for potential XSS attacks. | |
* see http://bazageous.com/2011/04/14/preventing-xss-attacks-with-antisamy/ | |
* | |
* @author barry pitman | |
* @since 2011/04/12 5:13 PM | |
*/ | |
public class AntiSamyFilter implements Filter { | |
private static final Logger LOG = Logger.getLogger(AntiSamyFilter.class); |