Package javax.servlet

Examples of javax.servlet.RequestDispatcher


    * @param config    Login configuration describing how authentication
    *              should be performed
    */
   protected void forwardToLoginPage(Request request, Response response, LoginConfig config)
   {
       RequestDispatcher disp =
           context.getServletContext().getRequestDispatcher
           (config.getLoginPage());
       try {
           disp.forward(request.getRequest(), response.getResponse());
           response.finishResponse();
       } catch (Throwable t) {
           log.warn("Unexpected error forwarding to login page", t);
       }
   }
View Full Code Here


    * @param config    Login configuration describing how authentication
    *              should be performed
    */
   protected void forwardToErrorPage(Request request, Response response, LoginConfig config)
   {
       RequestDispatcher disp =
           context.getServletContext().getRequestDispatcher
           (config.getErrorPage());
       try {
           disp.forward(request.getRequest(), response.getResponse());
       } catch (Throwable t) {
           log.warn("Unexpected error forwarding to error page", t);
       }
   }
View Full Code Here

      HttpServletRequest request, HttpServletResponse response)
      throws XException
  {
    try
    {
      RequestDispatcher dispatcher = servlet.getServletContext()
          .getRequestDispatcher(url);
      dispatcher.forward(request, response);
    }
    catch (IOException e)
    {
      throw new XException(Constants.LOCATION_INTERN,
          Constants.LAYER_ADMIN, Constants.PACKAGE_ADMIN_ADMIN, "0",
View Full Code Here

         {
            throw new ServletException("Failed to get MBeans", e);
         }
      }
      request.setAttribute("mbeans", mbeans);
      RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/displayMBeans.jsp");
      rd.forward(request, response);
   }
View Full Code Here

      log.trace("inspectMBean, name="+name);
      try
      {
         MBeanData data = getMBeanData(name);
         request.setAttribute("mbeanData", data);
         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/inspectMBean.jsp");
         rd.forward(request, response);
      }
      catch(Exception e)
      {
         throw new ServletException("Failed to get MBean data", e);
      }
View Full Code Here

      try
      {
         AttributeList newAttributes = setAttributes(name, attributes);
         MBeanData data = getMBeanData(name);
         request.setAttribute("mbeanData", data);
         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/inspectMBean.jsp");
         rd.forward(request, response);
      }
      catch(Exception e)
      {
         throw new ServletException("Failed to update attributes", e);
      }
View Full Code Here

    
      try
      {
         OpResultInfo opResult = invokeOp(name, index, args);
         request.setAttribute("opResultInfo", opResult);
         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/displayOpResult.jsp");
         rd.forward(request, response);
      }
      catch(Exception e)
      {
         throw new ServletException("Failed to invoke operation", e);
      }
View Full Code Here

         throw new ServletException("No methodName given in invokeOpByName form");
      try
      {
         OpResultInfo opResult = invokeOpByName(name, methodName, argTypes, args);
         request.setAttribute("opResultInfo", opResult);
         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/displayOpResult.jsp");
         rd.forward(request, response);
      }
      catch(Exception e)
      {
         throw new ServletException("Failed to invoke operation", e);
      }
View Full Code Here

      {
         // Query for the membership of the partition cluster
     String[] hosts = {};
         request.setAttribute("partition", "none");
         request.setAttribute("partitionHosts", hosts);
         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/cluster/clusterView.jsp");
         rd.forward(request, response);
      }
      catch(Exception e)
      {
         log.debug("Failed to get partition view", e);
         response.sendError(HttpServletResponse.SC_NO_CONTENT, "No partition view found");
View Full Code Here


   protected void forwardToErrorPage(Request request, HttpServletResponse response, LoginConfig config)
   throws IOException
   {
      RequestDispatcher disp =
          context.getServletContext().getRequestDispatcher
          (config.getErrorPage());
      try {
          disp.forward(request.getRequest(), response);
      } catch (Throwable t) {
         String msg = sm.getString("Unexpected error forwarding to error page");
         log.warn(msg, t);
         request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
         response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
View Full Code Here

TOP

Related Classes of javax.servlet.RequestDispatcher

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.