• 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

on jsp_init()  RSS feed

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i provide some code on the scriplet in jsp (<% %> ) the code appends to the jsp_service() method of the corresponding servlet. if i write the code in declaretive block (<%! > the code appends to the outside of the jsp_service () method. I Want some code has to be added to jsp_init() method of the generated servlet, when i write som e code in jsp file how can i provide it.
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I'm holding my nose as I type this.
I'm usually less militant when it comes to preaching MVC than most of the
people who help out in this forum. I still think there are some valid uses for model 1, but if you find yourself needing to override the jspInit method in a JSP, it's probably time to give some real consideration to re-factoring and moving your heavy lifting to a servlet.

That being said, here you go.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!