public class JspExtensionFilter extends Object implements Filter
Filter
that performs a search-and-replace on the given content of the ServletResponse
.Site
's domain) that end with ".jsp"
(respectively the configured file ending for JSPs) and removes the ".jsp" ending from that path.<a href="/en/contact.jsp">Contact</a> <a href="http://foobar.org/en/index.jsp">Index</a> <a href="http://example.com/index.jsp">Example</a>After, assuming the site's domain is 'http://foobar.org':
<a href="/en/contact">Contact</a> <a href="http://foobar.org/en/index">Index</a> <a href="http://example.com/index.jsp">Example</a>
Constructor and Description |
---|
JspExtensionFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain) |
protected String |
doReplace(List<org.appng.core.controller.filter.RedirectFilter.RedirectRule> redirectRules,
String sourcePath,
String domain,
String jspExtension,
String content) |
void |
init(FilterConfig filterConfig) |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
doFilter
in interface Filter
IOException
ServletException
protected String doReplace(List<org.appng.core.controller.filter.RedirectFilter.RedirectRule> redirectRules, String sourcePath, String domain, String jspExtension, String content)
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
ServletException
Copyright © 2011–2017 aiticon GmbH. All rights reserved.