• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF 1.* in Glassfish

 
Marcos Vidolin
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

how can I run JSf 1's applications in Glassfish 3.1 once the application server already implements JSF 2?

tks
 
Greg Charles
Sheriff
Posts: 2989
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the JSF jars into the WEB-INF/lib directory of your war. You'll also need the following sun-web.xml in the WEB-INF directory:

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sun-web.xml file is critical. Without it, the JSF2 classes built into Glassfish are likely to collide with the JSF1 libraries in the WAR.

Incidentally, it's not that difficult to migrate a JSF1 webapp to JSF2, and JSF2 has been out long enough it's a good idea to do so.
 
Marcos Vidolin
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank's guys

I have a big project with RichFaces 3 (JSF 1) and to migrate RF 3 to 4 its not easy, that's why I need keep project with JSF 1.
But I don't want to get any kind of trouble with that configuration. I'll make some tests to ensure that configuration will work fine.
Do you have some experience with sun-web.xml file?

[]'s
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RichFaces 3 works just fine with JSF2.

I know because the migration to RF 4 is going to KILL me, but that doesn't mean I want to lose the amenities that JSF2 offers in the mean time. So I'm running JSF2+RF3. Not everything works (for example, the f:ajax tag). but the important stuff does.
 
Greg Charles
Sheriff
Posts: 2989
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm also using RichFaces 3 (3.3.3) with JSF 2, and it's working fine. As Tim mentioned, RichFaces 3 doesn't support 100% of JSF 2's capabilities, but it does support a lot of them. I also tried to upgrade to RichFaces 4, but found it to be too different from RF3, and just plain missing stuff from RF3 that I need. I hope they work out those issues. RF4 has some great capabilities that I'd like to be using.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am greatly annoyed with the RF4 migration requirements. It's roughly the same amount of trauma as was required to go from VB6 to VB.Net.

We expect Microsoft to break things. In the Java world, the norm is to provide backwards compatibility and deprecation mechanisms. One of the primary differences between professional Enterprise-grade and kitchen-table hacker products.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic