aspose file tools*
The moose likes JSF and the fly likes JSF 1.* in Glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF 1.* in Glassfish" Watch "JSF 1.* in Glassfish" New topic
Author

JSF 1.* in Glassfish

Marcos Vidolin
Greenhorn

Joined: May 10, 2011
Posts: 28
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

Joined: Oct 01, 2001
Posts: 2854
    
  11

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

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.


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

Joined: May 10, 2011
Posts: 28
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

Joined: Jun 25, 2001
Posts: 16145
    
  21

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

Joined: Oct 01, 2001
Posts: 2854
    
  11

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

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF 1.* in Glassfish