• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page directive

 
Paul McKenna
Ugly Redneck
Ranch Hand
Posts: 1006
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic