File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Deploying Multiple JSF war files on tomcat using V-Hosts is creating conflicts. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Deploying Multiple JSF war files on tomcat using V-Hosts is creating conflicts." Watch "Deploying Multiple JSF war files on tomcat using V-Hosts is creating conflicts." New topic
Author

Deploying Multiple JSF war files on tomcat using V-Hosts is creating conflicts.

Akash Singla
Greenhorn

Joined: Jul 22, 2009
Posts: 27
Hi,

I'm facing a very strange problem.

I have multiple project war files created using JSF 1.2_14 and richfaces 3.3.2CR1 and deployed on a single tomcat instance using virtual hosts (each runs on ROOT of every V-Host).
All these war files share the same libraries through tomcat/lib directory.

However, the configuration files (web.xml and faces-config.xml) are unique for every war file.

One of the projects (abc) is using multi-language support (English, french, hindi).

Now, the problem is, When I change the language of abc project to, lets say, french, all other projects have the started using french in the JSF components. Eg: rich:calendar in a project XYZ has started showing octobre for October because abc was using French.

Is it because richfaces jar files are shared across war files.

Please help.

Akash.
Daedals
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15957
    
  19

You have to be very careful about putting jars in the tomcat lib directory. If the jar wasn't designed explicitly to be shared - and to support multi-threaded use - you can have all sorts of unpredictable problems.

To the best of my knowledge, the RichFaces jars are not designed to be sharable that way and should be part of each individual WAR.


Customer surveys are for companies who didn't pay proper attention to begin with.
Akash Singla
Greenhorn

Joined: Jul 22, 2009
Posts: 27
If this would have been the case, then, the this behavior should have been visible everytime I change the language. But it is not.
Its visible seldom but not always.

Also, when I work on the same application, different user sessions of same application don't share this error, ie, if I change my language to French, you would be able to log-in with the default language English.
When Language changes are not shared across the same application session, how can they be shared across multiple context sessions.

Akash
Ilari Moilanen
Ranch Hand

Joined: Apr 15, 2008
Posts: 198
It was your own idea that the problem lies there and now you try to prove that it does not
Why don't you just test the theory and put the applications on a test server or somewhere else and test if that is the cause of the problem or not?
Akash Singla
Greenhorn

Joined: Jul 22, 2009
Posts: 27
Actually they are running on a production and a test server already.

What I am trying to convey is, if the language changes are not conflicting for the same app in different sessions, how is it possible that they are conflicting across different contexts.

Is there any setting of tomcat that does this kind of configuration sharing or is it something related to only richfaces JAR files or the problem is specific to JSF 1.2.

Has anyone faced similar issue.

I'll do some more research and definitely let you guys know.

Akash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying Multiple JSF war files on tomcat using V-Hosts is creating conflicts.
 
Similar Threads
Tomcat redeploys wars for each host
JSF, portlets and portal pack
need help configuring tomcat with eclipse (and icefaces or richfaces)
upload via mgmt console corrupts war?
Issue faced when moved from 6.0.14 to 6.0.15