[Top] [Prev] [Next] [Bottom]

<jsp:forward>

Forwards a client request to an HTML file, JSP file, or servlet for processing.

JSP Syntax

<jsp:forward page="{ relativeURL | <%= expression %> }" />

Examples

<jsp:forward page="/servlet/login" />

Description

The <jsp:forward> tag forwards the request object sent to the JSP file to another file for processing. The JSP engine does not process any of the remainder of the JSP file.

If the output from the compiled JSP file is buffered (by using a page directive with the default value or an explicit size set for buffer), the buffer is cleared before the request is forwarded. If the output is not buffered (if you used a page directive with buffer=none), and if anything has been written to the buffer, using <jsp:forward> results in an IllegalStateException.

Attributes

See Also



[Top] [Prev] [Next] [Bottom]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.