Forums Register Login

page directive

+Pie Number of slices to send: Send
Hi..
My question is on the page directive in JSP.
The page directive can have an attribute called extends. So my questions are :
1. Does this correspond to the "extends" portion or the "implements" portion in the translated servlet class.
2. If it corresponds to the "implements" portion, then can this attribute have multiple values and how? The API mentions that only the import attribute may repeat multiple times.
3. Which directive do you use to specify protocol, because if I specify a protocol other than HTTP, then I should be able to "extend" another class other than HttpServlet in my JSP's translated class. How do you do that?
Thanks in advance
Regards
SR
+Pie Number of slices to send: Send
1, No, it only corresponds to extends not implements. However, the class you extend can implement any interfaces you wish.
2, See 1
3, If you read JSP Spec : JSP.8.2.4 Using the extends Attribute, and follow it's requirements you should have enough information to do this. First however, you need to be able to create a Servlet class that implements another protocol besides HTTP before you should attempt this.
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 650 times.
Similar Threads
page directive
Which of the following are valid JSP code fragments?
A JSP page's servlet class must extend
mock question-page directive
A simple doubt in jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:20:59.