This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes extending a class in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "extending a class in jsp" Watch "extending a class in jsp" New topic
Author

extending a class in jsp

suman deb
Ranch Hand

Joined: Jul 14, 2005
Posts: 54
Hi there...
Can anybody in the saloon put light on ...
If we extend a class in jsp with the page directive attribute "extends"...then how can we handle the request and response as by default a jsp extends httpServlet after translation.

Hoping to hear soon
[ July 25, 2005: Message edited by: Bear Bibeault ]
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

Dont worry about the request and response as the class your jsp extends
ought to subclass from HttpServletRequest at some point in its hirearchy. It would throw an error otherwise and hence should be the least of your concerns. Read the quote below to learn what you should be worried about.

From the jsp 2.0 spec

This attribute should not be used without careful
consideration as it restricts the ability of the JSP container to
provide specialized superclasses that may improve on the
quality of rendered service.


cheers,
ram.
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

From my previous post...


ought to subclass from HttpServletRequest


That should be HttpServlet.

ram.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: extending a class in jsp
 
Similar Threads
How do extends ordinady class in jsp
Inhertance in jsp
Please can any body explain me Extends page directive in Jsp page?
regarding exception handling in struts
collection Framework