This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sharing resources between two webapps  RSS feed

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i want to share the resources of another web applications's session context iam using getContext() in servlet context interface .but this method is returning null.i would like to know how can i share the resources of another web application
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general it is possible to create some cross-over between contexts in this manner, but in practice I've found the implementations by vendors to be tricky and error prone. Personally I've found it better not to.

Depending on the container you are using you may need to provide a configuration setting to allow cross-context communication. This is a security measure to prevent malicious web app from interfering with others.
 
Ola Daniel
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a similar problem some time ago. I found it was not possible to share session context between two web apps. The trick that I used was to use a servlet that picks all my session attributes(like my username, database type, DB name etc) and pass them as parameters into a receiving servlet in my second web app and set them as session attributes. You may want to consider a similar trick
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!