Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

interface tag  RSS feed

 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there some way to direct a JSP page to implement an interface
without mucking with the 'extends' directive?
Michael
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting qstn, but nothing comes to my mind.
I haven't seen anything like this. And then its me...
- satya
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In reading the specs on JSP, no. You'd have to develop an abstract class for your jsp page to extend that implements the interface you wanted. This has some implications for making your application portable btween servers. Tomcat's JSP Pages extend their HttpJspPage class which extends HttpServlet. It inherets the ability to handle Single Threaded model from HttpServlet. Resin's extend their JspPage which extends Page which implements Servlet, (Sun's)JspPage and handles SingleThreadedModel itself. (This show's some differences between implimetations)
What the Specs suggests is to have a TagLib implement the interface and handle the differences there. Then instead of insisting that your JSP "implements" an interface, ensure it "includes" the JspTag!
[ February 01, 2002: Message edited by: Carl Trusiak ]
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!