Click
Click Examples

Navigation B

You are currently on page NavigationB.

Forward

To forward to NavigationA click here.
    setForward("/navigation-a.jsp");
To forward to NavigationA passing the parameter 7 click here.
    getContext().getRequest().setAttribute("param", param);
    setForward("/navigation-a.jsp");

Redirect

To redirect to NavigationA click here.
    setRedirect("/navigation-a.jsp");
To redirect to NavigationA passing the parameter 7 click here.
    setRedirect("/navigation-a.jsp?param=" + param);

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