Package org.apache.tomcat

Examples of org.apache.tomcat.Context


     *
     * @param uri Absolute URI of a resource on the server
     */
    public ServletContext getContext(String uri) {

  Context context = host.map(uri);
  if (context != null)
      return (context.getServletContext());
  else
      return (null);

    }
View Full Code Here


  // Return the appropriate Context for the specified URI
  if (uri.equals("/"))
      return (host.getRootContext());
  else {
      Context child = (Context) host.map(uri);
      if (child != null)
    return (child.getServletContext());
      else
    return (null);
  }

    }
View Full Code Here

  StandardHost host = (StandardHost) getContainer();

  // Select the Context to be used for this request
  String path = request.getRequest().getRequestURI();
  Context context = host.map(path);
  if (context == null) {
      response.getResponse().sendError
    (HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
     sm.getString("standardHost.noContext"));
      return;
  }

  // Ask this Context to process this request
  context.invoke(request, response);

    }
View Full Code Here

     * @param uri Request URI, which must start with a '/'
     */
    public Context map(String uri) {

  String path = uri;
  Context context = null;
  while (path.length() > 1) {
      context = (Context) findChild(path);
      if (context != null)
    break;
      path = path.substring(0, path.lastIndexOf("/"));
View Full Code Here

TOP

Related Classes of org.apache.tomcat.Context

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.