Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rd.forward handle static content?

 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hanumant book says that we can forward from one active resouce to another resource (jsp, servlet, html...) so that that mean include directive, jsp:include and rd.forward/include all can take static content?

Bhumika.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It is true. You can include/forward to both static and dymamic pages.

Thanks
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In case of include directives. It treat the file like static object (text). The contents are included at the compile time. The contents are parse by the container.

thanks
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP2.0 Specs, page: 1-110 and 1-111 (Part-I, standard actions)
JSP.5.5 <jsp:forward>

A <jsp:forward page="urlSpec"/> action allows the runtime dispatch of the current request to a static resource, a JSP page or a Java servlet class in the same context as the current page. A jsp:forward effectively terminates the execution of the current page.

A jsp:forward action may have jsp:param subelements that can provide values
for some parameters in the request to be used for the forwarding.

If the page output is buffered, the buffer is cleared prior to forwarding.

If the page output is buffered and the buffer was flushed, an attempt to
forward the request will result in an IllegalStateException.

If the page output was unbuffered and anything has been written to it, an
attempt to forward the request will result in an IllegalStateException.

Syntax:
<jsp:forward page="relativeURLspec"/>

<jsp:forward page="urlSpec">
{ <jsp:param .... /> }*
</jsp:forward>

page - a relative url

Examples:

<% String whereTo = "/templates/"+someValue; %>
<jsp:forward page=�<%= whereTo %>� />

[ May 19, 2005: Message edited by: Vishwa Kumba ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic