This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design 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