Forums Register Login

[mock][HF][pageContext]

+Pie Number of slices to send: Send
I. HF page 800 Q:4
1. <%@ attribute name="data" %>
2. <% pageContext.getOut().print(data+data); %>
3. <% getJspContext().getOut().print(data+data); %>
Sentence 3 is ok but sentence 2 is compile error. My question is why the implicit object "pageContext" isn't available there. I think it should be available at any time in a JSP file, just like "out" implicit object.
+Pie Number of slices to send: Send
Above file should be tag file becse attribute directive is used.. In tag files pageContext is not available (it is like extending SimpleTagSupport..)

Hope this helps..
+Pie Number of slices to send: Send
Got it. Thanks a lot.
What are your superhero powers? Go ahead and try them on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 588 times.
Similar Threads
Jsp implicit objects
pageContext implicit variable inside a tag file
JSP implicit objects
page and PageContext
confusion about implicit object
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:29:13.