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

including static content, mock exam question

 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which JSP code would be used to include static content in jsp?
a. <%A include file="footer.html" %>
b. <jsp:forward page="footer.html" />
c. <jsp:include page = "footer.html" />
d. RequestDispatcher dispatcher = request.getRequestDispatcher("footer.html");
dispatcher.include(req,res)

ans: a,b


isn't b same as d. Why is this option D not an answer for this question?
 
Vishwanath Krishnamurthi
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought the would be A, C and D
All these statements are including a HTML page in the JSP, aren't they?

Option B- that's forwarding to a page not including a static content in a JSP
How come option B is right?
 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my bad, answer is given as A and C. can some one point me out to errata of first edition. May be it is already mentioned there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic