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 String
addContextPath
(String contextPath, String htmlCode) Opravi cesty pre dany HTML kodvoid
destroy()
void
doFilter
(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain) 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.jspvoid
init
(javax.servlet.FilterConfig filterConfig) static boolean
isRunning
(javax.servlet.http.HttpServletRequest request) Vrati true ak sa pouziva ContextFilter, inak falsestatic String
removeContextPath
(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:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroy
in 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:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.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:
-