Mixing JSPs and HTML (II)
Can jsp:forward be used to forward to an HTML?
i.e., <jsp:forward page="/schedule/index.html" />
Re: Mixing JSPs and HTML (II)
In article <firstname.lastname@example.org>,
Carl Crosswhite <Carlxw@ix.netcom.com> wrote:
>Can jsp:forward be used to forward to an HTML?
>i.e., <jsp:forward page="/schedule/index.html" />
Yes, with one caveat. According to section 2.5.2 of the spec:
When a path starts with a "/" it is to be interpreted by the application
to which the JSP page belongs; i.e its ServletContext object provides
the base context URL.
What this means in practice is that if you have a web application
installed as /myapp, and you want to forward to /myapp/somedir/index.html,
your tag would look like:
<jsp:forward page="/somedir/index.html" />
that is, without the /myapp. You can not redirect to a different web
application with jsp:forward, although you can with a regular HTTP
The same goes for jsp:include - you can include an HTML page or output
of a servlet in a JSP.
Last Post: 09-22-2000, 10:15 AM
By Carl Crosswhite in forum authorevents.pekowsky
Last Post: 08-16-2000, 11:48 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center