Codota Logo
MadvocServletFilter
Code IndexAdd Codota to your IDE (free)

How to use
MadvocServletFilter
in
jodd.madvoc

Best Java code snippets using jodd.madvoc.MadvocServletFilter (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: oblac/jodd

/**
 * Builds {@link ActionRequest} and invokes it. If action result is a chain, it repeats the process.
 */
@Override
public void doFilter(final ServletRequest req, final ServletResponse res, final FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request = (HttpServletRequest) req;
  HttpServletResponse response = (HttpServletResponse) res;
  String actionPath = DispatcherUtil.getServletPath(request);
  try {
    MadvocResponseWrapper madvocResponse = new MadvocResponseWrapper(response);
    actionPath = madvocController.invoke(actionPath, request, madvocResponse);
  } catch (Exception ex) {
    log.error("Invoking action path failed: " + actionPath, ex);
    throw new ServletException(ex);
  }
  if (actionPath != null) {	// action path is not consumed
    boolean pathProcessed = processUnhandledPath(actionPath, req, res);
    if (!pathProcessed) {
      chain.doFilter(request, response);
    }
  }
}
origin: org.jodd/jodd-wot

/**
 * Filter initialization.
 */
public void init(FilterConfig filterConfig) throws ServletException {
  ServletContext servletContext = filterConfig.getServletContext();
  madvoc = Madvoc.get(servletContext);
  if (madvoc == null) {
    madvoc = createMadvoc(filterConfig);
    try {
      madvoc.startNewWebApplication(servletContext);
    } catch (Exception ex) {
      throw new ServletException("Unable to start Madvoc web application.", ex);
    }
  }
  log = Log.getLogger(MadvocServletFilter.class);
  madvocController = madvoc.getMadvocController();
}
origin: org.jodd/jodd-wot

/**
 * Builds {@link ActionRequest} and invokes it. If action result is a chain, it repeats the process.
 */
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request = (HttpServletRequest) req;
  HttpServletResponse response = (HttpServletResponse) res;
  String actionPath = DispatcherUtil.getServletPath(request);
  try {
    actionPath = madvocController.invoke(actionPath, request, response);
  } catch (Exception ex) {
    log.error("Exception while invoking action path: " + actionPath, ex);
    ex.printStackTrace();
    throw new ServletException(ex);
  }
  if (actionPath != null) {	// action path is not consumed
    actionPath = processUnhandledPath(actionPath, req, res);
    if (actionPath != null) {
      chain.doFilter(request, response);
    }
  }
}
jodd.madvocMadvocServletFilter

Javadoc

Madvoc filter serves as a jodd.madvoc.component.MadvocController part of the Madvoc framework.

Most used methods

  • processUnhandledPath
    Process unconsumed action paths. Returns true if action path is consumed, otherwise returns false so
  • createMadvoc
    Creates Madvoc if not already created. Override it to set custom MadvocConfig or other core settings

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now