Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss-AS-7 and Custom JSF Renderer

 
Stefan Ramirez
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


That did the trick... thanks for the quick help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic