Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does the refrence to another web resource needs to be within same servlet context?

 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I read

'RequestDispatcher interface encapsulates a reference to another web resource at a specified path within the scope of same Servlet context.'

I am bit congfused about above statement. Does the refrence to another web resource needs to be within same servlet context?.

Any ideas, suggestions, links, sample code highly appreciated. thanks in advance
 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gudim gudi wrote:Hi,
I am bit congfused about above statement. Does the refrence to another web resource needs to be within same servlet context?.


yes for RequestDispatcher the reference to web resource must be within the same Context.

avi sinha
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get a ServletContext object of another context using ServletContext.getContext method and then get a RequestDispatcher on that ServletContext ...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic