You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Francesco Consumi <co...@istitutodeglinnocenti.it> on 2005/09/26 15:27:52 UTC

mf 1.1.0 and jscookmenu

Hi,

I'm upgrading all of my projects to 1.1.0, and I don't understand if in 
new version is still necessary to include styles and js files for 
JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple 
doesn't include any <script language="JavaScript" 
src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>

...et cetera.
But, if I don't include these declaration in my pages, the menu doesn't work.

what's the solution of this mistery ?

thanks,  -- Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133



Re: mf 1.1.0 and jscookmenu

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:

> If it isn't this, try out the examples if they are working with your
> version of MyFaces!
>
I've just tried examples/simple.war extracted from 20050926 examples, 
and it works. and now ? :-) what do I have to try doing ?


-- 
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133



Re: mf 1.1.0 and jscookmenu

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:

> Well,
>
> it looks as if your FacesServlet doesn't work any more - are you sure
> you keep the mapping of the faces servlet, and also have the right
> sequence of things in your web.xml?
>
Martin, here is my web.xml file......

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
  </welcome-file-list>
    <!-- Extensions Filter -->
    <filter>
        <filter-name>extensionsFilter</filter-name>
        
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
        <init-param>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
            <description>Set the threshold size - files
                    below this limit are stored in memory, files above
                    this limit are stored on disk.

                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
<!--        <init-param>
            <param-name>uploadRepositoryPath</param-name>
            <param-value>/temp</param-value>
            <description>Set the path where the intermediary files will 
be stored.
            </description>
        </init-param>-->
    </filter>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
  <!-- Faces Servlet -->
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup> 1 </load-on-startup>
  </servlet>
  <!-- Faces Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>

</web-app>





-- 
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133



Re: mf 1.1.0 and jscookmenu

Posted by Martin Marinschek <ma...@gmail.com>.
Well,

it looks as if your FacesServlet doesn't work any more - are you sure
you keep the mapping of the faces servlet, and also have the right
sequence of things in your web.xml?

regards,

Martin

On 9/28/05, Francesco Consumi <co...@istitutodeglinnocenti.it> wrote:
> Quoting Marco Barbi <m....@satanet.it>:
>
> >
> > I got problem using myfaces-all.jar (actually I can't remember if it
> > was the same error you are experiencing) so I replaced it with the
> > separate jars (available in the 1.1.0 binary distribution as well)
> > and the menu works.
> >
> > Since I did the same error, I also remember you that you have to
> > define antoher filter-mapping in order to intercept the jscookmenu
> > resources. I suggest you reading
> > http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html .
> >
>
>
> Hi, I think it isn't exactly my problem... I've replaced myfaces* with
> myfaces-all.jar in simple.war and it still works well. In my
> application the problem is in declaration of filter in web.xml. If the
> extensions filter is enabled, my application doesn't work, and I obtain
> the error
>
> >> GRAVE: Faces context not found. getResponseWriter will fail. Check
> >> if the FacesServlet has been initialized at all in your web.xml.
>
> If I don't include the declaration, the applications works as before,
> but the jscookmenu doesn't work.....
>
>
>
> --
> Francesco Consumi
> Ufficio Sistemi informativi
> Istituto degli Innocenti
> Piazza SS.Annunziata, 12
> 50122 Firenze
> consumi at istitutodeglinnocenti.it
> Tel. +39 055 2037320
> ICQ# 12516133
>
>
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Re: mf 1.1.0 and jscookmenu

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Marco Barbi <m....@satanet.it>:

>
> I got problem using myfaces-all.jar (actually I can't remember if it 
> was the same error you are experiencing) so I replaced it with the 
> separate jars (available in the 1.1.0 binary distribution as well) 
> and the menu works.
>
> Since I did the same error, I also remember you that you have to 
> define antoher filter-mapping in order to intercept the jscookmenu 
> resources. I suggest you reading 
> http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html .
>


Hi, I think it isn't exactly my problem... I've replaced myfaces* with 
myfaces-all.jar in simple.war and it still works well. In my 
application the problem is in declaration of filter in web.xml. If the 
extensions filter is enabled, my application doesn't work, and I obtain 
the error

>> GRAVE: Faces context not found. getResponseWriter will fail. Check 
>> if the FacesServlet has been initialized at all in your web.xml.

If I don't include the declaration, the applications works as before, 
but the jscookmenu doesn't work.....



-- 
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133



Re: mf 1.1.0 and jscookmenu

Posted by Marco Barbi <m....@satanet.it>.
Francesco Consumi wrote:
> Quoting Martin Marinschek <ma...@gmail.com>:
> 
>> If it isn't this, try out the examples if they are working with your
>> version of MyFaces!
>>
> 
> I'm still trying to use jscookmenu in my app without including js code.
> 
> I've studied simple.war web.inf file, and I'm trying to use 
> extensionsFilter in my app. But, if I include the following rows:
> 
>    <filter>
>        <filter-name>extensionsFilter</filter-name>
>       
> <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class> 
> 
> .....snip.........
>    </filter>
>    <filter-mapping>
>        <filter-name>extensionsFilter</filter-name>
>        <url-pattern>*.jsf</url-pattern>
>    </filter-mapping>
> 
> I obtain this error:
> 
> GRAVE: Faces context not found. getResponseWriter will fail. Check if 
> the FacesServlet has been initialized at all in your web.xml.
> 
> I'm trying with myfaces-20050926->myfaces-all.jar . The simple.war 
> webapp works well.
> 
> any suggestion ? thanks.
> 
> -- 
> Francesco Consumi
> 
> 
> 
Francesco,

I got problem using myfaces-all.jar (actually I can't remember if it was 
the same error you are experiencing) so I replaced it with the separate 
jars (available in the 1.1.0 binary distribution as well) and the menu 
works.

Since I did the same error, I also remember you that you have to define 
antoher filter-mapping in order to intercept the jscookmenu resources. I 
suggest you reading 
http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html .

Bye.
Marco


Re: mf 1.1.0 and jscookmenu

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:

> If it isn't this, try out the examples if they are working with your
> version of MyFaces!
>

I'm still trying to use jscookmenu in my app without including js code.

I've studied simple.war web.inf file, and I'm trying to use 
extensionsFilter in my app. But, if I include the following rows:

    <filter>
        <filter-name>extensionsFilter</filter-name>
       
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
.....snip.........
    </filter>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>

I obtain this error:

GRAVE: Faces context not found. getResponseWriter will fail. Check if 
the FacesServlet has been initialized at all in your web.xml.

I'm trying with myfaces-20050926->myfaces-all.jar . The simple.war 
webapp works well.

any suggestion ? thanks.

--
Francesco Consumi



Re: mf 1.1.0 and jscookmenu

Posted by Martin Marinschek <ma...@gmail.com>.
If it isn't this, try out the examples if they are working with your
version of MyFaces!

regards,

Martin

On 9/26/05, Simon Kitching <sk...@obsidium.com> wrote:
> Francesco Consumi wrote:
> > Hi,
> >
> > I'm upgrading all of my projects to 1.1.0, and I don't understand if in
> > new version is still necessary to include styles and js files for
> > JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple
> > doesn't include any <script language="JavaScript"
> > src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
> >
> > ...et cetera.
> > But, if I don't include these declaration in my pages, the menu doesn't
> > work.
> >
> > what's the solution of this mistery ?
>
> Have you declared the ExtensionsFilter in your web.xml file?
>
> See:
> http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html
>
> [And I can confirm the last paragraph of that email is true, ie the
> extensions filter must also be mapped to *.jsf].
>
> Regards,
>
> Simon
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Re: mf 1.1.0 and jscookmenu

Posted by Simon Kitching <sk...@obsidium.com>.
Francesco Consumi wrote:
> Hi,
> 
> I'm upgrading all of my projects to 1.1.0, and I don't understand if in 
> new version is still necessary to include styles and js files for 
> JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple 
> doesn't include any <script language="JavaScript" 
> src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
> 
> ...et cetera.
> But, if I don't include these declaration in my pages, the menu doesn't 
> work.
> 
> what's the solution of this mistery ?

Have you declared the ExtensionsFilter in your web.xml file?

See:
http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html

[And I can confirm the last paragraph of that email is true, ie the 
extensions filter must also be mapped to *.jsf].

Regards,

Simon

Re: mf 1.1.0 and jscookmenu

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:

> With the nightly build,
>
> the problem should go away - the bug was fixed just shortly after 1.1.0 ;)
>
Thanks, Martin.
I've just tried with 050925 build (myfaces-all.jar of 1,99 megs), but 
it still doesn't work if I dont' include any javascript code.

this is one of my pages:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<jsp:useBean class="primus.adminBean" id="ab" scope="session"/>

<h:panelGrid id="header_group1" columns="1" styleClass="pageHeader1">
  <h:outputText value="#{initParam.titProg}"/>
</h:panelGrid>
<h:panelGrid id="header_group2" columns="1" styleClass="pageHeader2" 
columnClasses="pageHeader2col1"  >
  <t:jscookMenu layout="hbr" theme="ThemeOffice" >
    <t:navigationMenuItem id="nav_home" itemLabel="Home" action="go_home" >
      <t:navigationMenuItem id="nav_home2" itemLabel="Home" action="go_home" />
      <t:navigationMenuItem id="nav_logout" itemLabel="Uscita" 
action="#{ab.currentUser.logout}" />
    </t:navigationMenuItem>
    <t:navigationMenuItem id="nav_ambiti" itemLabel="Ambiti" >
      <t:navigationMenuItem id="nav_ambiti2" itemLabel="Ambiti" 
action="#{ab.aggAmbiti2}" />
    </t:navigationMenuItem>
    <t:navigationMenuItem id="nav_regioni" itemLabel="Regioni" >
      <t:navigationMenuItem id="nav_riferimenti" 
itemLabel="Riferimenti" action="#{ab.aggRiferimenti}" />
    </t:navigationMenuItem>
    <t:navigationMenuItem id="nav_stat" itemLabel="Statistica" 
action="go_el_utenti" >
      <t:navigationMenuItem id="nav_stat_argomenti" 
itemLabel="Argomenti" action="go_el_argomenti" />
      <t:navigationMenuItem id="nav_stat_macroarg" 
itemLabel="Macroargomenti" action="go_el_macroarg" />
      <t:navigationMenuItem id="nav_stat_indicatori" 
itemLabel="Indicatori" action="go_el_indicatori" />
    </t:navigationMenuItem>
  </t:jscookMenu>
</h:panelGrid>

-- 
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133



Re: mf 1.1.0 and jscookmenu

Posted by Martin Marinschek <ma...@gmail.com>.
With the nightly build,

the problem should go away - the bug was fixed just shortly after 1.1.0 ;)

regards,

Martin

On 9/26/05, Francesco Consumi <co...@istitutodeglinnocenti.it> wrote:
> Hi,
>
> I'm upgrading all of my projects to 1.1.0, and I don't understand if in
> new version is still necessary to include styles and js files for
> JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple
> doesn't include any <script language="JavaScript"
> src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
>
> ...et cetera.
> But, if I don't include these declaration in my pages, the menu doesn't work.
>
> what's the solution of this mistery ?
>
> thanks,  -- Francesco Consumi
> Ufficio Sistemi informativi
> Istituto degli Innocenti
> Piazza SS.Annunziata, 12
> 50122 Firenze
> consumi at istitutodeglinnocenti.it
> Tel. +39 055 2037320
> ICQ# 12516133
>
>
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German