• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Glassfish runtime for JSF

 
kumar toomu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Regards,
Brendan.
 
kumar toomu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...?

<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2</version>
</dependency>

can you track the request/response headers? what version would you expect to see?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
kumar toomu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Only slightly different but I thought it was like this:


 
kumar toomu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Brendan...
it works now...

Thank you so much Brendan and Tim
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic