myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <>
Subject Re: Need help getting started with GlassFish, MyFaces, and Trinidad
Date Wed, 20 Oct 2010 13:22:21 GMT
Can you check your build, you might bundle mojarra as well as myfaces, 
here is an excerpt of a sun-web.xml which works for me:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application 
Server 9.0 Servlet 2.5//EN" 
<sun-web-app error-url="">
   <class-loader delegate="false"/>
   <property name="useMyFaces" value="true"/>
     <property name="keepgenerated" value="true">
       <description>Keep a copy of the generated servlet class' java 

but that does not help you you bundle both implementations in your ear 
or war, it just overrides the one bundled with Glassfish.


Am 20.10.10 10:07, schrieb burghard.britzke:
> but even if I set those elements in my sun-web.xml, I get
> -->INFO: Mojarra 2.0.2 (FCS b10) für Kontext '/myapp' wird initialisiert.
> ...
> -->  SCHWERWIEGEND: Both MyFaces and the RI are on your classpath. Please make sure
to use only one of the two JSF-implementations.
> ...
> INFO: Starting up MyFaces-package : myfaces-api in version : 2.0.2 from path : file:/Users/Shared/.../myapp/WEB-INF/lib/myfaces-api-2.0.2.jar
> INFO: Starting up MyFaces-package : myfaces-impl in version : 2.0.2 from path : file:/Users/Shared/.../myapp/WEB-INF/lib/myfaces-impl-2.0.2.jar
> ..
> INFO: ServletContext '/Users/Shared/glassfishv3/.../myapp/' initialized.
> what is wrong?
> burghard.
> Am 20.10.2010 um 09:51 schrieb Werner Punz:
>>> OK, thanks to Jakob's hints I got MyFaces-2 running under GlassFish.  One
>>> thing that is essential (I am putting it here for reference) is the format
>>> of the sun-web.xml entry has to be:
>>>    <property name="useMyFaces" value="true"/>
>>> Also you have to set:
>>>      <class-loader delegate="false"/>
>>> I encountered something very disturbing when experimenting with this.  In
>>> many cases something actually over-writes the sun-web.xml file when I try to
>>> run the application.  It seems to happen somewhere in the deployment
>>> process.  I don't know if this is a bug in netbeans or the MyFaces servlet
>>> is doing something.  Has anyone else seen this?

View raw message