Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Config and ServletContext

 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
1.where do we provide ServletConfig and ServletContext information for servlet and Application respectively?
2.what type of information is advisable to be placed in servletContext?
thanks
Vikas
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will encourage you to use the search facility provided in the forums.
This is one link among the many I found.
Hope this helps.
 
danny liu
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.where do we provide ServletConfig and ServletContext information for servlet and Application respectively?
ServletConfig is a wrapper for servlet configuration parameters
ServletContext is a wrapper for application-level info
2.what type of information is advisable to be placed in servletContext?
shared within the application, e.g., user count.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic