Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

page directive

Ugly Redneck
Posts: 1006
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
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.
Don't play dumb with me! But you can try this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic