How to forward from one JSP to another JSP

When you need to forward from one JavaServer Page (JSP) to another JSP, here's all you have to do:

<jsp:forward page="/faces/success.jsp" />

In the example shown I happen to be working on a small JavaServer Faces (JSF) application, so the URL in this example includes the string /faces/.

 

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.