Package javax.servlet.http

Examples of javax.servlet.http.HttpServlet


    protected void setUp() throws Exception {
        super.setUp();
    }
   
    public void testInvoke() throws Exception {
        HttpServlet servlet = new HttpServlet() {
            private static final long serialVersionUID = 1L;

            public void service(HttpServletRequest req, HttpServletResponse res)
                    throws ServletException, IOException {
               
View Full Code Here


        FrameworkLockHolder frameworkLockHolder = moduleManagementFacade.getFrameworkLockHolder();
       
        try {
            frameworkLockHolder.writeLock();
            WebApplicationContext wac = createWebApplicationContext();
            HttpServlet delegateServlet = this;
        
            this.invoker = getInvoker(wac, delegateServlet, frameworkLockHolder, this.setThreadContextClassLoader);
           
            //FIXME this probably shouldn't automatically be being called. How to stop it from being called inappropriately
            //However, it must be called
View Full Code Here

   
    if (target instanceof HttpServiceInvoker) {
      HttpServiceInvoker invoker = (HttpServiceInvoker) target;
      invoker.invoke(request, response, null);
    } else if (target instanceof HttpServlet) {
      HttpServlet servlet = (HttpServlet) target;
      servlet.service(request, response);
    } else if (target instanceof Filter) {
      Filter filter = (Filter) target;
      filter.doFilter(request, response, filterChain);
    } else {
      //FIXME add logging
View Full Code Here

                    " This attribute needs to be set in order for ModuleJspServlet to be able to find the module registered JSP servlet to which the request will be forwarded." +
                    " Possible causes: 1) you have not set the property 'partitioned.servlet.context=true' in impala.properties, or " +
                    " 2) you have attempted to access the JSP directly rather than through a request or forward from a servlet or filter within the application.");
        }

        final HttpServlet jspServlet = (HttpServlet) servletContext.getAttribute(prefix + JspConstants.JSP_SERVLET);
       
        if (jspServlet == null) {
            throw new IllegalStateException("No JSP servlet registered in the module to which the request was directed." +
                    " Your module configuration requires a " + JspServletFactoryBean.class + " configuration entry, or equivalent.");
        }
       
        jspServlet.service(req, resp);
    }
View Full Code Here

        FrameworkLockHolder frameworkLockHolder = moduleManagementFacade.getFrameworkLockHolder();
       
        try {
            frameworkLockHolder.writeLock();
            WebApplicationContext wac = createWebApplicationContext();
            HttpServlet delegateServlet = this;
        
            this.invoker = getInvoker(wac, delegateServlet, frameworkLockHolder, this.setThreadContextClassLoader);
           
            //FIXME this probably shouldn't automatically be being called. How to stop it from being called inappropriately
            //However, it must be called
View Full Code Here

  void doService(HttpServletRequest request, HttpServletResponse response,
      ServletContext context, String servletPath)
      throws ServletException, IOException {
    String moduleName = ModuleProxyUtils.getModuleName(servletPath, modulePrefix);
   
    HttpServlet moduleServlet = null;
    if (moduleName != null) {
      moduleServlet = ImpalaServletUtils.getModuleServlet(context, moduleName);
      if (moduleServlet != null) {
       
        //explicitly go through service method
        HttpServletRequest wrappedRequest = wrappedRequest(request, context, moduleName);
        moduleServlet.service(wrappedRequest, response);
      } else {
        logger.warn("No redirection possible for servlet path " + servletPath + ", module name " + moduleName);
      }
    } else {
      logger.warn("Not possible to figure out module name from servlet path " + servletPath);
View Full Code Here

   
    if (target instanceof HttpServiceInvoker) {
      HttpServiceInvoker invoker = (HttpServiceInvoker) target;
      invoker.invoke(request, response, null);
    } else if (target instanceof HttpServlet) {
      HttpServlet servlet = (HttpServlet) target;
      servlet.service(request, response);
    } else if (target instanceof Filter) {
      Filter filter = (Filter) target;
      filter.doFilter(request, response, filterChain);
    } else {
      logger.warn("invoke called with target " + (target != null ) + " which is not an instance of " + HttpServiceInvoker.class.getSimpleName() + ", " +
View Full Code Here

      ServletContext context)
      throws ServletException, IOException {
   
    String moduleName = getModuleName(request);
   
    HttpServlet moduleServlet = null;
    if (moduleName != null) {
      moduleServlet = WebServletUtils.getModuleServlet(context, moduleName);
      if (moduleServlet != null) {
       
        //explicitly go through service method
        HttpServletRequest wrappedRequest = wrappedRequest(request, context, moduleName);
        moduleServlet.service(wrappedRequest, response);
      } else {
        logger.warn("No redirection possible for servlet path " + request.getServletPath() + ", module name " + moduleName);
      }
    } else {
      logger.warn("Not possible to figure out module name from servlet path " + request.getServletPath());
View Full Code Here

      ServletContext context)
      throws ServletException, IOException {
   
    String moduleName = getModuleName(request);
   
    HttpServlet moduleServlet = null;
    if (moduleName != null) {
      moduleServlet = ImpalaServletUtils.getModuleServlet(context, moduleName);
      if (moduleServlet != null) {
       
        //explicitly go through service method
        HttpServletRequest wrappedRequest = wrappedRequest(request, context, moduleName);
        moduleServlet.service(wrappedRequest, response);
      } else {
        logger.warn("No redirection possible for servlet path " + request.getServletPath() + ", module name " + moduleName);
      }
    } else {
      logger.warn("Not possible to figure out module name from servlet path " + request.getServletPath());
View Full Code Here

  @Override
  protected void doService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    
    WebApplicationContext wac = this.getWebApplicationContext();
   
    HttpServlet delegateServlet = ObjectUtils.cast(wac.getBean(delegateServletBeanName),
        HttpServlet.class);
   
    if (delegateServlet == null) {
      throw new ConfigurationException("No Servlet registered under name " + delegateServletBeanName);
    }
View Full Code Here

TOP

Related Classes of javax.servlet.http.HttpServlet

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.