Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I get Implicit objects in overridden Init()

 
Sandip Kaviman
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do something like this in JSP



But I can not get out before initialization. is there any way to get the implicit objects(out, request and response) before initililization.
I tried to get the JspFactory and then PageContext from it but for that I need request and response.

I think it is not possible. Can please someone confirm.

Thanks
Sandip
[ June 21, 2008: Message edited by: Sandip Kaviman ]
 
Pham Hoai Van
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
think about the moment when jspInit is invoked.
Is there any request or response available at that time and what object are allowed to acess?
[ June 21, 2008: Message edited by: Pham Hoai Van ]
 
Dee Brown
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The spec states that the initialization of implicit variables is performed in _jspService, so the answer is no.

But you could use "getServletConfig().getServletContext().log("blah blah");" to write to the log. This will likely have the same effect as
"System.out.println("blah blah");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic