Class ContextFilter

java.lang.Object
sk.iway.iwcm.system.context.ContextFilter
All Implemented Interfaces:
javax.servlet.Filter

public class ContextFilter extends Object implements javax.servlet.Filter
ContextFilter.java
  • Constructor Details

    • ContextFilter

      public ContextFilter()
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.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 interface javax.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

      public static String addContextPath(String contextPath, String htmlCode)
      Opravi cesty pre dany HTML kod
      Parameters:
      htmlCode -
      Returns:
    • removeContextPath

      public static String removeContextPath(String contextPath, String htmlCode)
      Odstrani z HTML kodu odkaz na ContextPath
      Parameters:
      contextPath -
      htmlCode -
      Returns: