wood burning stoves*
The moose likes JSF and the fly likes Glassfish runtime for JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Glassfish runtime for JSF" Watch "Glassfish runtime for JSF" New topic

Glassfish runtime for JSF

kumar toomu

Joined: Dec 29, 2011
Posts: 14
i'm little confused with the way glassfish behaves in respect to libraries
i have a jsf 1.2 application(bundled run time in war) deployed on glassfish 3.1.1 server...
when the request/response headers are tracked it shows the jsf version as 2.0
does any one know the reason why it was doing that? your help is really appriciated...
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
I don't think I really understand it myself, but glassfish needs jsf for the admin console and uses the JSF version from
$INSTALL_DIR/glassfish/modules directory (used to be jsf-api.jar & jsf-impl.jar, now replaced by javax.faces.jar).

When you start the glassfish server this is the version that is output in the server log. My maven project has a
dependency on JSF as follows:

so that's the verson I'd expect my project to use, and I have to say I always keep the version in the modules folder
and the version referenced from my pom.xml the same, although I'd not expect them to have to be. This doesn't
really answer your question, which is an interesting one.

kumar toomu

Joined: Dec 29, 2011
Posts: 14
Thank you for the reply Brendan...

the dependency you have mentioned will pull the libraries from Glassfish right?
what if you have a dependency like this...?


can you track the request/response headers? what version would you expect to see?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952

Up-to-date JEE servers have JSF built into them. Not because it's required by admin apps, but because it's part of the JEE standard (Note that this is JEE and not J2EE).

An exception to this is the Tomcat webapp server, but that doesn't apply here.

If, however, you need to run with a different version of JSF than what the server provides and you cannot obtain or use a more appropriate version of the server, there's usually a way to override the JSF jars. It depends on the server, though, so check the GlassFish documentation.

Customer surveys are for companies who didn't pay proper attention to begin with.
kumar toomu

Joined: Dec 29, 2011
Posts: 14
Thanks for the suggestion Tim.
i did try to override the jars using the following property in glassfish-web.xml. however, it didnt work.
when the Glassfish server is started, it throws a warning "ignoring invalid property".

i'm trying hard to look/search for available properties in Glassfish 3.1.1.
is there a place or documentation where it can give more information on the available properties?
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218

Only slightly different but I thought it was like this:

kumar toomu

Joined: Dec 29, 2011
Posts: 14
thank you Brendan...
it works now...

Thank you so much Brendan and Tim
jQuery in Action, 2nd edition
subject: Glassfish runtime for JSF
Similar Threads
JSF 2.0 Ajax Implementation
WA #1.....word association
Apache + Tomcat + JSF? ***newbee
JPA not working with EJB3
To authors: Cover JSF 1.2?