The /faces/myFacesExtensionResource mapping is used to return various static (or dynamically generated) resources needed -- javascripts, images, etc -- by Tomahawk and MyFaces. For example, the generated image for the captcha component.
On Wed, Oct 20, 2010 at 4:04 AM, Benjamin Mark <[email protected]> wrote: > Hi Leonardo, > > thx for that hint. Sadly its not working. I still have the infinite redirect > when I connect to my project by Web UI. > So it seems there is a incompatability with seam or richfaces or something > is missing. > > But I dont understand that part > > * Remember map the FacesServet to the > org.apache.myfaces.RESOURCE_VIRTUAL_PATH > * value (default /faces/myFacesExtensionResource, so map > FacesServlet to /faces/* > * could be used or better /faces/myFacesExtensionResource/*) so the > * ServeResourcePhaseListener can serve resources. > > Maybe thats the missing thing. I also have absolutely no path in my project > which contains "faces" in it or is this the ressource path inside the > tomahawk jar? > > The t:equalField method from tomahawk is working. I guess there is no > Extensionfilter necassary. But when > I try to access methods which have to be rendered like t:captcha its not > working because the config needs > the extension filters. > > So currently I can't use the full capacity of tomahawk :( > > Thx > Ben > > > > -----Ursprüngliche Nachricht----- > Von: Leonardo Uribe [mailto:[email protected]] > Gesendet: Dienstag, 19. Oktober 2010 19:38 > An: MyFaces Discussion > Betreff: Re: Tomahawk installation - infinite redirect when configuring > extension filters > > Hi > > If ExtensionsFilter does not work for your particulat configuration, you can > use TomahawkFacesContextWrapper strategy instead. It is useful in situations > like this one, where ExtensionsFilter just does not fit well. To do that you > must set the following web.xml config params: > > <context-param> > <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> > <param-value>false</param-value> > </context-param> > > <context-param> > > <param-name>org.apache.myfaces.DISABLE_TOMAHAWK_FACES_CONTEXT_WRAPPER</param > -name> > <param-value>false</param-value> > </context-param> > > There is additional details here: > > http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core/src/main/java/or > g/apache/myfaces/webapp/filter/TomahawkFacesContextWrapper.java > > regards, > > Leonardo Uribe > > 2010/10/19 Jakob Korherr <[email protected]> > >> Hi, >> >> Then I guess it is some sort of incompatibility with Seam. However I >> am sorry, I've never really used it, so I don't know why this is >> happening.. >> >> Regards, >> Jakob >> >> 2010/10/19 Benjamin Mark <[email protected]>: >> > Hi, >> > >> > thx for your help but it doesn't helped. Already the same problem with >> > infinite redirect: >> > >> > Thats the actuall web.xml >> > >> > <?xml version="1.0" ?> >> > <web-app xmlns="http://java.sun.com/xml/ns/javaee" >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" >> > version="2.5"> >> > >> > <!-- RichFaces --> >> > >> > <context-param> >> > <param-name>org.richfaces.SKIN</param-name> >> > <param-value>blueSky</param-value> >> > </context-param> >> > >> > <!-- Suppress spurious stylesheets --> >> > >> > <context-param> >> > <param-name>org.richfaces.CONTROL_SKINNING</param-name> >> > <param-value>disable</param-value> >> > </context-param> >> > >> > <context-param> >> > <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> >> > <param-value>disable</param-value> >> > </context-param> >> > >> > <!-- >> > Change load strategy to DEFAULT to disable sending scripts/styles >> as >> > packs >> > --> >> > >> > <context-param> >> > <param-name>org.richfaces.LoadStyleStrategy</param-name> >> > <param-value>ALL</param-value> >> > </context-param> >> > >> > <context-param> >> > <param-name>org.richfaces.LoadScriptStrategy</param-name> >> > <param-value>ALL</param-value> >> > </context-param> >> > >> > <!-- Seam --> >> > >> > <listener> >> > >> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> >> > </listener> >> > >> > <filter> >> > <filter-name>Seam Filter</filter-name> >> > <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> >> > </filter> >> > >> > <filter-mapping> >> > <filter-name>Seam Filter</filter-name> >> > <url-pattern>/*</url-pattern> >> > </filter-mapping> >> > >> > <servlet> >> > <servlet-name>Seam Resource Servlet</servlet-name> >> > >> > > <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> >> > </servlet> >> > >> > <servlet-mapping> >> > <servlet-name>Seam Resource Servlet</servlet-name> >> > <url-pattern>/seam/resource/*</url-pattern> >> > </servlet-mapping> >> > >> > <!-- Facelets development mode (disable in production) --> >> > >> > <context-param> >> > <param-name>facelets.DEVELOPMENT</param-name> >> > <param-value>@debug@</param-value> >> > </context-param> >> > >> > <!-- JSF --> >> > >> > <context-param> >> > <param-name>javax.faces.DEFAULT_SUFFIX</param-name> >> > <param-value>.xhtml</param-value> >> > </context-param> >> > >> > <servlet> >> > <servlet-name>Faces Servlet</servlet-name> >> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> >> > <load-on-startup>1</load-on-startup> >> > </servlet> >> > >> > <servlet-mapping> >> > <servlet-name>Faces Servlet</servlet-name> >> > <url-pattern>*.seam</url-pattern> >> > </servlet-mapping> >> > <servlet-mapping> >> > <servlet-name>Faces Servlet</servlet-name> >> > <url-pattern>/faces/</url-pattern> >> > </servlet-mapping> >> > >> > <security-constraint> >> > <display-name>Restrict raw XHTML Documents</display-name> >> > <web-resource-collection> >> > <web-resource-name>XHTML</web-resource-name> >> > <url-pattern>*.xhtml</url-pattern> >> > </web-resource-collection> >> > <auth-constraint /> >> > </security-constraint> >> > >> > <!-- >> > uncomment <ejb-local-ref> entries when deploying to GlassFish and >> > (optionally) JBoss AS 5 >> > --> >> > <!-- >> > <ejb-local-ref> >> > <ejb-ref-name>creditfriend/AuthenticatorBean/local</ejb-ref-name> >> > <ejb-ref-type>Session</ejb-ref-type> <local-home/> >> > <local>ch.bemar.creditfriend.action.Authenticator</local> >> > </ejb-local-ref> >> > --> >> > >> > <!-- >> > Add entries for each EJB session bean which is also a Seam >> component >> > (not required on JBoss AS) >> > --> >> > >> > <persistence-unit-ref> >> > >> <persistence-unit-ref-name>creditfriend/pu</persistence-unit-ref-name> >> > >> > >> > <persistence-unit-name>../creditfriend.jar#creditfriend</persistence-unit-na > me> >> > <!-- >> > The relative reference doesn't work on GlassFish. Instead, set >> the >> > <persistence-unit-name> to "creditfriend", package >> persistence.xml >> > in >> > the WAR, and add a <jar-file> element in persistence.xml with >> > value >> > "../../creditfriend.jar". >> > <persistence-unit-name>creditfriend</persistence-unit-name> >> > --> >> > </persistence-unit-ref> >> > >> > <filter> >> > <filter-name>MyFacesExtensionsFilter</filter-name> >> > >> > >> > <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-clas > s> >> > <init-param> >> > <param-name>uploadMaxFileSize</param-name> >> > <param-value>20m</param-value> >> > </init-param> >> > </filter> >> > >> > <!-- >> > extension mapping for adding <script/>, <link/>, and other > resource >> > tags to JSF-pages >> > --> >> > <filter-mapping> >> > <filter-name>MyFacesExtensionsFilter</filter-name> >> > <!-- >> > servlet-name must match the name of your >> > javax.faces.webapp.FacesServlet entry >> > --> >> > <servlet-name>Faces Servlet</servlet-name> >> > </filter-mapping> >> > >> > <!-- >> > extension mapping for serving page-independent resources >> (javascript, >> > stylesheets, images, etc.) >> > --> >> > <filter-mapping> >> > <filter-name>MyFacesExtensionsFilter</filter-name> >> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> >> > </filter-mapping> >> > </web-app> >> > >> > >> > >> > Jakob Korherr schrieb: >> >> >> >> Hi Ben, >> >> >> >> Just a shot into the blue, but I noticed that you only mapped your >> >> Faces Servlet to *.seam, however Tomahawk also expects a mapping of >> >> "/faces/". If you add this additional mapping, it will maybe work! >> >> >> >> Regards, >> >> Jakob >> >> >> >> 2010/10/18 Benjamin Mark <[email protected]>: >> >> >> >>> >> >>> Hello, >> >>> >> >>> I've installed Tomahawk for JSF 1.2 on my seam-gen project (Seam 2.2.0 >> >>> GA) >> >>> like the installation hints from the tomahawk page. >> >>> >> >>> Everything seems ok and the Jboss 5.1 server is starting up without > any >> >>> problems. When I connect to my project I get the message from the >> >>> browser, >> >>> that the request is redirected to an infinity redirect and can't be >> >>> processed (all the same Firefox, IE, Chrome). NO error will be printed >> to >> >>> log or console. >> >>> >> >>> When I remove the filter and filter-mapping stuff from web.xml its >> >>> working >> >>> again but I can't use captchas because I'm getting a error/warning > that >> >>> there are no extensionFilters configured. >> >>> >> >>> Someone know about that problem? >> >>> >> >>> Thx in forward for any hint >> >>> >> >>> Ben >> >>> >> >>> WEB.XML >> >>> >> >>> >> >>> <?xml version="1.0" ?> >> >>> <web-app xmlns="http://java.sun.com/xml/ns/javaee" >> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> >>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >> >>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" >> >>> version="2.5"> >> >>> >> >>> <!-- RichFaces --> >> >>> >> >>> <context-param> >> >>> <param-name>org.richfaces.SKIN</param-name> >> >>> <param-value>blueSky</param-value> >> >>> </context-param> >> >>> >> >>> <!-- Suppress spurious stylesheets --> >> >>> >> >>> <context-param> >> >>> <param-name>org.richfaces.CONTROL_SKINNING</param-name> >> >>> <param-value>disable</param-value> >> >>> </context-param> >> >>> >> >>> <context-param> >> >>> >> >>> <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> >> >>> <param-value>disable</param-value> >> >>> </context-param> >> >>> >> >>> <!-- >> >>> Change load strategy to DEFAULT to disable sending >> >>> scripts/styles as >> >>> packs >> >>> --> >> >>> >> >>> <context-param> >> >>> <param-name>org.richfaces.LoadStyleStrategy</param-name> >> >>> <param-value>ALL</param-value> >> >>> </context-param> >> >>> >> >>> <context-param> >> >>> > <param-name>org.richfaces.LoadScriptStrategy</param-name> >> >>> <param-value>ALL</param-value> >> >>> </context-param> >> >>> >> >>> <!-- Seam --> >> >>> >> >>> <listener> >> >>> >> >>> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> >> >>> </listener> >> >>> >> >>> <filter> >> >>> <filter-name>Seam Filter</filter-name> >> >>> >> >>> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> >> >>> </filter> >> >>> >> >>> <filter-mapping> >> >>> <filter-name>Seam Filter</filter-name> >> >>> <url-pattern>/*</url-pattern> >> >>> </filter-mapping> >> >>> >> >>> <servlet> >> >>> <servlet-name>Seam Resource Servlet</servlet-name> >> >>> >> >>> >> <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> >> >>> </servlet> >> >>> >> >>> <servlet-mapping> >> >>> <servlet-name>Seam Resource Servlet</servlet-name> >> >>> <url-pattern>/seam/resource/*</url-pattern> >> >>> </servlet-mapping> >> >>> >> >>> <!-- Facelets development mode (disable in production) --> >> >>> >> >>> <context-param> >> >>> <param-name>facelets.DEVELOPMENT</param-name> >> >>> <param-value>@debug@</param-value> >> >>> </context-param> >> >>> >> >>> <!-- JSF --> >> >>> >> >>> <context-param> >> >>> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> >> >>> <param-value>.xhtml</param-value> >> >>> </context-param> >> >>> >> >>> <servlet> >> >>> <servlet-name>Faces Servlet</servlet-name> >> >>> >> >>> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> >> >>> <load-on-startup>1</load-on-startup> >> >>> </servlet> >> >>> >> >>> <servlet-mapping> >> >>> <servlet-name>Faces Servlet</servlet-name> >> >>> <url-pattern>*.seam</url-pattern> >> >>> </servlet-mapping> >> >>> >> >>> <security-constraint> >> >>> <display-name>Restrict raw XHTML > Documents</display-name> >> >>> <web-resource-collection> >> >>> <web-resource-name>XHTML</web-resource-name> >> >>> <url-pattern>*.xhtml</url-pattern> >> >>> </web-resource-collection> >> >>> <auth-constraint /> >> >>> </security-constraint> >> >>> >> >>> <!-- >> >>> uncomment <ejb-local-ref> entries when deploying to >> >>> GlassFish and >> >>> (optionally) JBoss AS 5 >> >>> --> >> >>> <!-- >> >>> <ejb-local-ref> >> >>> >> >>> <ejb-ref-name>creditfriend/AuthenticatorBean/local</ejb-ref-name> >> >>> <ejb-ref-type>Session</ejb-ref-type> <local-home/> >> >>> > <local>ch.bemar.creditfriend.action.Authenticator</local> >> >>> </ejb-local-ref> >> >>> --> >> >>> >> >>> <!-- >> >>> Add entries for each EJB session bean which is also a >> Seam >> >>> component >> >>> (not required on JBoss AS) >> >>> --> >> >>> >> >>> <persistence-unit-ref> >> >>> >> >>> <persistence-unit-ref-name>creditfriend/pu</persistence-unit-ref-name> >> >>> >> >>> >> >>> >> > <persistence-unit-name>../creditfriend.jar#creditfriend</persistence-unit-na >> >>> me> >> >>> <!-- >> >>> The relative reference doesn't work on > GlassFish. >> >>> Instead, set the >> >>> <persistence-unit-name> to "creditfriend", >> package >> >>> persistence.xml in >> >>> the WAR, and add a <jar-file> element in >> >>> persistence.xml with value >> >>> "../../creditfriend.jar". >> >>> >> >>> <persistence-unit-name>creditfriend</persistence-unit-name> >> >>> --> >> >>> </persistence-unit-ref> >> >>> >> >>> >> >>> >> >>> <filter> >> >>> <filter-name>MyFacesExtensionsFilter</filter-name> >> >>> >> >>> >> >>> >> > <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-clas >> >>> s> >> >>> <init-param> >> >>> <param-name>uploadMaxFileSize</param-name> >> >>> <param-value>20m</param-value> >> >>> </init-param> >> >>> </filter> >> >>> >> >>> <!-- >> >>> extension mapping for adding <script/>, <link/>, and >> other >> >>> resource >> >>> tags to JSF-pages >> >>> --> >> >>> <filter-mapping> >> >>> <filter-name>MyFacesExtensionsFilter</filter-name> >> >>> <!-- >> >>> servlet-name must match the name of your >> >>> javax.faces.webapp.FacesServlet entry >> >>> --> >> >>> <servlet-name>Faces Servlet</servlet-name> >> >>> </filter-mapping> >> >>> >> >>> <!-- >> >>> extension mapping for serving page-independent resources >> >>> (javascript, >> >>> stylesheets, images, etc.) >> >>> --> >> >>> <filter-mapping> >> >>> <filter-name>MyFacesExtensionsFilter</filter-name> >> >>> >> >>> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> >> >>> </filter-mapping> >> >>> </web-app> >> >>> >> >>> >> >>> >> >>> >> >> >> >> >> >> >> >> >> > >> > >> >> >> >> -- >> Jakob Korherr >> >> blog: http://www.jakobk.com >> twitter: http://twitter.com/jakobkorherr >> work: http://www.irian.at >> > > >

