• Post Reply Bookmark Topic Watch Topic
  • New Topic

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.
 
You showed up just in time for the waffles! And this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!