*
The moose likes JBoss/WildFly and the fly likes JBoss-AS-7 and Custom JSF Renderer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss-AS-7 and Custom JSF Renderer" Watch "JBoss-AS-7 and Custom JSF Renderer" New topic
Author

JBoss-AS-7 and Custom JSF Renderer

Stefan Ramirez
Greenhorn

Joined: Jul 10, 2011
Posts: 11
Hello Ranchers!

OS: Windows 7 32bit
IDE: Eclipse Indigo
JBoss: JBoss-AS-7.0.2

I'm migrating a JSF (majorra-2.1.2) project from tomcat7 to jboss-as-7.0.2.

In my original project I wrote a CustomSelectManyCheckboxListRenderer which extended MenuRenderer and worked just fine.

Unfortunately with the jsf version of jboss-as-7 (jboss-spec-2.0) none of the imported com.sun.faces.* packages can be resolved.

Any help would be greatly appreciated!

Thanks in advance,
Stefan

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

They should be in modules\com\sun\jsf-impl\main\jsf-impl-2.1.3-b02-jbossorg-2.jar

Hmm, that file doesn't include a POM, so I'd have to dig further if you want the Maven coordinate...

JBoss In Action
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2840
    
  11

The one in the JBoss 7 modules is the MyFaces implementation though, not Mojarra, right? In any case, it still has the com.sun.faces classes in it, so I don't see what the problem would be. Also, assuming Stefan is deploying a war, it should already include that module by default. For modules that aren't included by default, I think you just need the module name from the module.xml file. I have something like this in my pom.xml for the war build:



I don't actually have that dependency since for me, it's already implicitly there. I have other modules referenced though.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9941
    
159

Greg Charles wrote:The one in the JBoss 7 modules is the MyFaces implementation though, not Mojarra, right?

No. JBoss AS7 uses Mojarra by default.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9941
    
159

Peter Johnson wrote:They should be in modules\com\sun\jsf-impl\main\jsf-impl-2.1.3-b02-jbossorg-2.jar

Hmm, that file doesn't include a POM, so I'd have to dig further if you want the Maven coordinate...


The Maven co-ordinate is com.sun.faces:jsf-impl:2.1.3-b02-jbossorg-2. The reason why we had to have this JBoss specific version is because, late into the AS7 release cycle we ran into a bug in the JSF impl which would result in the (very common) xerces classcast exceptions if you had your own version of xerces packaged in a JSF2 application. The fix had to be done in the JSF impl and a patch has been provided to that project http://java.net/jira/browse/JAVASERVERFACES-2156. In the meantime, till that's integrated and released by that project, we had to use our own version of that library.
Stefan Ramirez
Greenhorn

Joined: Jul 10, 2011
Posts: 11


That did the trick... thanks for the quick help!
 
 
subject: JBoss-AS-7 and Custom JSF Renderer
 
Similar Threads
Dependencies : Jboss 7
Working with DataNucleus: How I solved the "No persistence providers available" problem.
Is JBoss 3.2 compatible with JSF 1.1?
How to run Web Application in ItellijIDEA
JBoss AS 7.1.0 CR1b problem with hornetq-ra