Forums Register Login

Including static content

+Pie Number of slices to send: Send
Which JSP code would include static content in a JSP ?

1) <%@ include file="/seg/footer.html" %>
2) <jsp:forward page="/seg/footer.html" />
3) <jsp:inlcude page="/seg/footer.html" />
4) RequestDispatcher dis =request.getRequestDispatcher("/seg/footer.html");
dis.include(request,response);

Answer to given ? is 1) and 3). Iam wondering why 4) is not valid answer ?

Pls help...
+Pie Number of slices to send: Send
I don't see why 4 is incorrect.
The answers should be 1) 2) and 4).

Check the mock exam's errata.

Regards.
+Pie Number of slices to send: Send
Marcelo,

I hv checked the errata. It doesnot says nything abt this question.

Please Bert, can you explain answer to this question ?
+Pie Number of slices to send: Send
I think the question is specifically looking for JSP Code. Not scripting.
+Pie Number of slices to send: Send
but scripting is also part of JSP page
+Pie Number of slices to send: Send
Hi all
if the last option is within <% %>(scriptlet).Then it would be a correct option.But,here it is not enclosed with <% %>.That's why the last option is not a correct JSP code.

Hope I'm clear
Shanthi
+Pie Number of slices to send: Send
Shantishri, I agreed with you. I hope that is the reason. Thanks everybody.
+Pie Number of slices to send: Send
is 2 correct answer?
+Pie Number of slices to send: Send
minu. 2 IS NOT RIGHT. ONLY 1 AND 3 ARE CORRECT.
It was the best of times. It was the worst of times. It was a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 825 times.
Similar Threads
including static content, mock exam question
HFSJ final mock exam question
HFS Mack Exam Q22 - Page 772 - ResquestDispatcher - Is the answer correct?
Doubt in Final Mock Exam:HFSJ
HFSJ Mock Exam
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:56:38.