Example usage for javax.servlet.http HttpServletRequest getRequestDispatcher

List of usage examples for javax.servlet.http HttpServletRequest getRequestDispatcher

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest getRequestDispatcher.

Prototype

public RequestDispatcher getRequestDispatcher(String path);

Source Link

Document

Returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path.

Usage

From source file:io.muic.ooc.webapp.servlet.RegisterServlet.java

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    RequestDispatcher rd = request.getRequestDispatcher("WEB-INF/signup.jsp");
    rd.include(request, response);/*ww w.  j  a va2 s. c  o m*/
}

From source file:net.bluehornreader.web.RedirectServlet.java

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
    try {/*from w  w w  .  ja va  2s. co m*/
        LOG.info("Redirecting to " + target);
        request.getRequestDispatcher(target).forward(request, response);
    } catch (Throwable e1) {
        e1.printStackTrace();
    }
}

From source file:com.swdouglass.joid.server.UserUrlFilter.java

private void forward(HttpServletRequest request, HttpServletResponse response, String path)
        throws IOException, ServletException {
    request.getRequestDispatcher(path).forward(request, response);
}

From source file:io.muic.ooc.webapp.servlet.LogoutServlet.java

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    securityService.logout(request);//from  w w w. j a  v a2s . com
    RequestDispatcher rd = request.getRequestDispatcher("WEB-INF/login.jsp");
    rd.include(request, response);
}

From source file:cz.muni.fi.myweb1.RestaurantServlet.java

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    RequestDispatcher rd = request.getRequestDispatcher("/outline.jsp");
    rd.forward(request, response);// w  w  w.  j  a va 2s  .  co m
}

From source file:DispatchServlet.java

public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {

    // Forward to a display page
    String display = "/servlet/SearchView";
    RequestDispatcher dispatcher = req.getRequestDispatcher(display);
    dispatcher.forward(req, res);/*from  ww w  .  ja  v  a  2 s .  c om*/
}

From source file:com.gigglinggnus.controllers.AdminClockController.java

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {

    RequestDispatcher rd = request.getRequestDispatcher("/admin/set-clock.jsp");
    rd.forward(request, response);/*from  w ww. jav  a2 s.c  o m*/
}

From source file:com.sun.socialsite.web.rest.core.XrdsFilter.java

public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
        throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    if ("application/xrds+xml".equals(request.getHeader("Accepts"))) {
        RequestDispatcher rd = request.getRequestDispatcher("/WEB-INF/jsps/xrds.jsp");
        rd.include(req, res);/*w w  w. j  a  v  a2 s.  c  o m*/
    } else {
        chain.doFilter(req, res);
    }
}

From source file:com.wibidata.shopping.servlet.SignInServlet.java

@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
    request.setCharacterEncoding("UTF-8");
    request.getRequestDispatcher("/WEB-INF/view/SignIn.jsp").forward(request, response);
}

From source file:com.wibidata.shopping.servlet.CreateUserServlet.java

@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
    request.setCharacterEncoding("UTF-8");
    request.getRequestDispatcher("/WEB-INF/view/CreateUser.jsp").forward(request, response);
}