• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP lifecycle

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,all
In Genral, JSP are converted into Servlets.
I want to know whether
those servlets are HttpSerlvet or GenericServlet.. ?


Please clarify my doubt..

Thanks in advance,
Gopi.N.
[ July 03, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This by default will be javax.servlet.http.HttpServlet, though I guess it is possible for different servlet containers to extend something else by default like their own custom extension to the HttpServlet.

Tomcat 5.x uses jasper2, and looking in the org.apache.jasper.compiler.Generator class in the tomcat sources, jasper builds JSP pages into servlets that extend the HttpServlet by default.

Though there is the JSP page directive

that can be used to tell the JSP compiler to build Servlets using the base class that you specify. This is handy if you have some framework or custom stuff you want to be available for all jsp pages.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Travis Hein:
This is handy if you have some framework or custom stuff you want to be available for all jsp pages.



Although these days, servlet filters or preludes are considered a better means of doing so.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic