Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting HttpServletRequest Object?

 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

somehow in the init() method can i have the HttpServletRequest object ??
[ June 30, 2006: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't
The request object is generated when a request is made to your app (someone hits your site with a browser).

The init method occurs when the servlet is being deployed (before any requests can be made).

As far as your servlet is concerned: no request objects exist when your init method is being called.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic