• 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
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Doubt in Final Mock Exam:HFSJ  RSS feed

 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From HFSJ: Final Mock Exam: Ques No:22 Page No:810


I thought of only A. But the answer given as A and C.
Actually <jsp:forward pade="/footer.html"/> is used to include the dynamic content only.. then how..?

My general doubt:
In which case option D will be true?
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I thought of only A. But the answer given as A and C.
Actually <jsp:forward pade="/footer.html"/> is used to include the dynamic content only.. then how..?


A and C, not B. jsp:include allows to include both static and dynamic content.

About D, remember that the question is about JSP. D is not even scriptlet.
 
Enthuware Software Support
Posts: 4246
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two things:
1. Including dynamic content (i.e. by executing some code at the server side to generate new content as opposed to static content such as pure HTML pages).

JSP constructs such as scriptlets are used to generate dynamic content regardless of whether they are included statically or dynamically. A jsp page, whether included statically or dynamically can generate dynamic content. An HTML file, whether included statically or dynamically, can provide only static content.

2. Including content dynamically (i.e. at request time as opposed to statically i.e. compile time).
jsp:include (and jsp:forward) action is used to include content dynamically regardless of whether the content is static or dynamic.


If you want to include static content (which is what the question is asking), you can include it statically (option a) as well as dynamically (which the question has not specified) (option c).

I hope I didn't confuse you
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!