We can 'forward' request to the resources present in other context/application...
Will it work even if both applications are not on same server???
You can not use a jsp:forward between two different servler contexts. You can use a RequestDispatcher forward between two different contexts (at least on tomcat)
1: enable cross context capability in the context config file for both contextts.
2: get a reference to the other context using ServletContext.getContext("name")
3: get the RequestDispatcher for the other context using the context object from step 2
4: do the forward
All of this logic could be coded into a custom tag.
Originally posted by Vivek Pandey:
Just be aware that you verify that this works in your production environment which usually have highly restrictive security settings. You need to watch if your application shares the app server with other applications
Just a thought !
Thanks Satou and Vivek.
I was also thinking that this can be a feature of tomcat or any other web/application server but we shouldn't consider this a possiblility, I mean Sun didn't mean to provide this... just thinking, not sure.