webtier@glassfish.java.net

Re: MyFaces + Tomahawk on Glassfish3.1.2 how to setup faces-config.xml correctly?

From: John Yeary <johnyeary_at_gmail.com>
Date: Thu, 12 Apr 2012 13:40:03 -0400

You can use a glassfish-web.xml file to tell it to use the classloader in
the war file instead of the default container classloader. See the
information below. The class-loader delegate="false" Check to see if this
works for you.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish
Application Server 3.1 Servlet 3.0//EN" "
http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
 * <class-loader delegate="false"/>*
  <jsp-config>
    <property name="keepgenerated" value="true">
      <description>Keep a copy of the generated servlet class' java
code.</description>
    </property>
  </jsp-config>
</glassfish-web-app>
____________________________

John Yeary
____________________________
*NetBeans Dream Team*
*President Greenville Java Users Group
Java Users Groups Community Leader
Java Enterprise Community Leader*

____________________________

<http://javaevangelist.blogspot.com/> <https://twitter.com/jyeary>
<http://www.youtube.com/johnyeary>
  <http://www.linkedin.com/in/jyeary>
<https://plus.google.com/112146428878473069965>
  <http://www.facebook.com/jyeary>
<http://feeds.feedburner.com/JavaEvangelistJohnYearysBlog>
  <http://netbeans.org/people/84414-jyeary>

"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
-- Theodore Roosevelt



On Thu, Apr 12, 2012 at 1:09 PM, <forums_at_java.net> wrote:

> Using file-upload in my application, I plugged MyFaces-Tomahawk20 version
> 1.1.11 in. It works, but on server startup I have Warnings which I don't
> like. 1.) Mojarra is initialized:
> [#|2012-04-12T18:48:52.505+**0200|INFO|glassfish3.1.2|**
> javax.enterprise.resource.**webcontainer.jsf.config|_**
> ThreadID=17;_ThreadName=admin-**thread-pool-4848(2);|**Initializing
> Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/MonteRosa'|#] I know.
> Tomahawk can work on top of Mojarra, but for compatibility with other AS, I
> would like to use MyFaces only. 2. I have a lot of ClassNotFoundExceptions
> like:
> [#|2012-04-12T18:48:53.894+**0200|WARNING|glassfish3.1.2|**
> javax.enterprise.system.**container.web.org.glassfish.**
> web.loader|_ThreadID=17;_**ThreadName=admin-thread-pool-**
> 4848(2);|WEB9052:
> Unable to load class
> org.apache.myfaces.view.**facelets.component.**RepeatRenderer, reason:
> java.lang.**ClassNotFoundException:
> org.apache.myfaces.view.**facelets.component.**RepeatRenderer|#]
> [#|2012-04-12T18:48:53.895+**0200|WARNING|glassfish3.1.2|**
> javax.enterprise.system.**container.web.org.glassfish.**
> web.loader|_ThreadID=17;_**ThreadName=admin-thread-pool-**
> 4848(2);|WEB9052:
> Unable to load class
> org.apache.myfaces.shared_**tomahawk.renderkit.html.**HtmlRenderer,
> reason:
> java.lang.**ClassNotFoundException:
> org.apache.myfaces.shared_**tomahawk.renderkit.html.**HtmlRenderer|#] The
> tomahawk filter is defined within web.xml. As said above it works. But, how
> can I tell Glassfish to use MyFaces instead of Mojarra and configure
> faces-config.xml, in a manner for all org.apache.myfaces-classes being
> found
> from the beginning?
>
> --
>
> [Message sent by forum member 'szhb69']
>
> View Post: http://forums.java.net/node/**885048<http://forums.java.net/node/885048>
>
>
>