Package sk.iway.iwcm.system.context
Class ContextFilter
java.lang.Object
sk.iway.iwcm.system.context.ContextFilter
- All Implemented Interfaces:
javax.servlet.Filter
ContextFilter.java
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddContextPath(String contextPath, String htmlCode) Opravi cesty pre dany HTML kodvoiddestroy()voiddoFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain) static voiddoFilterAddContextPathImpl(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String path, ContextResponseWrapper wrapper, boolean debug) Prida k URL adresam, presmerovaniam atd kontext path public je to kvoli 404.jspvoidinit(javax.servlet.FilterConfig filterConfig) static booleanisRunning(javax.servlet.http.HttpServletRequest request) Vrati true ak sa pouziva ContextFilter, inak falsestatic StringremoveContextPath(String contextPath, String htmlCode) Odstrani z HTML kodu odkaz na ContextPath
-
Constructor Details
-
ContextFilter
public ContextFilter()
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
doFilterAddContextPathImpl
public static void doFilterAddContextPathImpl(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String path, ContextResponseWrapper wrapper, boolean debug) Prida k URL adresam, presmerovaniam atd kontext path public je to kvoli 404.jsp- Parameters:
req-res-path-wrapper-
-
isRunning
public static boolean isRunning(javax.servlet.http.HttpServletRequest request) Vrati true ak sa pouziva ContextFilter, inak false- Parameters:
request-- Returns:
-
addContextPath
Opravi cesty pre dany HTML kod- Parameters:
htmlCode-- Returns:
-
removeContextPath
Odstrani z HTML kodu odkaz na ContextPath- Parameters:
contextPath-htmlCode-- Returns:
-