• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt in Final Mock Exam:HFSJ

 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4832
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic