This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

include and forward  RSS feed

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a question that i just did from the www.je22certificate.com exam
Questions like this really annoy me, i dont understand it
Question:
Which of the following statements correctly declares an element that allows the output result of a specified resource to be inserted in a JSP page? [Check all correct answers]
One of the correct answers:
The jsp:forward action also includes the output generated from the resource specified by the page attribute into the including JSP. However, jsp:forward terminates the execution of the current page whereas the jsp:include action resumes processing in the calling JSP page, once the inclusion is completed.
Now im always so careful about everything in the answer, how can a forward be considered to "include" the output generated into the the JSP page
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't think so because it clearly says output of the resource is included in jsp . this stands true only if we use include not forward because output of forward is not included in parent jsp.
kambo
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
To my sense, explanations supplied by j2eecertificate.com are right.
We may say that forward action has for effect to include the output of the target file to the output of forwarding resource: if not, how would be this process transparent for the client? You always see the same URL in the browser, right? So, the output still belongs behind the scene to the including file.
So, what differs from include action?
- First, uncommitted output in the response buffer is automatically cleared before the forward
- Second, the target resource terminates the execution.
HTH,
Regards,
Cyril.
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!