• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reaction of the container if we place init() in service()

 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

What will be the reaction of the container if we place
init(ServletConfig sc) in
service(HttpServletRequest req,HttpServletResponse res) throws ServletException,java.lang.IOException

thanks in advance
saiprasanna
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on what your init method does. In any case, the servlet container will call init after it has created an instance of your servlet and before any request is processed - as per the API.

Where do these bizarre questions about servlet methods come from? Is this some sort of on-going joke? Why don't people just read the tutorials and the API documentation? Admitedly, moving from a single-user desktop application environment to a container controlled environment is tricky, but it is all documented.

Bill
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic