My understanding is that the extensions filter cannot be used in a
portlet environment.

You can add this to disable the extensions filter check.


   <context-param>
       <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
       <param-value>false</param-value>
   </context-param>

I don't use portlets so I can't give you any specific advice other
than to look at this wiki page:

http://wiki.apache.org/myfaces/Using_Portlets


On 4/24/07, omidh <[EMAIL PROTECTED]> wrote:

Hi all,

I have a little problem with Tomahawk...
when I try to execute these Code:

               AddResource resource = AddResourceFactory.getInstance(fCtx);

                UIComponent uiComponent = fCtx.getViewRoot();
                Map uicMap = uiComponent.getAttributes();
                Set entry = uicMap.entrySet();
                Set key = uicMap.keySet();

                Iterator kit = key.iterator();
                Iterator eit = entry.iterator();
                while(kit.hasNext()){
                        System.err.println((String)kit.next() + ": " + 
(String)eit.next());
                }

I get the following Error:
ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages
not covered. Please see:
http://myfaces.apache.org/tomahawk/extensionsFilter.html

and in my Log:

2007-04-24 17:27:40,500 ERROR
[org.jboss.portal.portlet.container.main_org_jboss_portlet_milestone_portlet_MileStonePortletImpl]
- The portlet threw an exception
java.lang.IllegalStateException: ExtensionsFilter not correctly configured.
JSF mapping missing. JSF pages not covered. Please see:
http://myfaces.apache.org/tomahawk/extensionsFilter.html
        at
org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing(AddResourceFactory.java:358)
        at
org.apache.myfaces.renderkit.html.util.AddResourceFactory.checkEnvironment(AddResourceFactory.java:318)
        at
org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:273)
        at
main.org.jboss.portlet.milestone.portlet.MileStonePortletImpl.render(Unknown
Source)
        at
org.jboss.portal.portlet.container.PortletContainer.invokeRender(PortletContainer.java:518)
        at
org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:434)
        at
org.jboss.portal.portlet.container.PortletContainerInvoker$1.dispatch(PortletContainerInvoker.java:144)
        at
org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:223)
        at
org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:141)
        at ...
2007-04-24 17:27:40,515 ERROR
[org.jboss.portal.core.command.ControllerCommand] - Rendering portlet window
default.default.MilestoneBetaWindow triggered the following error :
java.lang.IllegalStateException: ExtensionsFilter not correctly configured.
JSF mapping missing. JSF pages not covered. Please see:
http://myfaces.apache.org/tomahawk/extensionsFilter.html
        at
org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing(AddResourceFactory.java:358)
        at
org.apache.myfaces.renderkit.html.util.AddResourceFactory.checkEnvironment(AddResourceFactory.java:318)
        at
org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:273)
        at
main.org.jboss.portlet.milestone.portlet.MileStonePortletImpl.render(Unknown
Source)
        at
org.jboss.portal.portlet.container.PortletContainer.invokeRender(PortletContainer.java:518)
        at
org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:434)
        at
org.jboss.portal.portlet.container.PortletContainerInvoker$1.dispatch(PortletContainerInvoker.java:144)
        at
org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:223)
        at
org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:141)
        at
org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:85)
        at ...

in my Web.xml I have the following Entries:

<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>*.faces</url-pattern>
        </servlet-mapping>

        <!-- MyFaces Tomahowk Filter -->

        <filter>
                <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
                <param-name>maxFileSize</param-name>
                <param-value>40m</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>

<!--     extension mapping for serving page-independent resources (javascript,
stylesheets, images, etc.)  -->
        <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/jsp/*</url-pattern>
        </filter-mapping>

<!--     extension mapping for adding <script/>, <link/>, and other resource
tags to JSF-pages  -->
        <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
        </filter-mapping>

        <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
        </filter-mapping>

        <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.faces</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/tiny_mce/*</url-pattern>
        </filter-mapping>

Now what I actually want to is to run these code:

                resource.addJavaScriptAtPosition(fCtx,
AddResource.HEADER_BEGIN, "/tiny_mce/tiny_mce.js");
                resource.addInlineScriptAtPosition(fCtx, 
AddResource.HEADER_BEGIN,
                                "tinyMCE.init({\\" +
                                        "mode : \"textareas\", \\" +
                                        "theme : \"simple\", \\" +
                                        "width : \"640\", \\" +
                                        "height : \"480\"\\" +
                                "});");

So as the Error Message told, I think it's a problem within the web.xml...

I'm thankful for any suggestions

tanks in advance,
Omid

p.s.:

My Folder Structure:

\MileStone-war
    \jsp
        \edit
        \view
   \tiny_mce
   \WEB-INF
       \context
      \lib
      + web.xml etc.
--
View this message in context: 
http://www.nabble.com/Problems-with-the-ExtensionsFilter-tf3638312.html#a10159763
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Reply via email to