Click
Click Examples

Navigation A

You are currently on page NavigationA.

Forward

To forward to NavigationB click here.
    setForward("/navigation-b.jsp");
To forward to NavigationB passing the parameter 14 click here.
    getContext().getRequest().setAttribute("param", param);
    setForward("/navigation-b.jsp");

Redirect

To redirect to NavigationB click here.
    setRedirect("/navigation-b.jsp");
To redirect to NavigationB passing the parameter 14 click here.
    setRedirect("/navigation-b.jsp?param=" + param);

Take notice of the different URLs in your browser when you use forward and redirect.