• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How a servlet of one Context communicate with other servlet of different context

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How a servlet of one Context communicate with other servlet of different context
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Manish manish",
Welcome to the JavaRanch!
We're a friendly bunch and light on rules, but one we take quite seriously is the display name rule. You can read it here.

Basically we require your display name to be two words: your first name, a space, then your last name. Obviously fictitious names are not allowed.

Please edit your profile and choose a display name which complies with our rules. Unfortunately accounts with invalid display names get deleted, often without warning.

thanks,
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you describe what you mean by 'communicate'? There are a number of 'central' places which could be used to convey information between servlet contexts.

The easiest is a common database, but you could also use EJBs or another standard distributed layer, HTTP calls, common static code or the request dispatcher. It all depends on what you're looking for.

Dave
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi manish,
What you mean by 'communicate'. If you have to forward a request from one servlet to another in a different context you need to first get the other context. You can do something like this

thisContext.getContext("path");

Then you can use the returned context to forward you requestd,

Hope that helps... If not please be more specific about what you want to know.

cheers
 
What a show! What atmosphere! What fun! What a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic