It's not a secret anymore!
The moose likes Servlets and the fly likes multiple context  problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "multiple context  problem" Watch "multiple context  problem" New topic

multiple context problem

Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

hi all,

I am facing a problem in my application because of multiple context. here is explanation of my problem.

I have multiple war files here is, those are part of single ear but they have different web context.

On user interaction with the help common menu in top frame, user switched to different context and comes back to previous context.

Now my problem is that when user switch to different context every thing works file, but whenever user comes back to context of my was file context does not change , however page gets displayed .

since context page is not able to include css and js files, because we are using context relative url....

I am using following steps during context switching

hope I could explain my problem,

please advice how do I switch context so that I can get the all relative resources....


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The servlet spec doesn't cover cross context behaviour in great detail (compared with other aspects of servlet apps) so, at best I would expect inconsistant behaviour between different containers.

Which one are you using?

Also, out of curiosity, why did you spread your app over multiple contexts?
It's something I've never done and have wondered what motivates others to do so.

Last, since this is more of a servlet issue than a JSP specific one, I'm going to move it to our Servlets forum.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: multiple context problem
It's not a secret anymore!