This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Is it possible for jsp to extend a servlet? I have following scenario:
I have a servlet which initialises some static objects in its init method. All my servlets extend this servlet to access those variables. I have few JSPs which also require same static objects. So is it possible to extend those JSP to my parent servlet and read those variables?
Hai Vikas, There is some problem when the jsp extends Servlet, when you invoke the jsp from browser it will execute only the service of the extended servlet, it wont render anything that you have given in jsp file. [ October 13, 2006: Message edited by: Balasubramani Dharmalingam ]
Joined: Jun 22, 2001
Ok, That's a big problem. In that case I will have to make a common jsp and in that jsp's jspInit() I will have to reinitialise all objects. The inlude that common jsp in to all jsps at complie time. Will that work? [ October 13, 2006: Message edited by: Vikas Aggarwal ]