Package org.apache.tomcat.core

Examples of org.apache.tomcat.core.BaseInterceptor


            Vector ctxModules=new Vector();
            allModules.put( context, ctxModules );

      // Now add all modules to cm
      for( int i=0; i< modV.size(); i++ ) {
    BaseInterceptor bi=(BaseInterceptor)modV.elementAt( i );
    if(debug>0) log( "Add dummy module, for configuration " + context.getDocBase() + " " + context);
    cm.addInterceptor( bi );
                ctxModules.addElement( bi );
      }
      cm.setNote"trustedLoader.currentContext", null );
View Full Code Here


        Vector ctxModules = (Vector)allModules.get( ctx );
        if( ctxModules != null ) {
            // remove modules
            for( int i=0; i< ctxModules.size(); i++ ) {
                BaseInterceptor bi=(BaseInterceptor)ctxModules.elementAt( i );
                cm.removeInterceptor( bi );
            }
            ctxModules.removeAllElements();
        } else {
            ctxModules = new Vector();
            allModules.put( ctx, ctxModules );
        }

  // The real loader is set.
  Vector modV=new Vector();
  if( debug > 0 ) log( "Loading the real module " + ctx + " " + modules);
  loadInterceptors( ctx, modules, modV );
  cm.setNote( "trustedLoader.currentContext", ctx );

  // Now add all modules to cm
  for( int i=0; i< modV.size(); i++ ) {
      BaseInterceptor bi=(BaseInterceptor)modV.elementAt( i );
      cm.addInterceptor( bi );
            ctxModules.addElement( bi );
  }
  cm.setNote"trustedLoader.currentContext", null );
    }
View Full Code Here

  }
    }

    void loadJsp( Context context, Handler result ) throws Exception {
  // A Jsp initialized in web.xml -
        BaseInterceptor ri[];
  String path=((ServletHandler)result).getServletInfo().getJspFile();
  String requestURI = path + "?jsp_precompile=true";

  Request req = cm.createRequest(context, requestURI);
  ri=context.getContainer().
View Full Code Here

  }
  // preInit have no exceptions and doesn't delay us
  // We can run init hooks and init

  // Call pre, doInit and post
  BaseInterceptor cI[]=context.getContainer().getInterceptors();
  for( int i=0; i< cI.length; i++ ) {
      try {
    cI[i].preServletInit( context, this );
      } catch( TomcatException ex) {
    // log, but ignore.
View Full Code Here

   
    protected void doDestroy() throws TomcatException {
  synchronized (this) {
      try {
    if( servlet!=null) {
        BaseInterceptor cI[]=context.
      getContainer().getInterceptors();
        for( int i=0; i< cI.length; i++ ) {
      try {
          cI[i].preServletDestroy( context, this );
      } catch( TomcatException ex) {
View Full Code Here

    // Overrides the default handler
    public void service ( Request req, Response res )
  throws Exception
    {
        BaseInterceptor ri[];
  ri=context.getContainer().
      getInterceptors(Container.H_preInitCheck);
  for( int i=0; i< ri.length; i++ ) {
      int status = ri[i].preInitCheck(req, this);
      if(status != 0) {
View Full Code Here

    {
  // set the owner module for the servlet.
  // Even if the servlets are defined in WebXmlReader, they should
  // belong to Servlet22Interceptor. ( it's easy to set WebXmlReader,
  // but it's more intuitive to set debug and options on Servlet22 )
  BaseInterceptor mods[]=ctx.getContainer().getInterceptors();
  for( int i=0; i<mods.length; i++ ) {
      if( mods[i] instanceof Servlet22Interceptor ) {
    handler.setModule( mods[i] );
    break;
      }
View Full Code Here

    public void prompt( Object [] modules, Context ctx, int delay, int scroll ) {
        if ( !valid )
            return;

        for ( int i = 0; i < modules.length; i++ ) {
            BaseInterceptor module = (BaseInterceptor)modules[i];
            if ( !moduleClass.isInstance( module ) ) {
                continue;
            }
            if ( !testMethod.invokeBool( module, true ) ) {
                if ( debug > 0 ) {
View Full Code Here

TOP

Related Classes of org.apache.tomcat.core.BaseInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.