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

a jsp question related to servletcontext

 
java evangelist
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many javax.servlet.ServletContext objects can typically exist within a single Java virtual machine that hosts four different domains?
Choice 1
One for each JSP page in every domain
Choice 2
One for each Web Server within every domain
Choice 3
One for each Java virtual machine
Choice 4
One for each different domain
Choice 5
One for each web application deployed in each domain
I think option 4 is correct. Ok ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletContext maps to applications, not domains. Sun's intent is to have each "Application" be a separate package of resources, servlets, jsp, etc etc. that can be distributed in a single WAR file.
This concept gets a lot of discussion in the servlet API - everybody working with servlets and JSP should have a copy. Download from java.sun.com
Bill

------------------
author of:
 
sree bk
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William
Thanx for ur reply. Which doc (URL) should i go to ?
regards
sree
Originally posted by William Brogden:
ServletContext maps to applications, not domains. Sun's intent is to have each "Application" be a separate package of resources, servlets, jsp, etc etc. that can be distributed in a single WAR file.
This concept gets a lot of discussion in the servlet API - everybody working with servlets and JSP should have a copy. Download from java.sun.com
Bill


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic