"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.
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
sawan parihar
Ranch Hand
Joined: Aug 24, 2004
Posts: 250
posted
0
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
Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How a servlet of one Context communicate with other servlet of different context