You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Fabio F." <fa...@gmail.com> on 2010/03/23 13:19:43 UTC

Tomahawk and eclipse galileo not working?

Hello,

I've installed Eclipse galileo with myfaces core 1.2.8 and tomahawk12-1.1.9
.

I am able to get working the tomahawk tags that don't have javascript, but
not those who have them.

For example, if in a <t:inputDate> tag set "popupCalendar=false" the page is
working, if I set it to "true" it simply stops rendering the page, becoming
incomplete. No way to have an error message to debug.

Is it a bug in tomahawk or am I missing something?

Those are my files:

web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:web="
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
  <display-name>telemarketing</
display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <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>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See
JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>
  <context-param>
    <description>
    This parameter tells MyFaces if javascript code should be allowed in
    the rendered HTML output.
    If javascript is allowed, command_link anchors will have javascript code
    that submits the corresponding form.
    If javascript is not allowed, the state saving info and nested
parameters
    will be added as url parameters.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>
    If true, rendered HTML code will be formatted, so that it is
'human-readable'
    i.e. additional line separators and whitespace will be written, that do
not
    influence the HTML code.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
  </context-param>
  <context-param>
    <description>
    If true, a javascript function will be rendered that is able to restore
the
    former vertical scroll on every request. Convenient feature if you have
pages
    with long lists and you do not want the browser page to always jump to
the top
    if you trigger a link or button action that stays on the same page.
    Default is 'false'
</description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>
  <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>
  <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
    <param-value>netwave.utils.ErrorHandler</param-value>
  </context-param>
  <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
          <param-name>uploadMaxFileSize</param-name>
          <param-value>20m</param-value>
      </init-param>
  </filter>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>/faces/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <error-page>

<exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/session_expired.jsp</location>
  </error-page>
</web-app>

login.jsp:

<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login aziende</title>
</head>
<body>
<center><h1>Elenco aziende</h1></center>
<f:view>
<h:form id="login">
    <p>Entra</p>
    <p>Username: <h:inputText
value="#{BB_Aziende.userid}"></h:inputText></p>
    <p>Password: <h:inputSecret
value="#{BB_Aziende.password}"></h:inputSecret></p>
    <h:commandButton value="Login"
action="#{BB_Aziende.Login}"></h:commandButton>
</h:form>
</f:view>
</body>
</html>

query.jsp:

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

<f:view>
<f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
<t:document>
<t:documentHead>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Benvenuto</title>
<style type="text/css">
    <!--
    .highlight { background-color: #A8D1E8; color=blue;}
    -->
</style>
</t:documentHead>
<t:documentBody>
<h:form id="queryaziende">
    <p>Benvenuto <h:outputLabel
value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
    <p>Provincia: <h:selectOneMenu value="#{BB_Aziende.azienda.provincia}">
        <f:selectItems value="#{BB_Aziende.province}"/>
    </h:selectOneMenu>
    Stato: <h:selectOneMenu value="#{BB_Aziende.azienda.noninteressato}">
        <f:selectItems value="#{BB_Aziende.stati}"/>
    </h:selectOneMenu></p>
    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
popupCalendar="true" required="true">
        <f:validator validatorId="checkvaliddate"/>
    </t:inputDate>
    <t:commandButton value="Query"
action="#{BB_Aziende.Queryaziende}"></t:commandButton>
</h:form>
</t:documentBody>
</t:document>
</f:view>

Thank you in advance, best regards

Fabio Ferrari

P. S. Non è possibile che qualsiasi cosa scrivo venga rigettata per spam. Ma
lo fate apposta?

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
Then I am really sorry, but I don't know what could be the problem.

Maybe you could take a look at the MyFaces Tomahawk examples [1] and try
them out. There the MyFacesExtensionsFilter should work!

Regards,
Jakob

[1] http://myfaces.apache.org/tomahawk/download.html

2010/3/23 Fabio F. <fa...@gmail.com>

> I think it was the same, however I renamed even the variables to be equal
> to
> your file... but nothing.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> http://java.sun.com/xml/ns/javaee" xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> version="2.5">
>  <display-name>telemarketing</display-name>
>  <welcome-file-list>
>    <welcome-file>index.html</welcome-file>
>    <welcome-file>index.htm</welcome-file>
>    <welcome-file>index.jsp</welcome-file>
>    <welcome-file>default.html</welcome-file>
>    <welcome-file>default.htm</welcome-file>
>    <welcome-file>default.jsp</welcome-file>
>  </welcome-file-list>
>  <context-param>
>     <description>State saving method: 'client' or 'server' (=default). See
> JSF Specification 2.5.2</description>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>server</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>/faces/*</url-pattern>
>  </servlet-mapping>
>   <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>  </listener>
>  <context-param>
>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
>    <param-value>netwave.utils.ErrorHandler</param-value>
>  </context-param>
>  <filter>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>
>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>      <init-param>
>           <description>Set the size limit for uploaded files.
>               Format: 10 - 10 bytes
>                       10k - 10 KB
>                       10m - 10 MB
>                       1g - 1 GB</description>
>          <param-name>maxFileSize</param-name>
>          <param-value>20m</param-value>
>      </init-param>
>  </filter>
>   <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>       <servlet-name>Faces Servlet</servlet-name>
>  </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/myFacesExtensionResource/*</url-pattern>
>  </filter-mapping>
>   <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>      <url-pattern>*.jsf</url-pattern>
>  </filter-mapping>
>  <filter>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
>  </filter>
>  <filter-mapping>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <url-pattern>/*</url-pattern>
>  </filter-mapping>
>  <error-page>
>
>
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
>    <location>/session_expired.jsp</location>
>  </error-page>
> </web-app>
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > Here is a web.xml configuration excerpt from a project of mine which uses
> > tomahawk and myfaces - this should help you:
> >
> > <!-- Extensions Filter -->
> >  <filter>
> >  <filter-name>MyFacesExtensionsFilter</filter-name>
> >
> >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> >  <init-param>
> >    <description>Set the size limit for uploaded files.
> >                Format: 10 - 10 bytes
> >                        10k - 10 KB
> >                        10m - 10 MB
> >                        1g - 1 GB</description>
> >   <param-name>maxFileSize</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 adding <script/>, <link/>, and other resource
> > tags to JSF-pages  -->
> >  <filter-mapping>
> >  <filter-name>MyFacesExtensionsFilter</filter-name>
> >  <url-pattern>*.jsf</url-pattern>
> >  </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>
> >
> > <servlet-mapping>
> >  <servlet-name>Faces Servlet</servlet-name>
> >   <url-pattern>*.jsf</url-pattern>
> >  </servlet-mapping>
> >  <servlet-mapping>
> >  <servlet-name>Faces Servlet</servlet-name>
> >   <url-pattern>/faces/*</url-pattern>
> >  </servlet-mapping>
> >
> > Regards,
> > Jakob
> >
> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> >
> > > OK, sorry..
> > >
> > > But this web.xml includes
> > >
> > >
> > > <filter-mapping>
> > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >      <url-pattern>/faces/*</url-pattern>
> > >  </filter-mapping>
> > >
> > > but it should have
> > >
> > >
> > > <filter-mapping>
> > > <filter-name>MyFacesExtensionsFilter</filter-name>
> > > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> > > </filter-mapping>
> > >
> > > You could also try adding both...
> > >
> > > Regards,
> > > Jakob
> > >
> > >
> > > 2010/3/23 Fabio F. <fa...@gmail.com>
> > >
> > >> I've read and read this page tens of times those days...
> > >>
> > >>
> > >> No, I've modified only the line in the filter config, this is
> definitely
> > >> my
> > >> web.xml:
> > >>
> > >> <?xml version="1.0" encoding="UTF-8"?>
> > >> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="
> > >> http://java.sun.com/xml/ns/javaee" xmlns:web="
> > >> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="
> > >> http://java.sun.com/xml/ns/javaee
> > >> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > >> version="2.5">
> > >>  <display-name>telemarketing</display-name>
> > >>  <welcome-file-list>
> > >>    <welcome-file>index.html</welcome-file>
> > >>    <welcome-file>index.htm</welcome-file>
> > >>    <welcome-file>index.jsp</welcome-file>
> > >>    <welcome-file>default.html</welcome-file>
> > >>    <welcome-file>default.htm</welcome-file>
> > >>    <welcome-file>default.jsp</welcome-file>
> > >>  </welcome-file-list>
> > >>   <context-param>
> > >>
> >  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > >>    <param-value>resources.application</param-value>
> > >>  </context-param>
> > >>  <context-param>
> > >>    <description>State saving method: 'client' or 'server' (=default).
> > See
> > >> JSF Specification 2.5.2</description>
> > >>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > >>    <param-value>server</param-value>
> > >>  </context-param>
> > >>  <context-param>
> > >>    <description>
> > >>    This parameter tells MyFaces if javascript code should be allowed
> in
> > >>    the rendered HTML output.
> > >>    If javascript is allowed, command_link anchors will have javascript
> > >> code
> > >>    that submits the corresponding form.
> > >>    If javascript is not allowed, the state saving info and nested
> > >> parameters
> > >>    will be added as url parameters.
> > >>    Default is 'true'</description>
> > >>    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> > >>    <param-value>true</param-value>
> > >>  </context-param>
> > >>  <context-param>
> > >>    <description>
> > >>    If true, rendered HTML code will be formatted, so that it is
> > >> 'human-readable'
> > >>    i.e. additional line separators and whitespace will be written,
> that
> > do
> > >> not
> > >>    influence the HTML code.
> > >>    Default is 'true'</description>
> > >>    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> > >>    <param-value>true</param-value>
> > >>  </context-param>
> > >>  <context-param>
> > >>    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> > >>    <param-value>false</param-value>
> > >>  </context-param>
> > >>  <context-param>
> > >>    <description>
> > >>    If true, a javascript function will be rendered that is able to
> > restore
> > >> the
> > >>    former vertical scroll on every request. Convenient feature if you
> > have
> > >> pages
> > >>    with long lists and you do not want the browser page to always jump
> > to
> > >> the top
> > >>    if you trigger a link or button action that stays on the same page.
> > >>    Default is 'false'
> > >> </description>
> > >>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> > >>    <param-value>true</param-value>
> > >>  </context-param>
> > >>  <servlet>
> > >>    <servlet-name>faces</servlet-name>
> > >>    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> > >>    <load-on-startup>1</load-on-startup>
> > >>  </servlet>
> > >>  <servlet-mapping>
> > >>    <servlet-name>faces</servlet-name>
> > >>    <url-pattern>/faces/*</url-pattern>
> > >>  </servlet-mapping>
> > >>  <listener>
> > >>
> > >>
> > >>
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > >>  </listener>
> > >>  <context-param>
> > >>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> > >>    <param-value>netwave.utils.ErrorHandler</param-value>
> > >>  </context-param>
> > >>  <filter>
> > >>       <filter-name>MyFacesExtensionsFilter</filter-name>
> > >>
> > >>
> > >>
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> > >>      <init-param>
> > >>          <param-name>uploadMaxFileSize</param-name>
> > >>          <param-value>20m</param-value>
> > >>      </init-param>
> > >>  </filter>
> > >>   <filter-mapping>
> > >>      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >>       <servlet-name>faces</servlet-name>
> > >>  </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>*.jsf</url-pattern>
> > >>  </filter-mapping>
> > >>  <filter>
> > >>    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > >>
> > >>
> >  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> > >>  </filter>
> > >>  <filter-mapping>
> > >>    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > >>    <url-pattern>/*</url-pattern>
> > >>  </filter-mapping>
> > >>  <error-page>
> > >>
> > >>
> > >>
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> > >>    <location>/session_expired.jsp</location>
> > >>  </error-page>
> > >> </web-app>
> > >>
> > >> I attach even my faces-config.xml (for the line message listener, the
> > rest
> > >> I
> > >> don't think is useful):
> > >>
> > >> <?xml version="1.0" encoding="UTF-8"?>
> > >>
> > >> <faces-config
> > >>     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-facesconfig_1_2.xsd"
> > >>    version="1.2">
> > >>    <managed-bean>
> > >>        <managed-bean-name>BB_Aziende</managed-bean-name>
> > >>
>  <managed-bean-class>telemarketing.BB_Aziende</managed-bean-class>
> > >>        <managed-bean-scope>session</managed-bean-scope>
> > >>    </managed-bean>
> > >>    <navigation-rule>
> > >>        <display-name>login</display-name>
> > >>        <from-view-id>/login.jsp</from-view-id>
> > >>        <navigation-case>
> > >>            <from-outcome>login_ok</from-outcome>
> > >>            <to-view-id>/query.jsp</to-view-id>
> > >>        </navigation-case>
> > >>        <navigation-case>
> > >>            <from-outcome>login_ko</from-outcome>
> > >>            <to-view-id>/accessdenied.jsp</to-view-id>
> > >>        </navigation-case>
> > >>    </navigation-rule>
> > >>    <navigation-rule>
> > >>        <navigation-case>
> > >>            <from-outcome>exceptionView</from-outcome>
> > >>            <to-view-id>/session_expired.jsp</to-view-id>
> > >>        </navigation-case>
> > >>    </navigation-rule>
> > >>    <application>
> > >>        <message-bundle>netwave.GeneralMessages</message-bundle>
> > >>    </application>
> > >>    <application>
> > >>        <message-bundle>netwave.GeneralErrors</message-bundle>
> > >>    </application>
> > >>    <validator>
> > >>        <validator-id>checkvalidemail</validator-id>
> > >>
> > >>
> > >>
> >
> <validator-class>netwave.utils.validators.Validator_Email</validator-class>
> > >>    </validator>
> > >>    <validator>
> > >>        <validator-id>checkvalidnumber</validator-id>
> > >>
> > >>
> > >>
> >
> <validator-class>netwave.utils.validators.Validator_Integer</validator-class>
> > >>    </validator>
> > >>    <validator>
> > >>        <validator-id>checkvalidtext</validator-id>
> > >>
> > >>
> >
> <validator-class>netwave.utils.validators.Validator_Text</validator-class>
> > >>    </validator>
> > >>    <validator>
> > >>        <validator-id>checkvalidfloat</validator-id>
> > >>
> > >>
> > >>
> >
> <validator-class>netwave.utils.validators.Validator_Float</validator-class>
> > >>    </validator>
> > >>    <validator>
> > >>        <validator-id>checkvaliddate</validator-id>
> > >>
> > >>
> >
> <validator-class>netwave.utils.validators.Validator_Date</validator-class>
> > >>    </validator>
> > >>    <validator>
> > >>        <validator-id>checkvalidlist</validator-id>
> > >>
> > >>
> >
> <validator-class>netwave.utils.validators.Validator_List</validator-class>
> > >>    </validator>
> > >>    <converter>
> > >>        <converter-id>convertnumber</converter-id>
> > >>
> > >>
> > >>
> >
> <converter-class>netwave.utils.converters.Converter_Integer</converter-class>
> > >>    </converter>
> > >>    <converter>
> > >>        <converter-id>convertfloat</converter-id>
> > >>
> > >>
> > >>
> >
> <converter-class>netwave.utils.converters.Converter_Float</converter-class>
> > >>    </converter>
> > >>    <lifecycle>
> > >>        <phase-listener>netwave.utils.MessageListener</phase-listener>
> > >>    </lifecycle>
> > >> </faces-config>
> > >>
> > >> Fabio Ferrari
> > >>
> > >> 2010/3/23 Jakob Korherr <ja...@gmail.com>
> > >>
> > >> > Have you changed the filter config only? You must not change the
> > config
> > >> for
> > >> > the FacesServlet.
> > >> >
> > >> > Take a look at
> > http://myfaces.apache.org/tomahawk/extensionsFilter.html
> > >> >
> > >> > Maybe this will help you solve it!
> > >> >
> > >> > Regards,
> > >> > Jakob
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>

Re: [ANN]VTD-XML 2.9

Posted by Werner Punz <we...@gmail.com>.
Am 13.08.10 04:39, schrieb Jimmy Zhang:
> VTD-XML 2.9, the next generation XML Processing API for SOA and Cloud computing, has been released. Please visit  https://sourceforge.net/projects/vtd-xml/files/ to download the latest version.
>    a.. Strict Conformance
>      a.. VTD-XML now fully conforms to XML namespace 1.0 spec
>    b.. Performance Improvement
>      a.. Significantly improved parsing performance for small XML files
>    c.. Expand Core VTD-XML API
>      a.. Adds getPrefixString(), and toNormalizedString2()
>    d.. Cutting/Splitting
>      a.. Adds getSiblingElementFragment()
>    e.. A number of bug fixes and code enhancement including:
>      a.. Fixes a bug for reading very large XML documents on some platforms
>      b.. Fixes a bug in parsing processing instruction
>      c.. Fixes a bug in outputAndReparse()
>
Wrong mailinglist...



[ANN]VTD-XML 2.9

Posted by Jimmy Zhang <cr...@comcast.net>.
VTD-XML 2.9, the next generation XML Processing API for SOA and Cloud computing, has been released. Please visit  https://sourceforge.net/projects/vtd-xml/files/ to download the latest version.
  a.. Strict Conformance 
    a.. VTD-XML now fully conforms to XML namespace 1.0 spec 
  b.. Performance Improvement
    a.. Significantly improved parsing performance for small XML files 
  c.. Expand Core VTD-XML API  
    a.. Adds getPrefixString(), and toNormalizedString2() 
  d.. Cutting/Splitting 
    a.. Adds getSiblingElementFragment()  
  e.. A number of bug fixes and code enhancement including: 
    a.. Fixes a bug for reading very large XML documents on some platforms 
    b.. Fixes a bug in parsing processing instruction 
    c.. Fixes a bug in outputAndReparse() 

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
I think it was the same, however I renamed even the variables to be equal to
your file... but nothing.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:web="
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
  <display-name>telemarketing</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See
JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</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>/faces/*</url-pattern>
  </servlet-mapping>
  <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
    <param-value>netwave.utils.ErrorHandler</param-value>
  </context-param>
  <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
          <description>Set the size limit for uploaded files.
               Format: 10 - 10 bytes
                       10k - 10 KB
                       10m - 10 MB
                       1g - 1 GB</description>
          <param-name>maxFileSize</param-name>
          <param-value>20m</param-value>
      </init-param>
  </filter>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
  </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/myFacesExtensionResource/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.jsf</url-pattern>
  </filter-mapping>
 <filter>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <error-page>

<exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/session_expired.jsp</location>
  </error-page>
</web-app>

2010/3/23 Jakob Korherr <ja...@gmail.com>

> Here is a web.xml configuration excerpt from a project of mine which uses
> tomahawk and myfaces - this should help you:
>
> <!-- Extensions Filter -->
>  <filter>
>  <filter-name>MyFacesExtensionsFilter</filter-name>
>
>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>  <init-param>
>    <description>Set the size limit for uploaded files.
>                Format: 10 - 10 bytes
>                        10k - 10 KB
>                        10m - 10 MB
>                        1g - 1 GB</description>
>   <param-name>maxFileSize</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 adding <script/>, <link/>, and other resource
> tags to JSF-pages  -->
>  <filter-mapping>
>  <filter-name>MyFacesExtensionsFilter</filter-name>
>  <url-pattern>*.jsf</url-pattern>
>  </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>
>
> <servlet-mapping>
>  <servlet-name>Faces Servlet</servlet-name>
>   <url-pattern>*.jsf</url-pattern>
>  </servlet-mapping>
>  <servlet-mapping>
>  <servlet-name>Faces Servlet</servlet-name>
>   <url-pattern>/faces/*</url-pattern>
>  </servlet-mapping>
>
> Regards,
> Jakob
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > OK, sorry..
> >
> > But this web.xml includes
> >
> >
> > <filter-mapping>
> >      <filter-name>MyFacesExtensionsFilter</filter-name>
> >      <url-pattern>/faces/*</url-pattern>
> >  </filter-mapping>
> >
> > but it should have
> >
> >
> > <filter-mapping>
> > <filter-name>MyFacesExtensionsFilter</filter-name>
> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> > </filter-mapping>
> >
> > You could also try adding both...
> >
> > Regards,
> > Jakob
> >
> >
> > 2010/3/23 Fabio F. <fa...@gmail.com>
> >
> >> I've read and read this page tens of times those days...
> >>
> >>
> >> No, I've modified only the line in the filter config, this is definitely
> >> my
> >> web.xml:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> >> http://java.sun.com/xml/ns/javaee" xmlns:web="
> >> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> >> http://java.sun.com/xml/ns/javaee
> >> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> >> version="2.5">
> >>  <display-name>telemarketing</display-name>
> >>  <welcome-file-list>
> >>    <welcome-file>index.html</welcome-file>
> >>    <welcome-file>index.htm</welcome-file>
> >>    <welcome-file>index.jsp</welcome-file>
> >>    <welcome-file>default.html</welcome-file>
> >>    <welcome-file>default.htm</welcome-file>
> >>    <welcome-file>default.jsp</welcome-file>
> >>  </welcome-file-list>
> >>   <context-param>
> >>
>  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> >>    <param-value>resources.application</param-value>
> >>  </context-param>
> >>  <context-param>
> >>    <description>State saving method: 'client' or 'server' (=default).
> See
> >> JSF Specification 2.5.2</description>
> >>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> >>    <param-value>server</param-value>
> >>  </context-param>
> >>  <context-param>
> >>    <description>
> >>    This parameter tells MyFaces if javascript code should be allowed in
> >>    the rendered HTML output.
> >>    If javascript is allowed, command_link anchors will have javascript
> >> code
> >>    that submits the corresponding form.
> >>    If javascript is not allowed, the state saving info and nested
> >> parameters
> >>    will be added as url parameters.
> >>    Default is 'true'</description>
> >>    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> >>    <param-value>true</param-value>
> >>  </context-param>
> >>  <context-param>
> >>    <description>
> >>    If true, rendered HTML code will be formatted, so that it is
> >> 'human-readable'
> >>    i.e. additional line separators and whitespace will be written, that
> do
> >> not
> >>    influence the HTML code.
> >>    Default is 'true'</description>
> >>    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> >>    <param-value>true</param-value>
> >>  </context-param>
> >>  <context-param>
> >>    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> >>    <param-value>false</param-value>
> >>  </context-param>
> >>  <context-param>
> >>    <description>
> >>    If true, a javascript function will be rendered that is able to
> restore
> >> the
> >>    former vertical scroll on every request. Convenient feature if you
> have
> >> pages
> >>    with long lists and you do not want the browser page to always jump
> to
> >> the top
> >>    if you trigger a link or button action that stays on the same page.
> >>    Default is 'false'
> >> </description>
> >>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> >>    <param-value>true</param-value>
> >>  </context-param>
> >>  <servlet>
> >>    <servlet-name>faces</servlet-name>
> >>    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> >>    <load-on-startup>1</load-on-startup>
> >>  </servlet>
> >>  <servlet-mapping>
> >>    <servlet-name>faces</servlet-name>
> >>    <url-pattern>/faces/*</url-pattern>
> >>  </servlet-mapping>
> >>  <listener>
> >>
> >>
> >>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >>  </listener>
> >>  <context-param>
> >>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> >>    <param-value>netwave.utils.ErrorHandler</param-value>
> >>  </context-param>
> >>  <filter>
> >>       <filter-name>MyFacesExtensionsFilter</filter-name>
> >>
> >>
> >>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> >>      <init-param>
> >>          <param-name>uploadMaxFileSize</param-name>
> >>          <param-value>20m</param-value>
> >>      </init-param>
> >>  </filter>
> >>   <filter-mapping>
> >>      <filter-name>MyFacesExtensionsFilter</filter-name>
> >>       <servlet-name>faces</servlet-name>
> >>  </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>*.jsf</url-pattern>
> >>  </filter-mapping>
> >>  <filter>
> >>    <filter-name>CustomCharacterEncodingFilter</filter-name>
> >>
> >>
>  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> >>  </filter>
> >>  <filter-mapping>
> >>    <filter-name>CustomCharacterEncodingFilter</filter-name>
> >>    <url-pattern>/*</url-pattern>
> >>  </filter-mapping>
> >>  <error-page>
> >>
> >>
> >>
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> >>    <location>/session_expired.jsp</location>
> >>  </error-page>
> >> </web-app>
> >>
> >> I attach even my faces-config.xml (for the line message listener, the
> rest
> >> I
> >> don't think is useful):
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> <faces-config
> >>     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-facesconfig_1_2.xsd"
> >>    version="1.2">
> >>    <managed-bean>
> >>        <managed-bean-name>BB_Aziende</managed-bean-name>
> >>        <managed-bean-class>telemarketing.BB_Aziende</managed-bean-class>
> >>        <managed-bean-scope>session</managed-bean-scope>
> >>    </managed-bean>
> >>    <navigation-rule>
> >>        <display-name>login</display-name>
> >>        <from-view-id>/login.jsp</from-view-id>
> >>        <navigation-case>
> >>            <from-outcome>login_ok</from-outcome>
> >>            <to-view-id>/query.jsp</to-view-id>
> >>        </navigation-case>
> >>        <navigation-case>
> >>            <from-outcome>login_ko</from-outcome>
> >>            <to-view-id>/accessdenied.jsp</to-view-id>
> >>        </navigation-case>
> >>    </navigation-rule>
> >>    <navigation-rule>
> >>        <navigation-case>
> >>            <from-outcome>exceptionView</from-outcome>
> >>            <to-view-id>/session_expired.jsp</to-view-id>
> >>        </navigation-case>
> >>    </navigation-rule>
> >>    <application>
> >>        <message-bundle>netwave.GeneralMessages</message-bundle>
> >>    </application>
> >>    <application>
> >>        <message-bundle>netwave.GeneralErrors</message-bundle>
> >>    </application>
> >>    <validator>
> >>        <validator-id>checkvalidemail</validator-id>
> >>
> >>
> >>
> <validator-class>netwave.utils.validators.Validator_Email</validator-class>
> >>    </validator>
> >>    <validator>
> >>        <validator-id>checkvalidnumber</validator-id>
> >>
> >>
> >>
> <validator-class>netwave.utils.validators.Validator_Integer</validator-class>
> >>    </validator>
> >>    <validator>
> >>        <validator-id>checkvalidtext</validator-id>
> >>
> >>
> <validator-class>netwave.utils.validators.Validator_Text</validator-class>
> >>    </validator>
> >>    <validator>
> >>        <validator-id>checkvalidfloat</validator-id>
> >>
> >>
> >>
> <validator-class>netwave.utils.validators.Validator_Float</validator-class>
> >>    </validator>
> >>    <validator>
> >>        <validator-id>checkvaliddate</validator-id>
> >>
> >>
> <validator-class>netwave.utils.validators.Validator_Date</validator-class>
> >>    </validator>
> >>    <validator>
> >>        <validator-id>checkvalidlist</validator-id>
> >>
> >>
> <validator-class>netwave.utils.validators.Validator_List</validator-class>
> >>    </validator>
> >>    <converter>
> >>        <converter-id>convertnumber</converter-id>
> >>
> >>
> >>
> <converter-class>netwave.utils.converters.Converter_Integer</converter-class>
> >>    </converter>
> >>    <converter>
> >>        <converter-id>convertfloat</converter-id>
> >>
> >>
> >>
> <converter-class>netwave.utils.converters.Converter_Float</converter-class>
> >>    </converter>
> >>    <lifecycle>
> >>        <phase-listener>netwave.utils.MessageListener</phase-listener>
> >>    </lifecycle>
> >> </faces-config>
> >>
> >> Fabio Ferrari
> >>
> >> 2010/3/23 Jakob Korherr <ja...@gmail.com>
> >>
> >> > Have you changed the filter config only? You must not change the
> config
> >> for
> >> > the FacesServlet.
> >> >
> >> > Take a look at
> http://myfaces.apache.org/tomahawk/extensionsFilter.html
> >> >
> >> > Maybe this will help you solve it!
> >> >
> >> > Regards,
> >> > Jakob
> >> >
> >> >
> >>
> >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
Here is a web.xml configuration excerpt from a project of mine which uses
tomahawk and myfaces - this should help you:

<!-- Extensions Filter -->
 <filter>
  <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
  <init-param>
   <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB</description>
   <param-name>maxFileSize</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 adding <script/>, <link/>, and other resource
tags to JSF-pages  -->
 <filter-mapping>
  <filter-name>MyFacesExtensionsFilter</filter-name>
  <url-pattern>*.jsf</url-pattern>
 </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>

<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.jsf</url-pattern>
 </servlet-mapping>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>/faces/*</url-pattern>
 </servlet-mapping>

Regards,
Jakob

2010/3/23 Jakob Korherr <ja...@gmail.com>

> OK, sorry..
>
> But this web.xml includes
>
>
> <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>      <url-pattern>/faces/*</url-pattern>
>  </filter-mapping>
>
> but it should have
>
>
> <filter-mapping>
> <filter-name>MyFacesExtensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> You could also try adding both...
>
> Regards,
> Jakob
>
>
> 2010/3/23 Fabio F. <fa...@gmail.com>
>
>> I've read and read this page tens of times those days...
>>
>>
>> No, I've modified only the line in the filter config, this is definitely
>> my
>> web.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
>> http://java.sun.com/xml/ns/javaee" xmlns:web="
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
>> http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
>> version="2.5">
>>  <display-name>telemarketing</display-name>
>>  <welcome-file-list>
>>    <welcome-file>index.html</welcome-file>
>>    <welcome-file>index.htm</welcome-file>
>>    <welcome-file>index.jsp</welcome-file>
>>    <welcome-file>default.html</welcome-file>
>>    <welcome-file>default.htm</welcome-file>
>>    <welcome-file>default.jsp</welcome-file>
>>  </welcome-file-list>
>>   <context-param>
>>    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
>>    <param-value>resources.application</param-value>
>>  </context-param>
>>  <context-param>
>>    <description>State saving method: 'client' or 'server' (=default). See
>> JSF Specification 2.5.2</description>
>>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>>    <param-value>server</param-value>
>>  </context-param>
>>  <context-param>
>>    <description>
>>    This parameter tells MyFaces if javascript code should be allowed in
>>    the rendered HTML output.
>>    If javascript is allowed, command_link anchors will have javascript
>> code
>>    that submits the corresponding form.
>>    If javascript is not allowed, the state saving info and nested
>> parameters
>>    will be added as url parameters.
>>    Default is 'true'</description>
>>    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
>>    <param-value>true</param-value>
>>  </context-param>
>>  <context-param>
>>    <description>
>>    If true, rendered HTML code will be formatted, so that it is
>> 'human-readable'
>>    i.e. additional line separators and whitespace will be written, that do
>> not
>>    influence the HTML code.
>>    Default is 'true'</description>
>>    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>>    <param-value>true</param-value>
>>  </context-param>
>>  <context-param>
>>    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
>>    <param-value>false</param-value>
>>  </context-param>
>>  <context-param>
>>    <description>
>>    If true, a javascript function will be rendered that is able to restore
>> the
>>    former vertical scroll on every request. Convenient feature if you have
>> pages
>>    with long lists and you do not want the browser page to always jump to
>> the top
>>    if you trigger a link or button action that stays on the same page.
>>    Default is 'false'
>> </description>
>>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>>    <param-value>true</param-value>
>>  </context-param>
>>  <servlet>
>>    <servlet-name>faces</servlet-name>
>>    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>>    <load-on-startup>1</load-on-startup>
>>  </servlet>
>>  <servlet-mapping>
>>    <servlet-name>faces</servlet-name>
>>    <url-pattern>/faces/*</url-pattern>
>>  </servlet-mapping>
>>  <listener>
>>
>>
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>>  </listener>
>>  <context-param>
>>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
>>    <param-value>netwave.utils.ErrorHandler</param-value>
>>  </context-param>
>>  <filter>
>>       <filter-name>MyFacesExtensionsFilter</filter-name>
>>
>>
>> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>>      <init-param>
>>          <param-name>uploadMaxFileSize</param-name>
>>          <param-value>20m</param-value>
>>      </init-param>
>>  </filter>
>>   <filter-mapping>
>>      <filter-name>MyFacesExtensionsFilter</filter-name>
>>       <servlet-name>faces</servlet-name>
>>  </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>*.jsf</url-pattern>
>>  </filter-mapping>
>>  <filter>
>>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>>
>>  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
>>  </filter>
>>  <filter-mapping>
>>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>>    <url-pattern>/*</url-pattern>
>>  </filter-mapping>
>>  <error-page>
>>
>>
>> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
>>    <location>/session_expired.jsp</location>
>>  </error-page>
>> </web-app>
>>
>> I attach even my faces-config.xml (for the line message listener, the rest
>> I
>> don't think is useful):
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <faces-config
>>     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-facesconfig_1_2.xsd"
>>    version="1.2">
>>    <managed-bean>
>>        <managed-bean-name>BB_Aziende</managed-bean-name>
>>        <managed-bean-class>telemarketing.BB_Aziende</managed-bean-class>
>>        <managed-bean-scope>session</managed-bean-scope>
>>    </managed-bean>
>>    <navigation-rule>
>>        <display-name>login</display-name>
>>        <from-view-id>/login.jsp</from-view-id>
>>        <navigation-case>
>>            <from-outcome>login_ok</from-outcome>
>>            <to-view-id>/query.jsp</to-view-id>
>>        </navigation-case>
>>        <navigation-case>
>>            <from-outcome>login_ko</from-outcome>
>>            <to-view-id>/accessdenied.jsp</to-view-id>
>>        </navigation-case>
>>    </navigation-rule>
>>    <navigation-rule>
>>        <navigation-case>
>>            <from-outcome>exceptionView</from-outcome>
>>            <to-view-id>/session_expired.jsp</to-view-id>
>>        </navigation-case>
>>    </navigation-rule>
>>    <application>
>>        <message-bundle>netwave.GeneralMessages</message-bundle>
>>    </application>
>>    <application>
>>        <message-bundle>netwave.GeneralErrors</message-bundle>
>>    </application>
>>    <validator>
>>        <validator-id>checkvalidemail</validator-id>
>>
>>
>> <validator-class>netwave.utils.validators.Validator_Email</validator-class>
>>    </validator>
>>    <validator>
>>        <validator-id>checkvalidnumber</validator-id>
>>
>>
>> <validator-class>netwave.utils.validators.Validator_Integer</validator-class>
>>    </validator>
>>    <validator>
>>        <validator-id>checkvalidtext</validator-id>
>>
>> <validator-class>netwave.utils.validators.Validator_Text</validator-class>
>>    </validator>
>>    <validator>
>>        <validator-id>checkvalidfloat</validator-id>
>>
>>
>> <validator-class>netwave.utils.validators.Validator_Float</validator-class>
>>    </validator>
>>    <validator>
>>        <validator-id>checkvaliddate</validator-id>
>>
>> <validator-class>netwave.utils.validators.Validator_Date</validator-class>
>>    </validator>
>>    <validator>
>>        <validator-id>checkvalidlist</validator-id>
>>
>> <validator-class>netwave.utils.validators.Validator_List</validator-class>
>>    </validator>
>>    <converter>
>>        <converter-id>convertnumber</converter-id>
>>
>>
>> <converter-class>netwave.utils.converters.Converter_Integer</converter-class>
>>    </converter>
>>    <converter>
>>        <converter-id>convertfloat</converter-id>
>>
>>
>> <converter-class>netwave.utils.converters.Converter_Float</converter-class>
>>    </converter>
>>    <lifecycle>
>>        <phase-listener>netwave.utils.MessageListener</phase-listener>
>>    </lifecycle>
>> </faces-config>
>>
>> Fabio Ferrari
>>
>> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>>
>> > Have you changed the filter config only? You must not change the config
>> for
>> > the FacesServlet.
>> >
>> > Take a look at http://myfaces.apache.org/tomahawk/extensionsFilter.html
>> >
>> > Maybe this will help you solve it!
>> >
>> > Regards,
>> > Jakob
>> >
>> >
>>
>
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
OK, sorry..

But this web.xml includes

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

but it should have

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

You could also try adding both...

Regards,
Jakob


2010/3/23 Fabio F. <fa...@gmail.com>

> I've read and read this page tens of times those days...
>
> No, I've modified only the line in the filter config, this is definitely my
> web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> http://java.sun.com/xml/ns/javaee" xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> version="2.5">
>  <display-name>telemarketing</display-name>
>  <welcome-file-list>
>    <welcome-file>index.html</welcome-file>
>    <welcome-file>index.htm</welcome-file>
>    <welcome-file>index.jsp</welcome-file>
>    <welcome-file>default.html</welcome-file>
>    <welcome-file>default.htm</welcome-file>
>    <welcome-file>default.jsp</welcome-file>
>  </welcome-file-list>
>   <context-param>
>    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
>    <param-value>resources.application</param-value>
>  </context-param>
>  <context-param>
>    <description>State saving method: 'client' or 'server' (=default). See
> JSF Specification 2.5.2</description>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>server</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    This parameter tells MyFaces if javascript code should be allowed in
>    the rendered HTML output.
>    If javascript is allowed, command_link anchors will have javascript code
>    that submits the corresponding form.
>    If javascript is not allowed, the state saving info and nested
> parameters
>    will be added as url parameters.
>    Default is 'true'</description>
>    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    If true, rendered HTML code will be formatted, so that it is
> 'human-readable'
>    i.e. additional line separators and whitespace will be written, that do
> not
>    influence the HTML code.
>    Default is 'true'</description>
>    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <context-param>
>    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
>    <param-value>false</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    If true, a javascript function will be rendered that is able to restore
> the
>    former vertical scroll on every request. Convenient feature if you have
> pages
>    with long lists and you do not want the browser page to always jump to
> the top
>    if you trigger a link or button action that stays on the same page.
>    Default is 'false'
> </description>
>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <servlet>
>    <servlet-name>faces</servlet-name>
>    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>    <load-on-startup>1</load-on-startup>
>  </servlet>
>  <servlet-mapping>
>    <servlet-name>faces</servlet-name>
>    <url-pattern>/faces/*</url-pattern>
>  </servlet-mapping>
>  <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>  </listener>
>  <context-param>
>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
>    <param-value>netwave.utils.ErrorHandler</param-value>
>  </context-param>
>  <filter>
>       <filter-name>MyFacesExtensionsFilter</filter-name>
>
>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>      <init-param>
>          <param-name>uploadMaxFileSize</param-name>
>          <param-value>20m</param-value>
>      </init-param>
>  </filter>
>   <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>       <servlet-name>faces</servlet-name>
>  </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>*.jsf</url-pattern>
>  </filter-mapping>
>  <filter>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
>  </filter>
>  <filter-mapping>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <url-pattern>/*</url-pattern>
>  </filter-mapping>
>  <error-page>
>
>
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
>    <location>/session_expired.jsp</location>
>  </error-page>
> </web-app>
>
> I attach even my faces-config.xml (for the line message listener, the rest
> I
> don't think is useful):
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <faces-config
>     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-facesconfig_1_2.xsd"
>    version="1.2">
>    <managed-bean>
>        <managed-bean-name>BB_Aziende</managed-bean-name>
>        <managed-bean-class>telemarketing.BB_Aziende</managed-bean-class>
>        <managed-bean-scope>session</managed-bean-scope>
>    </managed-bean>
>    <navigation-rule>
>        <display-name>login</display-name>
>        <from-view-id>/login.jsp</from-view-id>
>        <navigation-case>
>            <from-outcome>login_ok</from-outcome>
>            <to-view-id>/query.jsp</to-view-id>
>        </navigation-case>
>        <navigation-case>
>            <from-outcome>login_ko</from-outcome>
>            <to-view-id>/accessdenied.jsp</to-view-id>
>        </navigation-case>
>    </navigation-rule>
>    <navigation-rule>
>        <navigation-case>
>            <from-outcome>exceptionView</from-outcome>
>            <to-view-id>/session_expired.jsp</to-view-id>
>        </navigation-case>
>    </navigation-rule>
>    <application>
>        <message-bundle>netwave.GeneralMessages</message-bundle>
>    </application>
>    <application>
>        <message-bundle>netwave.GeneralErrors</message-bundle>
>    </application>
>    <validator>
>        <validator-id>checkvalidemail</validator-id>
>
> <validator-class>netwave.utils.validators.Validator_Email</validator-class>
>    </validator>
>    <validator>
>        <validator-id>checkvalidnumber</validator-id>
>
>
> <validator-class>netwave.utils.validators.Validator_Integer</validator-class>
>    </validator>
>    <validator>
>        <validator-id>checkvalidtext</validator-id>
>
> <validator-class>netwave.utils.validators.Validator_Text</validator-class>
>    </validator>
>    <validator>
>        <validator-id>checkvalidfloat</validator-id>
>
> <validator-class>netwave.utils.validators.Validator_Float</validator-class>
>    </validator>
>    <validator>
>        <validator-id>checkvaliddate</validator-id>
>
> <validator-class>netwave.utils.validators.Validator_Date</validator-class>
>    </validator>
>    <validator>
>        <validator-id>checkvalidlist</validator-id>
>
> <validator-class>netwave.utils.validators.Validator_List</validator-class>
>    </validator>
>    <converter>
>        <converter-id>convertnumber</converter-id>
>
>
> <converter-class>netwave.utils.converters.Converter_Integer</converter-class>
>    </converter>
>    <converter>
>        <converter-id>convertfloat</converter-id>
>
> <converter-class>netwave.utils.converters.Converter_Float</converter-class>
>    </converter>
>    <lifecycle>
>        <phase-listener>netwave.utils.MessageListener</phase-listener>
>    </lifecycle>
> </faces-config>
>
> Fabio Ferrari
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > Have you changed the filter config only? You must not change the config
> for
> > the FacesServlet.
> >
> > Take a look at http://myfaces.apache.org/tomahawk/extensionsFilter.html
> >
> > Maybe this will help you solve it!
> >
> > Regards,
> > Jakob
> >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
I've read and read this page tens of times those days...

No, I've modified only the line in the filter config, this is definitely my
web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:web="
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
  <display-name>telemarketing</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See
JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>
  <context-param>
    <description>
    This parameter tells MyFaces if javascript code should be allowed in
    the rendered HTML output.
    If javascript is allowed, command_link anchors will have javascript code
    that submits the corresponding form.
    If javascript is not allowed, the state saving info and nested
parameters
    will be added as url parameters.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>
    If true, rendered HTML code will be formatted, so that it is
'human-readable'
    i.e. additional line separators and whitespace will be written, that do
not
    influence the HTML code.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
  </context-param>
  <context-param>
    <description>
    If true, a javascript function will be rendered that is able to restore
the
    former vertical scroll on every request. Convenient feature if you have
pages
    with long lists and you do not want the browser page to always jump to
the top
    if you trigger a link or button action that stays on the same page.
    Default is 'false'
</description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>
  <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
  <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
    <param-value>netwave.utils.ErrorHandler</param-value>
  </context-param>
  <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
          <param-name>uploadMaxFileSize</param-name>
          <param-value>20m</param-value>
      </init-param>
  </filter>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>faces</servlet-name>
  </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>*.jsf</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <error-page>

<exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/session_expired.jsp</location>
  </error-page>
</web-app>

I attach even my faces-config.xml (for the line message listener, the rest I
don't think is useful):

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
    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-facesconfig_1_2.xsd"
    version="1.2">
    <managed-bean>
        <managed-bean-name>BB_Aziende</managed-bean-name>
        <managed-bean-class>telemarketing.BB_Aziende</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
        <display-name>login</display-name>
        <from-view-id>/login.jsp</from-view-id>
        <navigation-case>
            <from-outcome>login_ok</from-outcome>
            <to-view-id>/query.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>login_ko</from-outcome>
            <to-view-id>/accessdenied.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <navigation-case>
            <from-outcome>exceptionView</from-outcome>
            <to-view-id>/session_expired.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <application>
        <message-bundle>netwave.GeneralMessages</message-bundle>
    </application>
    <application>
        <message-bundle>netwave.GeneralErrors</message-bundle>
    </application>
    <validator>
        <validator-id>checkvalidemail</validator-id>

<validator-class>netwave.utils.validators.Validator_Email</validator-class>
    </validator>
    <validator>
        <validator-id>checkvalidnumber</validator-id>

<validator-class>netwave.utils.validators.Validator_Integer</validator-class>
    </validator>
    <validator>
        <validator-id>checkvalidtext</validator-id>

<validator-class>netwave.utils.validators.Validator_Text</validator-class>
    </validator>
    <validator>
        <validator-id>checkvalidfloat</validator-id>

<validator-class>netwave.utils.validators.Validator_Float</validator-class>
    </validator>
    <validator>
        <validator-id>checkvaliddate</validator-id>

<validator-class>netwave.utils.validators.Validator_Date</validator-class>
    </validator>
    <validator>
        <validator-id>checkvalidlist</validator-id>

<validator-class>netwave.utils.validators.Validator_List</validator-class>
    </validator>
    <converter>
        <converter-id>convertnumber</converter-id>

<converter-class>netwave.utils.converters.Converter_Integer</converter-class>
    </converter>
    <converter>
        <converter-id>convertfloat</converter-id>

<converter-class>netwave.utils.converters.Converter_Float</converter-class>
    </converter>
    <lifecycle>
        <phase-listener>netwave.utils.MessageListener</phase-listener>
    </lifecycle>
</faces-config>

Fabio Ferrari

2010/3/23 Jakob Korherr <ja...@gmail.com>

> Have you changed the filter config only? You must not change the config for
> the FacesServlet.
>
> Take a look at http://myfaces.apache.org/tomahawk/extensionsFilter.html
>
> Maybe this will help you solve it!
>
> Regards,
> Jakob
>
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
Have you changed the filter config only? You must not change the config for
the FacesServlet.

Take a look at http://myfaces.apache.org/tomahawk/extensionsFilter.html

Maybe this will help you solve it!

Regards,
Jakob

2010/3/23 Fabio F. <fa...@gmail.com>

> If I change it to that url-pattern, the page doesn't render at all and the
> html I obtain is:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
> <BODY></BODY></HTML>
>
> In case of popupCalendar=true or popupCalendar=false ...
>
> Fabio Ferrari
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > Great - Thanks!
> >
> > The HTML tells me that your filter mapping for the extension filter is
> > wrong. Please change it to
> >
> > <filter-mapping>
> > <filter-name>MyFacesExtensionsFilter</filter-name>
> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> > </filter-mapping>
> >
> > This should make it work!
> >
> > Regards,
> > Jakob
> >
> >
> > 2010/3/23 Fabio F. <fa...@gmail.com>
> >
> > > And this is the page (query.jsp) for popupCalendar=false
> > >
> > > <html><head>
> > > <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> > > <title>Benvenuto</title>
> > > <style type="text/css">
> > >    <!--
> > >    .highlight { background-color: #A8D1E8; color=blue;}
> > >    -->
> > > </style>
> > > </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> > > name="queryaziende" method="post"
> action="/telemarketing/faces/query.jsp"
> > > enctype="application/x-www-form-urlencoded">
> > >    <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
> > >    <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> > > size="1">    <option value="PR">PR</option>    <option
> > > value="BS">BS</option>    <option value=""
> selected="selected"></option>
> > > <option value="TO">TO</option>    <option value="PZ">PZ</option>
> >  <option
> > > value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> > > <option value="MI">MI</option></select>
> > >    Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> > > <option value="x">Non interessato</option>    <option value="C">In
> > > trattativa</option>    <option value="A">Acquisto
> > > effettuato</option></select></p>
> > >
> > > <span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
> > > name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> > > id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> > > size="1"><option value="-1" selected="selected"></option>
>  <option
> > > value="1">gennaio</option>        <option value="2">febbraio</option>
> > > <option value="3">marzo</option>        <option
> value="4">aprile</option>
> > >    <option value="5">maggio</option>        <option
> > > value="6">giugno</option>        <option value="7">luglio</option>
> > > <option value="8">agosto</option>        <option
> > > value="9">settembre</option>        <option value="10">ottobre</option>
> > >    <option value="11">novembre</option>        <option
> > > value="12">dicembre</option></select><input
> > id="queryaziende:datainiz.year"
> > > name="queryaziende:datainiz.year" size="4" maxlength="4"
> /></span><script
> > > type="text/javascript"><!--
> > >
> > >
> > >    function oamSetHiddenInput(formname, name, value)
> > >    {
> > >        var form = document.forms[formname];
> > >         if(typeof form.elements[name]!='undefined' &&
> > > form.elements[name].nodeName=='INPUT')
> > >        {
> > >             form.elements[name].value=value;
> > >        }
> > >        else
> > >        {
> > >            var newInput = document.createElement('input');
> > >            newInput.setAttribute('type','hidden');
> > >            newInput.setAttribute('id',name);
> > >            newInput.setAttribute('name',name);
> > >            newInput.setAttribute('value',value);
> > >            form.appendChild(newInput);
> > >        }
> > >
> > >    }
> > >
> > >
> > >    function oamClearHiddenInput(formname, name, value)
> > >    {
> > >        var form = document.forms[formname];
> > >         var hInput = form.elements[name];
> > >        if(typeof hInput !='undefined')
> > >        {
> > >            form.removeChild(hInput);
> > >        }
> > >
> > >    }
> > >
> > >    function oamSubmitForm(formName, linkId, target, params)
> > >    {
> > >
> > >        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> > > '\$:').replace(/:/g,'_');
> > >        if(typeof window[clearFn] =='function')
> > >        {
> > >            window[clearFn](formName);
> > >        }
> > >
> > >        if(typeof window.getScrolling!='undefined')
> > >        {
> > >            oamSetHiddenInput(formName,'autoScroll',getScrolling());
> > >        }
> > >
> > >        var form = document.forms[formName];
> > >         var oldTarget = form.target;
> > >        if(target != null)
> > >        {
> > >
> > >            form.target=target;
> > >        }
> > >        if((typeof params!='undefined') && params != null)
> > >        {
> > >
> > >            for(var i=0, param; (param = params[i]); i++)
> > >            {
> > >                oamSetHiddenInput(formName,param[0], param[1]);
> > >            }
> > >
> > >        }
> > >
> > >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
> > >
> > >        if(form.onsubmit)
> > >        {
> > >            var result=form.onsubmit();
> > >            if((typeof result=='undefined')||result)
> > >            {
> > >                try
> > >                {
> > >                    form.submit();
> > >                }
> > >                catch(e){}
> > >            }
> > >
> > >        }
> > >        else
> > >        {
> > >            try
> > >            {
> > >                form.submit();
> > >            }
> > >            catch(e){}
> > >        }
> > >
> > >        form.target=oldTarget;
> > >        if((typeof params!='undefined') && params != null)
> > >        {
> > >
> > >            for(var i=0, param; (param = params[i]); i++)
> > >            {
> > >                oamClearHiddenInput(formName,param[0], param[1]);
> > >            }
> > >
> > >        }
> > >
> > >        oamClearHiddenInput(formName,formName
> +':'+'_idcl',linkId);return
> > > false;
> > >    }
> > >
> > >
> > > //--></script><input id="queryaziende:j_id_jsp_470444661_12"
> > > name="queryaziende:j_id_jsp_470444661_12" type="submit" value="Query"
> > > onclick="if(typeof
> > >
> > >
> >
> window.getScrolling!='undefined'){oamSetHiddenInput('queryaziende','autoScroll',getScrolling());}"
> > > />
> > > <input type="hidden" name="autoScroll" />
> > > <input type="hidden" name="queryaziende_SUBMIT" value="1" /><input
> > > type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState"
> > >
> > >
> >
> value="OJESdja1jaMfY2GNgOEtYZVCGw5Xw63sGplYVRh7SJZiPTBAy5S+j3OUQiungWQ8Cu/1ZM6ltj2fiJ9zyhgHww=="
> > > /></form>
> > > <script type="text/javascript"><!--
> > >
> > >    function getScrolling()
> > >    {
> > >        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
> > >        {
> > >            x = self.pageXOffset;
> > >            y = self.pageYOffset;
> > >        }
> > >         else if ((document.documentElement &&
> > > document.documentElement.scrollLeft)||(document.documentElement &&
> > > document.documentElement.scrollTop))
> > >        {
> > >            x = document.documentElement.scrollLeft;
> > >            y = document.documentElement.scrollTop;
> > >        }
> > >         else if (document.body)
> > >        {
> > >            x = document.body.scrollLeft;
> > >            y = document.body.scrollTop;
> > >        }
> > >        return x + "," + y;
> > >    }
> > >
> > > //--></script>
> > > </body></html>
> > >
> > > 2010/3/23 Fabio F. <fa...@gmail.com>
> > >
> > > > No, it is the login page. This page leads to the
> > > >
> > > > http://localhost:8080/telemarketing/faces/query.jsp
> > > >
> > > > whose code is (note that it is incomplete because it crashes):
> > > >
> > > > <html><head>
> > > > <link rel="stylesheet"
> > > >
> > >
> >
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/WH/theme.css"
> > > > type="text/css" />
> > > > <link rel="stylesheet"
> > > >
> > >
> >
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/DB/theme.css"
> > > > type="text/css" />
> > > >
> > > > <meta http-equiv="Content-Type" content="text/html;
> > charset=ISO-8859-1">
> > > > <title>Benvenuto</title>
> > > > <style type="text/css">
> > > >     <!--
> > > >     .highlight { background-color: #A8D1E8; color=blue;}
> > > >     -->
> > > > </style>
> > > > </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> > > > name="queryaziende" method="post"
> > action="/telemarketing/faces/query.jsp"
> > > > enctype="application/x-www-form-urlencoded">
> > > >     <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
> > > >     <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> > > > size="1">    <option value="PR">PR</option>    <option
> > > > value="BS">BS</option>    <option value=""
> > selected="selected"></option>
> > > > <option value="TO">TO</option>    <option value="PZ">PZ</option>
> > >  <option
> > > > value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> > > > <option value="MI">MI</option></select>
> > > >     Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> > > > <option value="x">Non interessato</option>    <option value="C">In
> > > > trattativa</option>    <option value="A">Acquisto
> > > > effettuato</option></select></p>
> > > >
> > > > <span id="queryaziende:datainiz"><input
> id="queryaziende:datainiz.day"
> > > > name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> > > > id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> > > > size="1"><option value="-1" selected="selected"></option>
> >  <option
> > > > value="1">gennaio</option>        <option value="2">febbraio</option>
> > > > <option value="3">marzo</option>        <option
> > value="4">aprile</option>
> > > >     <option value="5">maggio</option>        <option
> > > > value="6">giugno</option>        <option value="7">luglio</option>
> > > > <option value="8">agosto</option>        <option
> > > > value="9">settembre</option>        <option
> value="10">ottobre</option>
> > > >     <option value="11">novembre</option>        <option
> > > > value="12">dicembre</option></select><input
> > > id="queryaziende:datainiz.year"
> > > > name="queryaziende:datainiz.year" size="4" maxlength="4" />
> > > >
> > > >
> > > >
> > > >
> > > > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> > > >
> > > >> Thanks!
> > > >>
> > > >> Is this the page that is supposed to render the calendar with the
> > popup?
> > > >> Because I don't see the javascript needed for it here..
> > > >>
> > > >> Regards,
> > > >> Jakob
> > > >>
> > > >> 2010/3/23 Fabio F. <fa...@gmail.com>
> > > >>
> > > >> > Ah, ok.
> > > >> >
> > > >> > Here's login.jsp.
> > > >> >
> > > >> > <html>
> > > >> > <head>
> > > >> > <meta http-equiv="Content-Type" content="text/html;
> > > charset=ISO-8859-1">
> > > >> > <title>Login aziende</title>
> > > >> > </head>
> > > >> > <body>
> > > >> > <center><h1>Elenco aziende</h1></center>
> > > >> > <form id="login" name="login" method="post"
> > > >> > action="/telemarketing/faces/login.jsp"
> > > >> > enctype="application/x-www-form-urlencoded">
> > > >> >    <p>Entra</p>
> > > >> >    <p>Username: <input id="login:j_id_jsp_1876195572_2"
> > > >> > name="login:j_id_jsp_1876195572_2" type="text" value="fabio"
> /></p>
> > > >> >    <p>Password: <input type="password"
> > > >> name="login:j_id_jsp_1876195572_3"
> > > >> > /></p>
> > > >> >    <script type="text/javascript"><!--
> > > >> >
> > > >> >
> > > >> >    function oamSetHiddenInput(formname, name, value)
> > > >> >    {
> > > >> >        var form = document.forms[formname];
> > > >> >        if (typeof form == 'undefined')
> > > >> >        {
> > > >> >            form = document.getElementById(formName);
> > > >> >        }
> > > >> >
> > > >> >        if(typeof form.elements[name]!='undefined' &&
> > > >> > (form.elements[name].nodeName=='INPUT' ||
> > > >> > form.elements[name].nodeName=='input'))
> > > >> >        {
> > > >> >            form.elements[name].value=value;
> > > >> >        }
> > > >> >        else
> > > >> >        {
> > > >> >            var newInput = document.createElement('input');
> > > >> >            newInput.setAttribute('type','hidden');
> > > >> >            newInput.setAttribute('id',name);
> > > >> >            newInput.setAttribute('name',name);
> > > >> >            newInput.setAttribute('value',value);
> > > >> >            form.appendChild(newInput);
> > > >> >        }
> > > >> >
> > > >> >    }
> > > >> >
> > > >> >
> > > >> >    function oamClearHiddenInput(formname, name, value)
> > > >> >    {
> > > >> >        var form = document.forms[formname];
> > > >> >        if (typeof form == 'undefined')
> > > >> >        {
> > > >> >            form = document.getElementById(formName);
> > > >> >        }
> > > >> >
> > > >> >        var hInput = form.elements[name];
> > > >> >        if(typeof hInput !='undefined')
> > > >> >        {
> > > >> >            form.removeChild(hInput);
> > > >> >        }
> > > >> >
> > > >> >    }
> > > >> >
> > > >> >    function oamSubmitForm(formName, linkId, target, params)
> > > >> >    {
> > > >> >
> > > >> >        var clearFn =
> 'clearFormHiddenParams_'+formName.replace(/-/g,
> > > >> > '\$:').replace(/:/g,'_');
> > > >> >        if(typeof window[clearFn] =='function')
> > > >> >        {
> > > >> >            window[clearFn](formName);
> > > >> >        }
> > > >> >
> > > >> >        if(typeof window.getScrolling!='undefined')
> > > >> >        {
> > > >> >
>  oamSetHiddenInput(formName,'autoScroll',getScrolling());
> > > >> >        }
> > > >> >
> > > >> >        var form = document.forms[formName];
> > > >> >        if (typeof form == 'undefined')
> > > >> >        {
> > > >> >            form = document.getElementById(formName);
> > > >> >        }
> > > >> >
> > > >> >        var oldTarget = form.target;
> > > >> >        if(target != null)
> > > >> >        {
> > > >> >
> > > >> >            form.target=target;
> > > >> >        }
> > > >> >        if((typeof params!='undefined') && params != null)
> > > >> >        {
> > > >> >
> > > >> >            for(var i=0, param; (param = params[i]); i++)
> > > >> >            {
> > > >> >                oamSetHiddenInput(formName,param[0], param[1]);
> > > >> >            }
> > > >> >
> > > >> >        }
> > > >> >
> > > >> >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
> > > >> >
> > > >> >        if(form.onsubmit)
> > > >> >        {
> > > >> >            var result=form.onsubmit();
> > > >> >            if((typeof result=='undefined')||result)
> > > >> >            {
> > > >> >                try
> > > >> >                {
> > > >> >                    form.submit();
> > > >> >                }
> > > >> >                catch(e){}
> > > >> >            }
> > > >> >
> > > >> >        }
> > > >> >        else
> > > >> >        {
> > > >> >            try
> > > >> >            {
> > > >> >                form.submit();
> > > >> >            }
> > > >> >            catch(e){}
> > > >> >        }
> > > >> >
> > > >> >        form.target=oldTarget;
> > > >> >        if((typeof params!='undefined') && params != null)
> > > >> >        {
> > > >> >
> > > >> >            for(var i=0, param; (param = params[i]); i++)
> > > >> >            {
> > > >> >                oamClearHiddenInput(formName,param[0], param[1]);
> > > >> >            }
> > > >> >
> > > >> >        }
> > > >> >
> > > >> >        oamClearHiddenInput(formName,formName
> > > +':'+'_idcl',linkId);return
> > > >> > false;
> > > >> >    }
> > > >> >
> > > >> >
> > > >> > //--></script><input id="login:j_id_jsp_1876195572_4"
> > > >> > name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
> > > >> > onclick="if(typeof
> > > >> >
> > > >> >
> > > >>
> > >
> >
> window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
> > > >> > />
> > > >> > <input type="hidden" name="autoScroll" />
> > > >> > <input type="hidden" name="login_SUBMIT" value="1" /><input
> > > >> type="hidden"
> > > >> > name="javax.faces.ViewState" id="javax.faces.ViewState"
> > > >> >
> > > >> >
> > > >>
> > >
> >
> value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
> > > >> > /></form>
> > > >> >
> > > >> > <script type="text/javascript"><!--
> > > >> >
> > > >> >    function getScrolling()
> > > >> >    {
> > > >> >        var x = 0; var y = 0;if (self.pageXOffset ||
> > self.pageYOffset)
> > > >> >        {
> > > >> >            x = self.pageXOffset;
> > > >> >            y = self.pageYOffset;
> > > >> >        }
> > > >> >         else if ((document.documentElement &&
> > > >> > document.documentElement.scrollLeft)||(document.documentElement &&
> > > >> > document.documentElement.scrollTop))
> > > >> >        {
> > > >> >            x = document.documentElement.scrollLeft;
> > > >> >            y = document.documentElement.scrollTop;
> > > >> >        }
> > > >> >         else if (document.body)
> > > >> >        {
> > > >> >            x = document.body.scrollLeft;
> > > >> >            y = document.body.scrollTop;
> > > >> >        }
> > > >> >        return x + "," + y;
> > > >> >    }
> > > >> >
> > > >> > //--></script>
> > > >> > </body>
> > > >> > </html>
> > > >> >
> > > >> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> > > >> >
> > > >> > > OK thanks for the URL.
> > > >> > >
> > > >> > > No I don't mean from the JSP, but from the generated HTML in the
> > > >> browser.
> > > >> > > Just open your login.jsp in the browser and view the HTML
> source.
> > > >> > >
> > > >> > > Regards,
> > > >> > > Jakob
> > > >> > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
If I change it to that url-pattern, the page doesn't render at all and the
html I obtain is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>

In case of popupCalendar=true or popupCalendar=false ...

Fabio Ferrari

2010/3/23 Jakob Korherr <ja...@gmail.com>

> Great - Thanks!
>
> The HTML tells me that your filter mapping for the extension filter is
> wrong. Please change it to
>
> <filter-mapping>
> <filter-name>MyFacesExtensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> This should make it work!
>
> Regards,
> Jakob
>
>
> 2010/3/23 Fabio F. <fa...@gmail.com>
>
> > And this is the page (query.jsp) for popupCalendar=false
> >
> > <html><head>
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Benvenuto</title>
> > <style type="text/css">
> >    <!--
> >    .highlight { background-color: #A8D1E8; color=blue;}
> >    -->
> > </style>
> > </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> > name="queryaziende" method="post" action="/telemarketing/faces/query.jsp"
> > enctype="application/x-www-form-urlencoded">
> >    <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
> >    <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> > size="1">    <option value="PR">PR</option>    <option
> > value="BS">BS</option>    <option value="" selected="selected"></option>
> > <option value="TO">TO</option>    <option value="PZ">PZ</option>
>  <option
> > value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> > <option value="MI">MI</option></select>
> >    Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> > <option value="x">Non interessato</option>    <option value="C">In
> > trattativa</option>    <option value="A">Acquisto
> > effettuato</option></select></p>
> >
> > <span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
> > name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> > id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> > size="1"><option value="-1" selected="selected"></option>        <option
> > value="1">gennaio</option>        <option value="2">febbraio</option>
> > <option value="3">marzo</option>        <option value="4">aprile</option>
> >    <option value="5">maggio</option>        <option
> > value="6">giugno</option>        <option value="7">luglio</option>
> > <option value="8">agosto</option>        <option
> > value="9">settembre</option>        <option value="10">ottobre</option>
> >    <option value="11">novembre</option>        <option
> > value="12">dicembre</option></select><input
> id="queryaziende:datainiz.year"
> > name="queryaziende:datainiz.year" size="4" maxlength="4" /></span><script
> > type="text/javascript"><!--
> >
> >
> >    function oamSetHiddenInput(formname, name, value)
> >    {
> >        var form = document.forms[formname];
> >         if(typeof form.elements[name]!='undefined' &&
> > form.elements[name].nodeName=='INPUT')
> >        {
> >             form.elements[name].value=value;
> >        }
> >        else
> >        {
> >            var newInput = document.createElement('input');
> >            newInput.setAttribute('type','hidden');
> >            newInput.setAttribute('id',name);
> >            newInput.setAttribute('name',name);
> >            newInput.setAttribute('value',value);
> >            form.appendChild(newInput);
> >        }
> >
> >    }
> >
> >
> >    function oamClearHiddenInput(formname, name, value)
> >    {
> >        var form = document.forms[formname];
> >         var hInput = form.elements[name];
> >        if(typeof hInput !='undefined')
> >        {
> >            form.removeChild(hInput);
> >        }
> >
> >    }
> >
> >    function oamSubmitForm(formName, linkId, target, params)
> >    {
> >
> >        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> > '\$:').replace(/:/g,'_');
> >        if(typeof window[clearFn] =='function')
> >        {
> >            window[clearFn](formName);
> >        }
> >
> >        if(typeof window.getScrolling!='undefined')
> >        {
> >            oamSetHiddenInput(formName,'autoScroll',getScrolling());
> >        }
> >
> >        var form = document.forms[formName];
> >         var oldTarget = form.target;
> >        if(target != null)
> >        {
> >
> >            form.target=target;
> >        }
> >        if((typeof params!='undefined') && params != null)
> >        {
> >
> >            for(var i=0, param; (param = params[i]); i++)
> >            {
> >                oamSetHiddenInput(formName,param[0], param[1]);
> >            }
> >
> >        }
> >
> >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
> >
> >        if(form.onsubmit)
> >        {
> >            var result=form.onsubmit();
> >            if((typeof result=='undefined')||result)
> >            {
> >                try
> >                {
> >                    form.submit();
> >                }
> >                catch(e){}
> >            }
> >
> >        }
> >        else
> >        {
> >            try
> >            {
> >                form.submit();
> >            }
> >            catch(e){}
> >        }
> >
> >        form.target=oldTarget;
> >        if((typeof params!='undefined') && params != null)
> >        {
> >
> >            for(var i=0, param; (param = params[i]); i++)
> >            {
> >                oamClearHiddenInput(formName,param[0], param[1]);
> >            }
> >
> >        }
> >
> >        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
> > false;
> >    }
> >
> >
> > //--></script><input id="queryaziende:j_id_jsp_470444661_12"
> > name="queryaziende:j_id_jsp_470444661_12" type="submit" value="Query"
> > onclick="if(typeof
> >
> >
> window.getScrolling!='undefined'){oamSetHiddenInput('queryaziende','autoScroll',getScrolling());}"
> > />
> > <input type="hidden" name="autoScroll" />
> > <input type="hidden" name="queryaziende_SUBMIT" value="1" /><input
> > type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState"
> >
> >
> value="OJESdja1jaMfY2GNgOEtYZVCGw5Xw63sGplYVRh7SJZiPTBAy5S+j3OUQiungWQ8Cu/1ZM6ltj2fiJ9zyhgHww=="
> > /></form>
> > <script type="text/javascript"><!--
> >
> >    function getScrolling()
> >    {
> >        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
> >        {
> >            x = self.pageXOffset;
> >            y = self.pageYOffset;
> >        }
> >         else if ((document.documentElement &&
> > document.documentElement.scrollLeft)||(document.documentElement &&
> > document.documentElement.scrollTop))
> >        {
> >            x = document.documentElement.scrollLeft;
> >            y = document.documentElement.scrollTop;
> >        }
> >         else if (document.body)
> >        {
> >            x = document.body.scrollLeft;
> >            y = document.body.scrollTop;
> >        }
> >        return x + "," + y;
> >    }
> >
> > //--></script>
> > </body></html>
> >
> > 2010/3/23 Fabio F. <fa...@gmail.com>
> >
> > > No, it is the login page. This page leads to the
> > >
> > > http://localhost:8080/telemarketing/faces/query.jsp
> > >
> > > whose code is (note that it is incomplete because it crashes):
> > >
> > > <html><head>
> > > <link rel="stylesheet"
> > >
> >
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/WH/theme.css"
> > > type="text/css" />
> > > <link rel="stylesheet"
> > >
> >
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/DB/theme.css"
> > > type="text/css" />
> > >
> > > <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> > > <title>Benvenuto</title>
> > > <style type="text/css">
> > >     <!--
> > >     .highlight { background-color: #A8D1E8; color=blue;}
> > >     -->
> > > </style>
> > > </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> > > name="queryaziende" method="post"
> action="/telemarketing/faces/query.jsp"
> > > enctype="application/x-www-form-urlencoded">
> > >     <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
> > >     <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> > > size="1">    <option value="PR">PR</option>    <option
> > > value="BS">BS</option>    <option value=""
> selected="selected"></option>
> > > <option value="TO">TO</option>    <option value="PZ">PZ</option>
> >  <option
> > > value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> > > <option value="MI">MI</option></select>
> > >     Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> > > <option value="x">Non interessato</option>    <option value="C">In
> > > trattativa</option>    <option value="A">Acquisto
> > > effettuato</option></select></p>
> > >
> > > <span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
> > > name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> > > id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> > > size="1"><option value="-1" selected="selected"></option>
>  <option
> > > value="1">gennaio</option>        <option value="2">febbraio</option>
> > > <option value="3">marzo</option>        <option
> value="4">aprile</option>
> > >     <option value="5">maggio</option>        <option
> > > value="6">giugno</option>        <option value="7">luglio</option>
> > > <option value="8">agosto</option>        <option
> > > value="9">settembre</option>        <option value="10">ottobre</option>
> > >     <option value="11">novembre</option>        <option
> > > value="12">dicembre</option></select><input
> > id="queryaziende:datainiz.year"
> > > name="queryaziende:datainiz.year" size="4" maxlength="4" />
> > >
> > >
> > >
> > >
> > > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> > >
> > >> Thanks!
> > >>
> > >> Is this the page that is supposed to render the calendar with the
> popup?
> > >> Because I don't see the javascript needed for it here..
> > >>
> > >> Regards,
> > >> Jakob
> > >>
> > >> 2010/3/23 Fabio F. <fa...@gmail.com>
> > >>
> > >> > Ah, ok.
> > >> >
> > >> > Here's login.jsp.
> > >> >
> > >> > <html>
> > >> > <head>
> > >> > <meta http-equiv="Content-Type" content="text/html;
> > charset=ISO-8859-1">
> > >> > <title>Login aziende</title>
> > >> > </head>
> > >> > <body>
> > >> > <center><h1>Elenco aziende</h1></center>
> > >> > <form id="login" name="login" method="post"
> > >> > action="/telemarketing/faces/login.jsp"
> > >> > enctype="application/x-www-form-urlencoded">
> > >> >    <p>Entra</p>
> > >> >    <p>Username: <input id="login:j_id_jsp_1876195572_2"
> > >> > name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
> > >> >    <p>Password: <input type="password"
> > >> name="login:j_id_jsp_1876195572_3"
> > >> > /></p>
> > >> >    <script type="text/javascript"><!--
> > >> >
> > >> >
> > >> >    function oamSetHiddenInput(formname, name, value)
> > >> >    {
> > >> >        var form = document.forms[formname];
> > >> >        if (typeof form == 'undefined')
> > >> >        {
> > >> >            form = document.getElementById(formName);
> > >> >        }
> > >> >
> > >> >        if(typeof form.elements[name]!='undefined' &&
> > >> > (form.elements[name].nodeName=='INPUT' ||
> > >> > form.elements[name].nodeName=='input'))
> > >> >        {
> > >> >            form.elements[name].value=value;
> > >> >        }
> > >> >        else
> > >> >        {
> > >> >            var newInput = document.createElement('input');
> > >> >            newInput.setAttribute('type','hidden');
> > >> >            newInput.setAttribute('id',name);
> > >> >            newInput.setAttribute('name',name);
> > >> >            newInput.setAttribute('value',value);
> > >> >            form.appendChild(newInput);
> > >> >        }
> > >> >
> > >> >    }
> > >> >
> > >> >
> > >> >    function oamClearHiddenInput(formname, name, value)
> > >> >    {
> > >> >        var form = document.forms[formname];
> > >> >        if (typeof form == 'undefined')
> > >> >        {
> > >> >            form = document.getElementById(formName);
> > >> >        }
> > >> >
> > >> >        var hInput = form.elements[name];
> > >> >        if(typeof hInput !='undefined')
> > >> >        {
> > >> >            form.removeChild(hInput);
> > >> >        }
> > >> >
> > >> >    }
> > >> >
> > >> >    function oamSubmitForm(formName, linkId, target, params)
> > >> >    {
> > >> >
> > >> >        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> > >> > '\$:').replace(/:/g,'_');
> > >> >        if(typeof window[clearFn] =='function')
> > >> >        {
> > >> >            window[clearFn](formName);
> > >> >        }
> > >> >
> > >> >        if(typeof window.getScrolling!='undefined')
> > >> >        {
> > >> >            oamSetHiddenInput(formName,'autoScroll',getScrolling());
> > >> >        }
> > >> >
> > >> >        var form = document.forms[formName];
> > >> >        if (typeof form == 'undefined')
> > >> >        {
> > >> >            form = document.getElementById(formName);
> > >> >        }
> > >> >
> > >> >        var oldTarget = form.target;
> > >> >        if(target != null)
> > >> >        {
> > >> >
> > >> >            form.target=target;
> > >> >        }
> > >> >        if((typeof params!='undefined') && params != null)
> > >> >        {
> > >> >
> > >> >            for(var i=0, param; (param = params[i]); i++)
> > >> >            {
> > >> >                oamSetHiddenInput(formName,param[0], param[1]);
> > >> >            }
> > >> >
> > >> >        }
> > >> >
> > >> >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
> > >> >
> > >> >        if(form.onsubmit)
> > >> >        {
> > >> >            var result=form.onsubmit();
> > >> >            if((typeof result=='undefined')||result)
> > >> >            {
> > >> >                try
> > >> >                {
> > >> >                    form.submit();
> > >> >                }
> > >> >                catch(e){}
> > >> >            }
> > >> >
> > >> >        }
> > >> >        else
> > >> >        {
> > >> >            try
> > >> >            {
> > >> >                form.submit();
> > >> >            }
> > >> >            catch(e){}
> > >> >        }
> > >> >
> > >> >        form.target=oldTarget;
> > >> >        if((typeof params!='undefined') && params != null)
> > >> >        {
> > >> >
> > >> >            for(var i=0, param; (param = params[i]); i++)
> > >> >            {
> > >> >                oamClearHiddenInput(formName,param[0], param[1]);
> > >> >            }
> > >> >
> > >> >        }
> > >> >
> > >> >        oamClearHiddenInput(formName,formName
> > +':'+'_idcl',linkId);return
> > >> > false;
> > >> >    }
> > >> >
> > >> >
> > >> > //--></script><input id="login:j_id_jsp_1876195572_4"
> > >> > name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
> > >> > onclick="if(typeof
> > >> >
> > >> >
> > >>
> >
> window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
> > >> > />
> > >> > <input type="hidden" name="autoScroll" />
> > >> > <input type="hidden" name="login_SUBMIT" value="1" /><input
> > >> type="hidden"
> > >> > name="javax.faces.ViewState" id="javax.faces.ViewState"
> > >> >
> > >> >
> > >>
> >
> value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
> > >> > /></form>
> > >> >
> > >> > <script type="text/javascript"><!--
> > >> >
> > >> >    function getScrolling()
> > >> >    {
> > >> >        var x = 0; var y = 0;if (self.pageXOffset ||
> self.pageYOffset)
> > >> >        {
> > >> >            x = self.pageXOffset;
> > >> >            y = self.pageYOffset;
> > >> >        }
> > >> >         else if ((document.documentElement &&
> > >> > document.documentElement.scrollLeft)||(document.documentElement &&
> > >> > document.documentElement.scrollTop))
> > >> >        {
> > >> >            x = document.documentElement.scrollLeft;
> > >> >            y = document.documentElement.scrollTop;
> > >> >        }
> > >> >         else if (document.body)
> > >> >        {
> > >> >            x = document.body.scrollLeft;
> > >> >            y = document.body.scrollTop;
> > >> >        }
> > >> >        return x + "," + y;
> > >> >    }
> > >> >
> > >> > //--></script>
> > >> > </body>
> > >> > </html>
> > >> >
> > >> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> > >> >
> > >> > > OK thanks for the URL.
> > >> > >
> > >> > > No I don't mean from the JSP, but from the generated HTML in the
> > >> browser.
> > >> > > Just open your login.jsp in the browser and view the HTML source.
> > >> > >
> > >> > > Regards,
> > >> > > Jakob
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
Great - Thanks!

The HTML tells me that your filter mapping for the extension filter is
wrong. Please change it to

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

This should make it work!

Regards,
Jakob


2010/3/23 Fabio F. <fa...@gmail.com>

> And this is the page (query.jsp) for popupCalendar=false
>
> <html><head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Benvenuto</title>
> <style type="text/css">
>    <!--
>    .highlight { background-color: #A8D1E8; color=blue;}
>    -->
> </style>
> </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> name="queryaziende" method="post" action="/telemarketing/faces/query.jsp"
> enctype="application/x-www-form-urlencoded">
>    <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
>    <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> size="1">    <option value="PR">PR</option>    <option
> value="BS">BS</option>    <option value="" selected="selected"></option>
> <option value="TO">TO</option>    <option value="PZ">PZ</option>    <option
> value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> <option value="MI">MI</option></select>
>    Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> <option value="x">Non interessato</option>    <option value="C">In
> trattativa</option>    <option value="A">Acquisto
> effettuato</option></select></p>
>
> <span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
> name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> size="1"><option value="-1" selected="selected"></option>        <option
> value="1">gennaio</option>        <option value="2">febbraio</option>
> <option value="3">marzo</option>        <option value="4">aprile</option>
>    <option value="5">maggio</option>        <option
> value="6">giugno</option>        <option value="7">luglio</option>
> <option value="8">agosto</option>        <option
> value="9">settembre</option>        <option value="10">ottobre</option>
>    <option value="11">novembre</option>        <option
> value="12">dicembre</option></select><input id="queryaziende:datainiz.year"
> name="queryaziende:datainiz.year" size="4" maxlength="4" /></span><script
> type="text/javascript"><!--
>
>
>    function oamSetHiddenInput(formname, name, value)
>    {
>        var form = document.forms[formname];
>         if(typeof form.elements[name]!='undefined' &&
> form.elements[name].nodeName=='INPUT')
>        {
>             form.elements[name].value=value;
>        }
>        else
>        {
>            var newInput = document.createElement('input');
>            newInput.setAttribute('type','hidden');
>            newInput.setAttribute('id',name);
>            newInput.setAttribute('name',name);
>            newInput.setAttribute('value',value);
>            form.appendChild(newInput);
>        }
>
>    }
>
>
>    function oamClearHiddenInput(formname, name, value)
>    {
>        var form = document.forms[formname];
>         var hInput = form.elements[name];
>        if(typeof hInput !='undefined')
>        {
>            form.removeChild(hInput);
>        }
>
>    }
>
>    function oamSubmitForm(formName, linkId, target, params)
>    {
>
>        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> '\$:').replace(/:/g,'_');
>        if(typeof window[clearFn] =='function')
>        {
>            window[clearFn](formName);
>        }
>
>        if(typeof window.getScrolling!='undefined')
>        {
>            oamSetHiddenInput(formName,'autoScroll',getScrolling());
>        }
>
>        var form = document.forms[formName];
>         var oldTarget = form.target;
>        if(target != null)
>        {
>
>            form.target=target;
>        }
>        if((typeof params!='undefined') && params != null)
>        {
>
>            for(var i=0, param; (param = params[i]); i++)
>            {
>                oamSetHiddenInput(formName,param[0], param[1]);
>            }
>
>        }
>
>        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
>
>        if(form.onsubmit)
>        {
>            var result=form.onsubmit();
>            if((typeof result=='undefined')||result)
>            {
>                try
>                {
>                    form.submit();
>                }
>                catch(e){}
>            }
>
>        }
>        else
>        {
>            try
>            {
>                form.submit();
>            }
>            catch(e){}
>        }
>
>        form.target=oldTarget;
>        if((typeof params!='undefined') && params != null)
>        {
>
>            for(var i=0, param; (param = params[i]); i++)
>            {
>                oamClearHiddenInput(formName,param[0], param[1]);
>            }
>
>        }
>
>        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
> false;
>    }
>
>
> //--></script><input id="queryaziende:j_id_jsp_470444661_12"
> name="queryaziende:j_id_jsp_470444661_12" type="submit" value="Query"
> onclick="if(typeof
>
> window.getScrolling!='undefined'){oamSetHiddenInput('queryaziende','autoScroll',getScrolling());}"
> />
> <input type="hidden" name="autoScroll" />
> <input type="hidden" name="queryaziende_SUBMIT" value="1" /><input
> type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState"
>
> value="OJESdja1jaMfY2GNgOEtYZVCGw5Xw63sGplYVRh7SJZiPTBAy5S+j3OUQiungWQ8Cu/1ZM6ltj2fiJ9zyhgHww=="
> /></form>
> <script type="text/javascript"><!--
>
>    function getScrolling()
>    {
>        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
>        {
>            x = self.pageXOffset;
>            y = self.pageYOffset;
>        }
>         else if ((document.documentElement &&
> document.documentElement.scrollLeft)||(document.documentElement &&
> document.documentElement.scrollTop))
>        {
>            x = document.documentElement.scrollLeft;
>            y = document.documentElement.scrollTop;
>        }
>         else if (document.body)
>        {
>            x = document.body.scrollLeft;
>            y = document.body.scrollTop;
>        }
>        return x + "," + y;
>    }
>
> //--></script>
> </body></html>
>
> 2010/3/23 Fabio F. <fa...@gmail.com>
>
> > No, it is the login page. This page leads to the
> >
> > http://localhost:8080/telemarketing/faces/query.jsp
> >
> > whose code is (note that it is incomplete because it crashes):
> >
> > <html><head>
> > <link rel="stylesheet"
> >
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/WH/theme.css"
> > type="text/css" />
> > <link rel="stylesheet"
> >
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/DB/theme.css"
> > type="text/css" />
> >
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Benvenuto</title>
> > <style type="text/css">
> >     <!--
> >     .highlight { background-color: #A8D1E8; color=blue;}
> >     -->
> > </style>
> > </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> > name="queryaziende" method="post" action="/telemarketing/faces/query.jsp"
> > enctype="application/x-www-form-urlencoded">
> >     <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
> >     <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> > size="1">    <option value="PR">PR</option>    <option
> > value="BS">BS</option>    <option value="" selected="selected"></option>
> > <option value="TO">TO</option>    <option value="PZ">PZ</option>
>  <option
> > value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> > <option value="MI">MI</option></select>
> >     Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> > <option value="x">Non interessato</option>    <option value="C">In
> > trattativa</option>    <option value="A">Acquisto
> > effettuato</option></select></p>
> >
> > <span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
> > name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> > id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> > size="1"><option value="-1" selected="selected"></option>        <option
> > value="1">gennaio</option>        <option value="2">febbraio</option>
> > <option value="3">marzo</option>        <option value="4">aprile</option>
> >     <option value="5">maggio</option>        <option
> > value="6">giugno</option>        <option value="7">luglio</option>
> > <option value="8">agosto</option>        <option
> > value="9">settembre</option>        <option value="10">ottobre</option>
> >     <option value="11">novembre</option>        <option
> > value="12">dicembre</option></select><input
> id="queryaziende:datainiz.year"
> > name="queryaziende:datainiz.year" size="4" maxlength="4" />
> >
> >
> >
> >
> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> >
> >> Thanks!
> >>
> >> Is this the page that is supposed to render the calendar with the popup?
> >> Because I don't see the javascript needed for it here..
> >>
> >> Regards,
> >> Jakob
> >>
> >> 2010/3/23 Fabio F. <fa...@gmail.com>
> >>
> >> > Ah, ok.
> >> >
> >> > Here's login.jsp.
> >> >
> >> > <html>
> >> > <head>
> >> > <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> >> > <title>Login aziende</title>
> >> > </head>
> >> > <body>
> >> > <center><h1>Elenco aziende</h1></center>
> >> > <form id="login" name="login" method="post"
> >> > action="/telemarketing/faces/login.jsp"
> >> > enctype="application/x-www-form-urlencoded">
> >> >    <p>Entra</p>
> >> >    <p>Username: <input id="login:j_id_jsp_1876195572_2"
> >> > name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
> >> >    <p>Password: <input type="password"
> >> name="login:j_id_jsp_1876195572_3"
> >> > /></p>
> >> >    <script type="text/javascript"><!--
> >> >
> >> >
> >> >    function oamSetHiddenInput(formname, name, value)
> >> >    {
> >> >        var form = document.forms[formname];
> >> >        if (typeof form == 'undefined')
> >> >        {
> >> >            form = document.getElementById(formName);
> >> >        }
> >> >
> >> >        if(typeof form.elements[name]!='undefined' &&
> >> > (form.elements[name].nodeName=='INPUT' ||
> >> > form.elements[name].nodeName=='input'))
> >> >        {
> >> >            form.elements[name].value=value;
> >> >        }
> >> >        else
> >> >        {
> >> >            var newInput = document.createElement('input');
> >> >            newInput.setAttribute('type','hidden');
> >> >            newInput.setAttribute('id',name);
> >> >            newInput.setAttribute('name',name);
> >> >            newInput.setAttribute('value',value);
> >> >            form.appendChild(newInput);
> >> >        }
> >> >
> >> >    }
> >> >
> >> >
> >> >    function oamClearHiddenInput(formname, name, value)
> >> >    {
> >> >        var form = document.forms[formname];
> >> >        if (typeof form == 'undefined')
> >> >        {
> >> >            form = document.getElementById(formName);
> >> >        }
> >> >
> >> >        var hInput = form.elements[name];
> >> >        if(typeof hInput !='undefined')
> >> >        {
> >> >            form.removeChild(hInput);
> >> >        }
> >> >
> >> >    }
> >> >
> >> >    function oamSubmitForm(formName, linkId, target, params)
> >> >    {
> >> >
> >> >        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> >> > '\$:').replace(/:/g,'_');
> >> >        if(typeof window[clearFn] =='function')
> >> >        {
> >> >            window[clearFn](formName);
> >> >        }
> >> >
> >> >        if(typeof window.getScrolling!='undefined')
> >> >        {
> >> >            oamSetHiddenInput(formName,'autoScroll',getScrolling());
> >> >        }
> >> >
> >> >        var form = document.forms[formName];
> >> >        if (typeof form == 'undefined')
> >> >        {
> >> >            form = document.getElementById(formName);
> >> >        }
> >> >
> >> >        var oldTarget = form.target;
> >> >        if(target != null)
> >> >        {
> >> >
> >> >            form.target=target;
> >> >        }
> >> >        if((typeof params!='undefined') && params != null)
> >> >        {
> >> >
> >> >            for(var i=0, param; (param = params[i]); i++)
> >> >            {
> >> >                oamSetHiddenInput(formName,param[0], param[1]);
> >> >            }
> >> >
> >> >        }
> >> >
> >> >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
> >> >
> >> >        if(form.onsubmit)
> >> >        {
> >> >            var result=form.onsubmit();
> >> >            if((typeof result=='undefined')||result)
> >> >            {
> >> >                try
> >> >                {
> >> >                    form.submit();
> >> >                }
> >> >                catch(e){}
> >> >            }
> >> >
> >> >        }
> >> >        else
> >> >        {
> >> >            try
> >> >            {
> >> >                form.submit();
> >> >            }
> >> >            catch(e){}
> >> >        }
> >> >
> >> >        form.target=oldTarget;
> >> >        if((typeof params!='undefined') && params != null)
> >> >        {
> >> >
> >> >            for(var i=0, param; (param = params[i]); i++)
> >> >            {
> >> >                oamClearHiddenInput(formName,param[0], param[1]);
> >> >            }
> >> >
> >> >        }
> >> >
> >> >        oamClearHiddenInput(formName,formName
> +':'+'_idcl',linkId);return
> >> > false;
> >> >    }
> >> >
> >> >
> >> > //--></script><input id="login:j_id_jsp_1876195572_4"
> >> > name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
> >> > onclick="if(typeof
> >> >
> >> >
> >>
> window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
> >> > />
> >> > <input type="hidden" name="autoScroll" />
> >> > <input type="hidden" name="login_SUBMIT" value="1" /><input
> >> type="hidden"
> >> > name="javax.faces.ViewState" id="javax.faces.ViewState"
> >> >
> >> >
> >>
> value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
> >> > /></form>
> >> >
> >> > <script type="text/javascript"><!--
> >> >
> >> >    function getScrolling()
> >> >    {
> >> >        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
> >> >        {
> >> >            x = self.pageXOffset;
> >> >            y = self.pageYOffset;
> >> >        }
> >> >         else if ((document.documentElement &&
> >> > document.documentElement.scrollLeft)||(document.documentElement &&
> >> > document.documentElement.scrollTop))
> >> >        {
> >> >            x = document.documentElement.scrollLeft;
> >> >            y = document.documentElement.scrollTop;
> >> >        }
> >> >         else if (document.body)
> >> >        {
> >> >            x = document.body.scrollLeft;
> >> >            y = document.body.scrollTop;
> >> >        }
> >> >        return x + "," + y;
> >> >    }
> >> >
> >> > //--></script>
> >> > </body>
> >> > </html>
> >> >
> >> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> >> >
> >> > > OK thanks for the URL.
> >> > >
> >> > > No I don't mean from the JSP, but from the generated HTML in the
> >> browser.
> >> > > Just open your login.jsp in the browser and view the HTML source.
> >> > >
> >> > > Regards,
> >> > > Jakob
> >> > >
> >> > >
> >> >
> >>
> >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
And this is the page (query.jsp) for popupCalendar=false

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Benvenuto</title>
<style type="text/css">
    <!--
    .highlight { background-color: #A8D1E8; color=blue;}
    -->
</style>
</head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
name="queryaziende" method="post" action="/telemarketing/faces/query.jsp"
enctype="application/x-www-form-urlencoded">
    <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
    <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
size="1">    <option value="PR">PR</option>    <option
value="BS">BS</option>    <option value="" selected="selected"></option>
<option value="TO">TO</option>    <option value="PZ">PZ</option>    <option
value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
<option value="MI">MI</option></select>
    Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
<option value="x">Non interessato</option>    <option value="C">In
trattativa</option>    <option value="A">Acquisto
effettuato</option></select></p>

<span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
size="1"><option value="-1" selected="selected"></option>        <option
value="1">gennaio</option>        <option value="2">febbraio</option>
<option value="3">marzo</option>        <option value="4">aprile</option>
    <option value="5">maggio</option>        <option
value="6">giugno</option>        <option value="7">luglio</option>
<option value="8">agosto</option>        <option
value="9">settembre</option>        <option value="10">ottobre</option>
    <option value="11">novembre</option>        <option
value="12">dicembre</option></select><input id="queryaziende:datainiz.year"
name="queryaziende:datainiz.year" size="4" maxlength="4" /></span><script
type="text/javascript"><!--


    function oamSetHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if(typeof form.elements[name]!='undefined' &&
form.elements[name].nodeName=='INPUT')
        {
            form.elements[name].value=value;
        }
        else
        {
            var newInput = document.createElement('input');
            newInput.setAttribute('type','hidden');
            newInput.setAttribute('id',name);
            newInput.setAttribute('name',name);
            newInput.setAttribute('value',value);
            form.appendChild(newInput);
        }

    }


    function oamClearHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        var hInput = form.elements[name];
        if(typeof hInput !='undefined')
        {
            form.removeChild(hInput);
        }

    }

    function oamSubmitForm(formName, linkId, target, params)
    {

        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
'\$:').replace(/:/g,'_');
        if(typeof window[clearFn] =='function')
        {
            window[clearFn](formName);
        }

        if(typeof window.getScrolling!='undefined')
        {
            oamSetHiddenInput(formName,'autoScroll',getScrolling());
        }

        var form = document.forms[formName];
        var oldTarget = form.target;
        if(target != null)
        {

            form.target=target;
        }
        if((typeof params!='undefined') && params != null)
        {

            for(var i=0, param; (param = params[i]); i++)
            {
                oamSetHiddenInput(formName,param[0], param[1]);
            }

        }

        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);

        if(form.onsubmit)
        {
            var result=form.onsubmit();
            if((typeof result=='undefined')||result)
            {
                try
                {
                    form.submit();
                }
                catch(e){}
            }

        }
        else
        {
            try
            {
                form.submit();
            }
            catch(e){}
        }

        form.target=oldTarget;
        if((typeof params!='undefined') && params != null)
        {

            for(var i=0, param; (param = params[i]); i++)
            {
                oamClearHiddenInput(formName,param[0], param[1]);
            }

        }

        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
false;
    }


//--></script><input id="queryaziende:j_id_jsp_470444661_12"
name="queryaziende:j_id_jsp_470444661_12" type="submit" value="Query"
onclick="if(typeof
window.getScrolling!='undefined'){oamSetHiddenInput('queryaziende','autoScroll',getScrolling());}"
/>
<input type="hidden" name="autoScroll" />
<input type="hidden" name="queryaziende_SUBMIT" value="1" /><input
type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState"
value="OJESdja1jaMfY2GNgOEtYZVCGw5Xw63sGplYVRh7SJZiPTBAy5S+j3OUQiungWQ8Cu/1ZM6ltj2fiJ9zyhgHww=="
/></form>
<script type="text/javascript"><!--

    function getScrolling()
    {
        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
        {
            x = self.pageXOffset;
            y = self.pageYOffset;
        }
         else if ((document.documentElement &&
document.documentElement.scrollLeft)||(document.documentElement &&
document.documentElement.scrollTop))
        {
            x = document.documentElement.scrollLeft;
            y = document.documentElement.scrollTop;
        }
         else if (document.body)
        {
            x = document.body.scrollLeft;
            y = document.body.scrollTop;
        }
        return x + "," + y;
    }

//--></script>
</body></html>

2010/3/23 Fabio F. <fa...@gmail.com>

> No, it is the login page. This page leads to the
>
> http://localhost:8080/telemarketing/faces/query.jsp
>
> whose code is (note that it is incomplete because it crashes):
>
> <html><head>
> <link rel="stylesheet"
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/WH/theme.css"
> type="text/css" />
> <link rel="stylesheet"
> href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/DB/theme.css"
> type="text/css" />
>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Benvenuto</title>
> <style type="text/css">
>     <!--
>     .highlight { background-color: #A8D1E8; color=blue;}
>     -->
> </style>
> </head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
> name="queryaziende" method="post" action="/telemarketing/faces/query.jsp"
> enctype="application/x-www-form-urlencoded">
>     <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
>     <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
> size="1">    <option value="PR">PR</option>    <option
> value="BS">BS</option>    <option value="" selected="selected"></option>
> <option value="TO">TO</option>    <option value="PZ">PZ</option>    <option
> value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
> <option value="MI">MI</option></select>
>     Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
> <option value="x">Non interessato</option>    <option value="C">In
> trattativa</option>    <option value="A">Acquisto
> effettuato</option></select></p>
>
> <span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
> name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
> id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
> size="1"><option value="-1" selected="selected"></option>        <option
> value="1">gennaio</option>        <option value="2">febbraio</option>
> <option value="3">marzo</option>        <option value="4">aprile</option>
>     <option value="5">maggio</option>        <option
> value="6">giugno</option>        <option value="7">luglio</option>
> <option value="8">agosto</option>        <option
> value="9">settembre</option>        <option value="10">ottobre</option>
>     <option value="11">novembre</option>        <option
> value="12">dicembre</option></select><input id="queryaziende:datainiz.year"
> name="queryaziende:datainiz.year" size="4" maxlength="4" />
>
>
>
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
>> Thanks!
>>
>> Is this the page that is supposed to render the calendar with the popup?
>> Because I don't see the javascript needed for it here..
>>
>> Regards,
>> Jakob
>>
>> 2010/3/23 Fabio F. <fa...@gmail.com>
>>
>> > Ah, ok.
>> >
>> > Here's login.jsp.
>> >
>> > <html>
>> > <head>
>> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>> > <title>Login aziende</title>
>> > </head>
>> > <body>
>> > <center><h1>Elenco aziende</h1></center>
>> > <form id="login" name="login" method="post"
>> > action="/telemarketing/faces/login.jsp"
>> > enctype="application/x-www-form-urlencoded">
>> >    <p>Entra</p>
>> >    <p>Username: <input id="login:j_id_jsp_1876195572_2"
>> > name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
>> >    <p>Password: <input type="password"
>> name="login:j_id_jsp_1876195572_3"
>> > /></p>
>> >    <script type="text/javascript"><!--
>> >
>> >
>> >    function oamSetHiddenInput(formname, name, value)
>> >    {
>> >        var form = document.forms[formname];
>> >        if (typeof form == 'undefined')
>> >        {
>> >            form = document.getElementById(formName);
>> >        }
>> >
>> >        if(typeof form.elements[name]!='undefined' &&
>> > (form.elements[name].nodeName=='INPUT' ||
>> > form.elements[name].nodeName=='input'))
>> >        {
>> >            form.elements[name].value=value;
>> >        }
>> >        else
>> >        {
>> >            var newInput = document.createElement('input');
>> >            newInput.setAttribute('type','hidden');
>> >            newInput.setAttribute('id',name);
>> >            newInput.setAttribute('name',name);
>> >            newInput.setAttribute('value',value);
>> >            form.appendChild(newInput);
>> >        }
>> >
>> >    }
>> >
>> >
>> >    function oamClearHiddenInput(formname, name, value)
>> >    {
>> >        var form = document.forms[formname];
>> >        if (typeof form == 'undefined')
>> >        {
>> >            form = document.getElementById(formName);
>> >        }
>> >
>> >        var hInput = form.elements[name];
>> >        if(typeof hInput !='undefined')
>> >        {
>> >            form.removeChild(hInput);
>> >        }
>> >
>> >    }
>> >
>> >    function oamSubmitForm(formName, linkId, target, params)
>> >    {
>> >
>> >        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
>> > '\$:').replace(/:/g,'_');
>> >        if(typeof window[clearFn] =='function')
>> >        {
>> >            window[clearFn](formName);
>> >        }
>> >
>> >        if(typeof window.getScrolling!='undefined')
>> >        {
>> >            oamSetHiddenInput(formName,'autoScroll',getScrolling());
>> >        }
>> >
>> >        var form = document.forms[formName];
>> >        if (typeof form == 'undefined')
>> >        {
>> >            form = document.getElementById(formName);
>> >        }
>> >
>> >        var oldTarget = form.target;
>> >        if(target != null)
>> >        {
>> >
>> >            form.target=target;
>> >        }
>> >        if((typeof params!='undefined') && params != null)
>> >        {
>> >
>> >            for(var i=0, param; (param = params[i]); i++)
>> >            {
>> >                oamSetHiddenInput(formName,param[0], param[1]);
>> >            }
>> >
>> >        }
>> >
>> >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
>> >
>> >        if(form.onsubmit)
>> >        {
>> >            var result=form.onsubmit();
>> >            if((typeof result=='undefined')||result)
>> >            {
>> >                try
>> >                {
>> >                    form.submit();
>> >                }
>> >                catch(e){}
>> >            }
>> >
>> >        }
>> >        else
>> >        {
>> >            try
>> >            {
>> >                form.submit();
>> >            }
>> >            catch(e){}
>> >        }
>> >
>> >        form.target=oldTarget;
>> >        if((typeof params!='undefined') && params != null)
>> >        {
>> >
>> >            for(var i=0, param; (param = params[i]); i++)
>> >            {
>> >                oamClearHiddenInput(formName,param[0], param[1]);
>> >            }
>> >
>> >        }
>> >
>> >        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
>> > false;
>> >    }
>> >
>> >
>> > //--></script><input id="login:j_id_jsp_1876195572_4"
>> > name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
>> > onclick="if(typeof
>> >
>> >
>> window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
>> > />
>> > <input type="hidden" name="autoScroll" />
>> > <input type="hidden" name="login_SUBMIT" value="1" /><input
>> type="hidden"
>> > name="javax.faces.ViewState" id="javax.faces.ViewState"
>> >
>> >
>> value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
>> > /></form>
>> >
>> > <script type="text/javascript"><!--
>> >
>> >    function getScrolling()
>> >    {
>> >        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
>> >        {
>> >            x = self.pageXOffset;
>> >            y = self.pageYOffset;
>> >        }
>> >         else if ((document.documentElement &&
>> > document.documentElement.scrollLeft)||(document.documentElement &&
>> > document.documentElement.scrollTop))
>> >        {
>> >            x = document.documentElement.scrollLeft;
>> >            y = document.documentElement.scrollTop;
>> >        }
>> >         else if (document.body)
>> >        {
>> >            x = document.body.scrollLeft;
>> >            y = document.body.scrollTop;
>> >        }
>> >        return x + "," + y;
>> >    }
>> >
>> > //--></script>
>> > </body>
>> > </html>
>> >
>> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
>> >
>> > > OK thanks for the URL.
>> > >
>> > > No I don't mean from the JSP, but from the generated HTML in the
>> browser.
>> > > Just open your login.jsp in the browser and view the HTML source.
>> > >
>> > > Regards,
>> > > Jakob
>> > >
>> > >
>> >
>>
>
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
No, it is the login page. This page leads to the

http://localhost:8080/telemarketing/faces/query.jsp

whose code is (note that it is incomplete because it crashes):

<html><head>
<link rel="stylesheet"
href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/WH/theme.css"
type="text/css" />
<link rel="stylesheet"
href="/telemarketing/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12693516/calendar.HtmlCalendarRenderer/DB/theme.css"
type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Benvenuto</title>
<style type="text/css">
    <!--
    .highlight { background-color: #A8D1E8; color=blue;}
    -->
</style>
</head><body id="j_id_jsp_470444661_3"><form id="queryaziende"
name="queryaziende" method="post" action="/telemarketing/faces/query.jsp"
enctype="application/x-www-form-urlencoded">
    <p>Benvenuto <label>Fabio</label>&nbsp;<label>Ferrari</label></p>
    <p>Provincia: <select name="queryaziende:j_id_jsp_470444661_7"
size="1">    <option value="PR">PR</option>    <option
value="BS">BS</option>    <option value="" selected="selected"></option>
<option value="TO">TO</option>    <option value="PZ">PZ</option>    <option
value="ZIBELLO">ZIBELLO</option>    <option value="SP">SP</option>
<option value="MI">MI</option></select>
    Stato: <select name="queryaziende:j_id_jsp_470444661_9" size="1">
<option value="x">Non interessato</option>    <option value="C">In
trattativa</option>    <option value="A">Acquisto
effettuato</option></select></p>

<span id="queryaziende:datainiz"><input id="queryaziende:datainiz.day"
name="queryaziende:datainiz.day" size="2" maxlength="2" /><select
id="queryaziende:datainiz.month" name="queryaziende:datainiz.month"
size="1"><option value="-1" selected="selected"></option>        <option
value="1">gennaio</option>        <option value="2">febbraio</option>
<option value="3">marzo</option>        <option value="4">aprile</option>
    <option value="5">maggio</option>        <option
value="6">giugno</option>        <option value="7">luglio</option>
<option value="8">agosto</option>        <option
value="9">settembre</option>        <option value="10">ottobre</option>
    <option value="11">novembre</option>        <option
value="12">dicembre</option></select><input id="queryaziende:datainiz.year"
name="queryaziende:datainiz.year" size="4" maxlength="4" />



2010/3/23 Jakob Korherr <ja...@gmail.com>

> Thanks!
>
> Is this the page that is supposed to render the calendar with the popup?
> Because I don't see the javascript needed for it here..
>
> Regards,
> Jakob
>
> 2010/3/23 Fabio F. <fa...@gmail.com>
>
> > Ah, ok.
> >
> > Here's login.jsp.
> >
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Login aziende</title>
> > </head>
> > <body>
> > <center><h1>Elenco aziende</h1></center>
> > <form id="login" name="login" method="post"
> > action="/telemarketing/faces/login.jsp"
> > enctype="application/x-www-form-urlencoded">
> >    <p>Entra</p>
> >    <p>Username: <input id="login:j_id_jsp_1876195572_2"
> > name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
> >    <p>Password: <input type="password" name="login:j_id_jsp_1876195572_3"
> > /></p>
> >    <script type="text/javascript"><!--
> >
> >
> >    function oamSetHiddenInput(formname, name, value)
> >    {
> >        var form = document.forms[formname];
> >        if (typeof form == 'undefined')
> >        {
> >            form = document.getElementById(formName);
> >        }
> >
> >        if(typeof form.elements[name]!='undefined' &&
> > (form.elements[name].nodeName=='INPUT' ||
> > form.elements[name].nodeName=='input'))
> >        {
> >            form.elements[name].value=value;
> >        }
> >        else
> >        {
> >            var newInput = document.createElement('input');
> >            newInput.setAttribute('type','hidden');
> >            newInput.setAttribute('id',name);
> >            newInput.setAttribute('name',name);
> >            newInput.setAttribute('value',value);
> >            form.appendChild(newInput);
> >        }
> >
> >    }
> >
> >
> >    function oamClearHiddenInput(formname, name, value)
> >    {
> >        var form = document.forms[formname];
> >        if (typeof form == 'undefined')
> >        {
> >            form = document.getElementById(formName);
> >        }
> >
> >        var hInput = form.elements[name];
> >        if(typeof hInput !='undefined')
> >        {
> >            form.removeChild(hInput);
> >        }
> >
> >    }
> >
> >    function oamSubmitForm(formName, linkId, target, params)
> >    {
> >
> >        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> > '\$:').replace(/:/g,'_');
> >        if(typeof window[clearFn] =='function')
> >        {
> >            window[clearFn](formName);
> >        }
> >
> >        if(typeof window.getScrolling!='undefined')
> >        {
> >            oamSetHiddenInput(formName,'autoScroll',getScrolling());
> >        }
> >
> >        var form = document.forms[formName];
> >        if (typeof form == 'undefined')
> >        {
> >            form = document.getElementById(formName);
> >        }
> >
> >        var oldTarget = form.target;
> >        if(target != null)
> >        {
> >
> >            form.target=target;
> >        }
> >        if((typeof params!='undefined') && params != null)
> >        {
> >
> >            for(var i=0, param; (param = params[i]); i++)
> >            {
> >                oamSetHiddenInput(formName,param[0], param[1]);
> >            }
> >
> >        }
> >
> >        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
> >
> >        if(form.onsubmit)
> >        {
> >            var result=form.onsubmit();
> >            if((typeof result=='undefined')||result)
> >            {
> >                try
> >                {
> >                    form.submit();
> >                }
> >                catch(e){}
> >            }
> >
> >        }
> >        else
> >        {
> >            try
> >            {
> >                form.submit();
> >            }
> >            catch(e){}
> >        }
> >
> >        form.target=oldTarget;
> >        if((typeof params!='undefined') && params != null)
> >        {
> >
> >            for(var i=0, param; (param = params[i]); i++)
> >            {
> >                oamClearHiddenInput(formName,param[0], param[1]);
> >            }
> >
> >        }
> >
> >        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
> > false;
> >    }
> >
> >
> > //--></script><input id="login:j_id_jsp_1876195572_4"
> > name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
> > onclick="if(typeof
> >
> >
> window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
> > />
> > <input type="hidden" name="autoScroll" />
> > <input type="hidden" name="login_SUBMIT" value="1" /><input type="hidden"
> > name="javax.faces.ViewState" id="javax.faces.ViewState"
> >
> >
> value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
> > /></form>
> >
> > <script type="text/javascript"><!--
> >
> >    function getScrolling()
> >    {
> >        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
> >        {
> >            x = self.pageXOffset;
> >            y = self.pageYOffset;
> >        }
> >         else if ((document.documentElement &&
> > document.documentElement.scrollLeft)||(document.documentElement &&
> > document.documentElement.scrollTop))
> >        {
> >            x = document.documentElement.scrollLeft;
> >            y = document.documentElement.scrollTop;
> >        }
> >         else if (document.body)
> >        {
> >            x = document.body.scrollLeft;
> >            y = document.body.scrollTop;
> >        }
> >        return x + "," + y;
> >    }
> >
> > //--></script>
> > </body>
> > </html>
> >
> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> >
> > > OK thanks for the URL.
> > >
> > > No I don't mean from the JSP, but from the generated HTML in the
> browser.
> > > Just open your login.jsp in the browser and view the HTML source.
> > >
> > > Regards,
> > > Jakob
> > >
> > >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
Thanks!

Is this the page that is supposed to render the calendar with the popup?
Because I don't see the javascript needed for it here..

Regards,
Jakob

2010/3/23 Fabio F. <fa...@gmail.com>

> Ah, ok.
>
> Here's login.jsp.
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Login aziende</title>
> </head>
> <body>
> <center><h1>Elenco aziende</h1></center>
> <form id="login" name="login" method="post"
> action="/telemarketing/faces/login.jsp"
> enctype="application/x-www-form-urlencoded">
>    <p>Entra</p>
>    <p>Username: <input id="login:j_id_jsp_1876195572_2"
> name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
>    <p>Password: <input type="password" name="login:j_id_jsp_1876195572_3"
> /></p>
>    <script type="text/javascript"><!--
>
>
>    function oamSetHiddenInput(formname, name, value)
>    {
>        var form = document.forms[formname];
>        if (typeof form == 'undefined')
>        {
>            form = document.getElementById(formName);
>        }
>
>        if(typeof form.elements[name]!='undefined' &&
> (form.elements[name].nodeName=='INPUT' ||
> form.elements[name].nodeName=='input'))
>        {
>            form.elements[name].value=value;
>        }
>        else
>        {
>            var newInput = document.createElement('input');
>            newInput.setAttribute('type','hidden');
>            newInput.setAttribute('id',name);
>            newInput.setAttribute('name',name);
>            newInput.setAttribute('value',value);
>            form.appendChild(newInput);
>        }
>
>    }
>
>
>    function oamClearHiddenInput(formname, name, value)
>    {
>        var form = document.forms[formname];
>        if (typeof form == 'undefined')
>        {
>            form = document.getElementById(formName);
>        }
>
>        var hInput = form.elements[name];
>        if(typeof hInput !='undefined')
>        {
>            form.removeChild(hInput);
>        }
>
>    }
>
>    function oamSubmitForm(formName, linkId, target, params)
>    {
>
>        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
> '\$:').replace(/:/g,'_');
>        if(typeof window[clearFn] =='function')
>        {
>            window[clearFn](formName);
>        }
>
>        if(typeof window.getScrolling!='undefined')
>        {
>            oamSetHiddenInput(formName,'autoScroll',getScrolling());
>        }
>
>        var form = document.forms[formName];
>        if (typeof form == 'undefined')
>        {
>            form = document.getElementById(formName);
>        }
>
>        var oldTarget = form.target;
>        if(target != null)
>        {
>
>            form.target=target;
>        }
>        if((typeof params!='undefined') && params != null)
>        {
>
>            for(var i=0, param; (param = params[i]); i++)
>            {
>                oamSetHiddenInput(formName,param[0], param[1]);
>            }
>
>        }
>
>        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
>
>        if(form.onsubmit)
>        {
>            var result=form.onsubmit();
>            if((typeof result=='undefined')||result)
>            {
>                try
>                {
>                    form.submit();
>                }
>                catch(e){}
>            }
>
>        }
>        else
>        {
>            try
>            {
>                form.submit();
>            }
>            catch(e){}
>        }
>
>        form.target=oldTarget;
>        if((typeof params!='undefined') && params != null)
>        {
>
>            for(var i=0, param; (param = params[i]); i++)
>            {
>                oamClearHiddenInput(formName,param[0], param[1]);
>            }
>
>        }
>
>        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
> false;
>    }
>
>
> //--></script><input id="login:j_id_jsp_1876195572_4"
> name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
> onclick="if(typeof
>
> window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
> />
> <input type="hidden" name="autoScroll" />
> <input type="hidden" name="login_SUBMIT" value="1" /><input type="hidden"
> name="javax.faces.ViewState" id="javax.faces.ViewState"
>
> value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
> /></form>
>
> <script type="text/javascript"><!--
>
>    function getScrolling()
>    {
>        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
>        {
>            x = self.pageXOffset;
>            y = self.pageYOffset;
>        }
>         else if ((document.documentElement &&
> document.documentElement.scrollLeft)||(document.documentElement &&
> document.documentElement.scrollTop))
>        {
>            x = document.documentElement.scrollLeft;
>            y = document.documentElement.scrollTop;
>        }
>         else if (document.body)
>        {
>            x = document.body.scrollLeft;
>            y = document.body.scrollTop;
>        }
>        return x + "," + y;
>    }
>
> //--></script>
> </body>
> </html>
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > OK thanks for the URL.
> >
> > No I don't mean from the JSP, but from the generated HTML in the browser.
> > Just open your login.jsp in the browser and view the HTML source.
> >
> > Regards,
> > Jakob
> >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
Ah, ok.

Here's login.jsp.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login aziende</title>
</head>
<body>
<center><h1>Elenco aziende</h1></center>
<form id="login" name="login" method="post"
action="/telemarketing/faces/login.jsp"
enctype="application/x-www-form-urlencoded">
    <p>Entra</p>
    <p>Username: <input id="login:j_id_jsp_1876195572_2"
name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
    <p>Password: <input type="password" name="login:j_id_jsp_1876195572_3"
/></p>
    <script type="text/javascript"><!--


    function oamSetHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if (typeof form == 'undefined')
        {
            form = document.getElementById(formName);
        }

        if(typeof form.elements[name]!='undefined' &&
(form.elements[name].nodeName=='INPUT' ||
form.elements[name].nodeName=='input'))
        {
            form.elements[name].value=value;
        }
        else
        {
            var newInput = document.createElement('input');
            newInput.setAttribute('type','hidden');
            newInput.setAttribute('id',name);
            newInput.setAttribute('name',name);
            newInput.setAttribute('value',value);
            form.appendChild(newInput);
        }

    }


    function oamClearHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if (typeof form == 'undefined')
        {
            form = document.getElementById(formName);
        }

        var hInput = form.elements[name];
        if(typeof hInput !='undefined')
        {
            form.removeChild(hInput);
        }

    }

    function oamSubmitForm(formName, linkId, target, params)
    {

        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
'\$:').replace(/:/g,'_');
        if(typeof window[clearFn] =='function')
        {
            window[clearFn](formName);
        }

        if(typeof window.getScrolling!='undefined')
        {
            oamSetHiddenInput(formName,'autoScroll',getScrolling());
        }

        var form = document.forms[formName];
        if (typeof form == 'undefined')
        {
            form = document.getElementById(formName);
        }

        var oldTarget = form.target;
        if(target != null)
        {

            form.target=target;
        }
        if((typeof params!='undefined') && params != null)
        {

            for(var i=0, param; (param = params[i]); i++)
            {
                oamSetHiddenInput(formName,param[0], param[1]);
            }

        }

        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);

        if(form.onsubmit)
        {
            var result=form.onsubmit();
            if((typeof result=='undefined')||result)
            {
                try
                {
                    form.submit();
                }
                catch(e){}
            }

        }
        else
        {
            try
            {
                form.submit();
            }
            catch(e){}
        }

        form.target=oldTarget;
        if((typeof params!='undefined') && params != null)
        {

            for(var i=0, param; (param = params[i]); i++)
            {
                oamClearHiddenInput(formName,param[0], param[1]);
            }

        }

        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
false;
    }


//--></script><input id="login:j_id_jsp_1876195572_4"
name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
onclick="if(typeof
window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
/>
<input type="hidden" name="autoScroll" />
<input type="hidden" name="login_SUBMIT" value="1" /><input type="hidden"
name="javax.faces.ViewState" id="javax.faces.ViewState"
value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
/></form>

<script type="text/javascript"><!--

    function getScrolling()
    {
        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
        {
            x = self.pageXOffset;
            y = self.pageYOffset;
        }
         else if ((document.documentElement &&
document.documentElement.scrollLeft)||(document.documentElement &&
document.documentElement.scrollTop))
        {
            x = document.documentElement.scrollLeft;
            y = document.documentElement.scrollTop;
        }
         else if (document.body)
        {
            x = document.body.scrollLeft;
            y = document.body.scrollTop;
        }
        return x + "," + y;
    }

//--></script>
</body>
</html>

2010/3/23 Jakob Korherr <ja...@gmail.com>

> OK thanks for the URL.
>
> No I don't mean from the JSP, but from the generated HTML in the browser.
> Just open your login.jsp in the browser and view the HTML source.
>
> Regards,
> Jakob
>
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
OK thanks for the URL.

No I don't mean from the JSP, but from the generated HTML in the browser.
Just open your login.jsp in the browser and view the HTML source.

Regards,
Jakob

2010/3/23 Fabio F. <fa...@gmail.com>

> Well, the URL is
>
> http://localhost:8080/telemarketing/faces/login.jsp
>
> I don't need to include javascript except those generated by the JSF
> itself.
> I only need to generate a popup calendar, whose code I don't know because
> I've been never able to generate it...
>
> Fabio Ferrari
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > You're welcome!
> >
> > Which url are you using to access the JSF-page in the browser?
> >
> > Also: can you please provide the portion of the HTML that is supposed to
> > include the javascript (something like <script language="javascript"
> > type="text/javascript" src="..."></script>).
> >
> > Regards,
> > Jakob
> >
> > 2010/3/23 Fabio F. <fa...@gmail.com>
> >
> > > Thank you Jakob for the help, I tried to modify my web.xml but the
> > problem
> > > is the same.
> > >
> > > This is my new web.xml file, any other idea?
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> > > http://java.sun.com/xml/ns/javaee" xmlns:web="
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="
> > > http://java.sun.com/xml/ns/javaee
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > > version="2.5">
> > >  <display-name>telemarketing</display-name>
> > >  <welcome-file-list>
> > >    <welcome-file>index.html</welcome-file>
> > >    <welcome-file>index.htm</welcome-file>
> > >    <welcome-file>index.jsp</welcome-file>
> > >    <welcome-file>default.html</welcome-file>
> > >    <welcome-file>default.htm</welcome-file>
> > >    <welcome-file>default.jsp</welcome-file>
> > >  </welcome-file-list>
> > >   <context-param>
> > >
> >  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > >    <param-value>resources.application</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>State saving method: 'client' or 'server' (=default).
> See
> > > JSF Specification 2.5.2</description>
> > >    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > >    <param-value>server</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>
> > >    This parameter tells MyFaces if javascript code should be allowed in
> > >    the rendered HTML output.
> > >    If javascript is allowed, command_link anchors will have javascript
> > code
> > >    that submits the corresponding form.
> > >    If javascript is not allowed, the state saving info and nested
> > > parameters
> > >    will be added as url parameters.
> > >    Default is 'true'</description>
> > >    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> > >    <param-value>true</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>
> > >    If true, rendered HTML code will be formatted, so that it is
> > > 'human-readable'
> > >    i.e. additional line separators and whitespace will be written, that
> > do
> > > not
> > >    influence the HTML code.
> > >    Default is 'true'</description>
> > >    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> > >    <param-value>true</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> > >    <param-value>false</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>
> > >    If true, a javascript function will be rendered that is able to
> > restore
> > > the
> > >    former vertical scroll on every request. Convenient feature if you
> > have
> > > pages
> > >    with long lists and you do not want the browser page to always jump
> to
> > > the top
> > >    if you trigger a link or button action that stays on the same page.
> > >    Default is 'false'
> > > </description>
> > >    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> > >    <param-value>true</param-value>
> > >  </context-param>
> > >  <servlet>
> > >    <servlet-name>faces</servlet-name>
> > >     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> > >    <load-on-startup>1</load-on-startup>
> > >  </servlet>
> > >  <servlet-mapping>
> > >     <servlet-name>faces</servlet-name>
> > >    <url-pattern>/faces/*</url-pattern>
> > >  </servlet-mapping>
> > >  <listener>
> > >
> > >
> > >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > >  </listener>
> > >  <context-param>
> > >    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> > >    <param-value>netwave.utils.ErrorHandler</param-value>
> > >  </context-param>
> > >  <filter>
> > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >
> > >
> > >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> > >      <init-param>
> > >          <param-name>uploadMaxFileSize</param-name>
> > >          <param-value>20m</param-value>
> > >      </init-param>
> > >  </filter>
> > >  <filter-mapping>
> > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >       <servlet-name>faces</servlet-name>
> > >   </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>*.jsf</url-pattern>
> > >   </filter-mapping>
> > >  <filter>
> > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > >
> >  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> > >  </filter>
> > >  <filter-mapping>
> > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > >    <url-pattern>/*</url-pattern>
> > >  </filter-mapping>
> > >  <error-page>
> > >
> > >
> > >
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> > >    <location>/session_expired.jsp</location>
> > >  </error-page>
> > > </web-app>
> > >
> > > Fabio Ferrari
> > >
> > > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> > >
> > > > Hi Fabio,
> > > >
> > > > I saw that you have two FacesServlet definitions in your web.xml:
> > > >
> > > > --javax.faces.webapp.FacesServlet mapped for /faces/* named "Faces
> > > Servlet"
> > > > --org.apache.myfaces.webapp.MyFacesServlet mapped for *.jsf and
> *.faces
> > > > named "faces"
> > > >
> > > > And you also have installed the MyFacesExtensionsFilter for the
> servlet
> > > > "Faces Servlet" (the first one from above). This means the filter is
> > only
> > > > working if you use /faces/* to call your JSF-page and not if you use
> > > *.jsf
> > > > or *.faces.
> > > >
> > > > This filter is responsible to serve the javascript for the HTML page,
> > so
> > > it
> > > > has to be configured correctly to use javascript (or other tomahawk
> > > > resources).
> > > >
> > > > I would suggest that you remove the second servlet definition
> ("faces")
> > > > from
> > > > your web.xml because you just don't need it and, if you want them,
> add
> > > > *.jsf
> > > > and *.faces as mappings to "Faces Servlet".
> > > >
> > > > I guess this should make your webapp work!
> > > >
> > > > Regards,
> > > > Jakob
> > > >
> > > > 2010/3/23 Fabio F. <fa...@gmail.com>
> > > >
> > > > > Hello,
> > > > >
> > > > > I've installed Eclipse galileo with myfaces core 1.2.8 and
> > > > tomahawk12-1.1.9
> > > > > .
> > > > >
> > > > > I am able to get working the tomahawk tags that don't have
> > javascript,
> > > > but
> > > > > not those who have them.
> > > > >
> > > > > For example, if in a <t:inputDate> tag set "popupCalendar=false"
> the
> > > page
> > > > > is
> > > > > working, if I set it to "true" it simply stops rendering the page,
> > > > becoming
> > > > > incomplete. No way to have an error message to debug.
> > > > >
> > > > > Is it a bug in tomahawk or am I missing something?
> > > > >
> > > > > Those are my files:
> > > > >
> > > > > web.xml:
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns="
> > > > > http://java.sun.com/xml/ns/javaee" xmlns:web="
> > > > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> > > xsi:schemaLocation="
> > > > > http://java.sun.com/xml/ns/javaee
> > > > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > > > > version="2.5">
> > > > >  <display-name>telemarketing</
> > > > > display-name>
> > > > >  <welcome-file-list>
> > > > >    <welcome-file>index.html</welcome-file>
> > > > >    <welcome-file>index.htm</welcome-file>
> > > > >    <welcome-file>index.jsp</welcome-file>
> > > > >    <welcome-file>default.html</welcome-file>
> > > > >    <welcome-file>default.htm</welcome-file>
> > > > >    <welcome-file>default.jsp</welcome-file>
> > > > >  </welcome-file-list>
> > > > >  <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>
> > > > >  <context-param>
> > > > >
> > > >
> >  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > > > >    <param-value>resources.application</param-value>
> > > > >  </context-param>
> > > > >  <context-param>
> > > > >    <description>State saving method: 'client' or 'server'
> (=default).
> > > See
> > > > > JSF Specification 2.5.2</description>
> > > > >    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > > > >    <param-value>server</param-value>
> > > > >  </context-param>
> > > > >  <context-param>
> > > > >    <description>
> > > > >    This parameter tells MyFaces if javascript code should be
> allowed
> > in
> > > > >    the rendered HTML output.
> > > > >    If javascript is allowed, command_link anchors will have
> > javascript
> > > > code
> > > > >    that submits the corresponding form.
> > > > >    If javascript is not allowed, the state saving info and nested
> > > > > parameters
> > > > >    will be added as url parameters.
> > > > >    Default is 'true'</description>
> > > > >    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> > > > >    <param-value>true</param-value>
> > > > >  </context-param>
> > > > >  <context-param>
> > > > >    <description>
> > > > >    If true, rendered HTML code will be formatted, so that it is
> > > > > 'human-readable'
> > > > >    i.e. additional line separators and whitespace will be written,
> > that
> > > > do
> > > > > not
> > > > >    influence the HTML code.
> > > > >    Default is 'true'</description>
> > > > >    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> > > > >    <param-value>true</param-value>
> > > > >  </context-param>
> > > > >  <context-param>
> > > > >    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> > > > >    <param-value>false</param-value>
> > > > >  </context-param>
> > > > >  <context-param>
> > > > >    <description>
> > > > >    If true, a javascript function will be rendered that is able to
> > > > restore
> > > > > the
> > > > >    former vertical scroll on every request. Convenient feature if
> you
> > > > have
> > > > > pages
> > > > >    with long lists and you do not want the browser page to always
> > jump
> > > to
> > > > > the top
> > > > >    if you trigger a link or button action that stays on the same
> > page.
> > > > >    Default is 'false'
> > > > > </description>
> > > > >    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> > > > >    <param-value>true</param-value>
> > > > >  </context-param>
> > > > >  <servlet>
> > > > >    <servlet-name>faces</servlet-name>
> > > > >
> > > >
> >  <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
> > > > >    <load-on-startup>1</load-on-startup>
> > > > >  </servlet>
> > > > >  <servlet-mapping>
> > > > >    <servlet-name>faces</servlet-name>
> > > > >    <url-pattern>*.jsf</url-pattern>
> > > > >  </servlet-mapping>
> > > > >  <servlet-mapping>
> > > > >    <servlet-name>faces</servlet-name>
> > > > >    <url-pattern>*.faces</url-pattern>
> > > > >  </servlet-mapping>
> > > > >  <listener>
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > > > >  </listener>
> > > > >  <context-param>
> > > > >    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> > > > >    <param-value>netwave.utils.ErrorHandler</param-value>
> > > > >  </context-param>
> > > > >  <filter>
> > > > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> > > > >      <init-param>
> > > > >          <param-name>uploadMaxFileSize</param-name>
> > > > >          <param-value>20m</param-value>
> > > > >      </init-param>
> > > > >  </filter>
> > > > >  <filter-mapping>
> > > > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > > > >      <servlet-name>Faces Servlet</servlet-name>
> > > > >  </filter-mapping>
> > > > >  <filter-mapping>
> > > > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > > > >      <url-pattern>/faces/*</url-pattern>
> > > > >  </filter-mapping>
> > > > >  <filter>
> > > > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > > > >
> > > >
> >  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> > > > >  </filter>
> > > > >  <filter-mapping>
> > > > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > > > >    <url-pattern>/*</url-pattern>
> > > > >  </filter-mapping>
> > > > >  <error-page>
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> > > > >    <location>/session_expired.jsp</location>
> > > > >  </error-page>
> > > > > </web-app>
> > > > >
> > > > > login.jsp:
> > > > >
> > > > > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > > > > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > > > > <html>
> > > > > <head>
> > > > > <meta http-equiv="Content-Type" content="text/html;
> > > charset=ISO-8859-1">
> > > > > <title>Login aziende</title>
> > > > > </head>
> > > > > <body>
> > > > > <center><h1>Elenco aziende</h1></center>
> > > > > <f:view>
> > > > > <h:form id="login">
> > > > >    <p>Entra</p>
> > > > >    <p>Username: <h:inputText
> > > > > value="#{BB_Aziende.userid}"></h:inputText></p>
> > > > >    <p>Password: <h:inputSecret
> > > > > value="#{BB_Aziende.password}"></h:inputSecret></p>
> > > > >    <h:commandButton value="Login"
> > > > > action="#{BB_Aziende.Login}"></h:commandButton>
> > > > > </h:form>
> > > > > </f:view>
> > > > > </body>
> > > > > </html>
> > > > >
> > > > > query.jsp:
> > > > >
> > > > > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > > > > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > > > > <%@ taglib prefix="t"  uri="http://myfaces.apache.org/tomahawk"%>
> > > > >
> > > > > <f:view>
> > > > > <f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
> > > > > <t:document>
> > > > > <t:documentHead>
> > > > > <meta http-equiv="Content-Type" content="text/html;
> > > charset=ISO-8859-1">
> > > > > <title>Benvenuto</title>
> > > > > <style type="text/css">
> > > > >    <!--
> > > > >    .highlight { background-color: #A8D1E8; color=blue;}
> > > > >    -->
> > > > > </style>
> > > > > </t:documentHead>
> > > > > <t:documentBody>
> > > > > <h:form id="queryaziende">
> > > > >    <p>Benvenuto <h:outputLabel
> > > > >
> > value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
> > > > > value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
> > > > >    <p>Provincia: <h:selectOneMenu
> > > > value="#{BB_Aziende.azienda.provincia}">
> > > > >        <f:selectItems value="#{BB_Aziende.province}"/>
> > > > >    </h:selectOneMenu>
> > > > >    Stato: <h:selectOneMenu
> > > value="#{BB_Aziende.azienda.noninteressato}">
> > > > >        <f:selectItems value="#{BB_Aziende.stati}"/>
> > > > >    </h:selectOneMenu></p>
> > > > >    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
> > > > > popupCalendar="true" required="true">
> > > > >        <f:validator validatorId="checkvaliddate"/>
> > > > >    </t:inputDate>
> > > > >    <t:commandButton value="Query"
> > > > > action="#{BB_Aziende.Queryaziende}"></t:commandButton>
> > > > > </h:form>
> > > > > </t:documentBody>
> > > > > </t:document>
> > > > > </f:view>
> > > > >
> > > > > Thank you in advance, best regards
> > > > >
> > > > > Fabio Ferrari
> > > > >
> > > > > P. S. Non è possibile che qualsiasi cosa scrivo venga rigettata per
> > > spam.
> > > > > Ma
> > > > > lo fate apposta?
> > > > >
> > > >
> > >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
Well, the URL is

http://localhost:8080/telemarketing/faces/login.jsp

I don't need to include javascript except those generated by the JSF itself.
I only need to generate a popup calendar, whose code I don't know because
I've been never able to generate it...

Fabio Ferrari

2010/3/23 Jakob Korherr <ja...@gmail.com>

> You're welcome!
>
> Which url are you using to access the JSF-page in the browser?
>
> Also: can you please provide the portion of the HTML that is supposed to
> include the javascript (something like <script language="javascript"
> type="text/javascript" src="..."></script>).
>
> Regards,
> Jakob
>
> 2010/3/23 Fabio F. <fa...@gmail.com>
>
> > Thank you Jakob for the help, I tried to modify my web.xml but the
> problem
> > is the same.
> >
> > This is my new web.xml file, any other idea?
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> > http://java.sun.com/xml/ns/javaee" xmlns:web="
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> > http://java.sun.com/xml/ns/javaee
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > version="2.5">
> >  <display-name>telemarketing</display-name>
> >  <welcome-file-list>
> >    <welcome-file>index.html</welcome-file>
> >    <welcome-file>index.htm</welcome-file>
> >    <welcome-file>index.jsp</welcome-file>
> >    <welcome-file>default.html</welcome-file>
> >    <welcome-file>default.htm</welcome-file>
> >    <welcome-file>default.jsp</welcome-file>
> >  </welcome-file-list>
> >   <context-param>
> >
>  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> >    <param-value>resources.application</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>State saving method: 'client' or 'server' (=default). See
> > JSF Specification 2.5.2</description>
> >    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> >    <param-value>server</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>
> >    This parameter tells MyFaces if javascript code should be allowed in
> >    the rendered HTML output.
> >    If javascript is allowed, command_link anchors will have javascript
> code
> >    that submits the corresponding form.
> >    If javascript is not allowed, the state saving info and nested
> > parameters
> >    will be added as url parameters.
> >    Default is 'true'</description>
> >    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> >    <param-value>true</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>
> >    If true, rendered HTML code will be formatted, so that it is
> > 'human-readable'
> >    i.e. additional line separators and whitespace will be written, that
> do
> > not
> >    influence the HTML code.
> >    Default is 'true'</description>
> >    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> >    <param-value>true</param-value>
> >  </context-param>
> >  <context-param>
> >    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> >    <param-value>false</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>
> >    If true, a javascript function will be rendered that is able to
> restore
> > the
> >    former vertical scroll on every request. Convenient feature if you
> have
> > pages
> >    with long lists and you do not want the browser page to always jump to
> > the top
> >    if you trigger a link or button action that stays on the same page.
> >    Default is 'false'
> > </description>
> >    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> >    <param-value>true</param-value>
> >  </context-param>
> >  <servlet>
> >    <servlet-name>faces</servlet-name>
> >     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> >    <load-on-startup>1</load-on-startup>
> >  </servlet>
> >  <servlet-mapping>
> >     <servlet-name>faces</servlet-name>
> >    <url-pattern>/faces/*</url-pattern>
> >  </servlet-mapping>
> >  <listener>
> >
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >  </listener>
> >  <context-param>
> >    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> >    <param-value>netwave.utils.ErrorHandler</param-value>
> >  </context-param>
> >  <filter>
> >      <filter-name>MyFacesExtensionsFilter</filter-name>
> >
> >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> >      <init-param>
> >          <param-name>uploadMaxFileSize</param-name>
> >          <param-value>20m</param-value>
> >      </init-param>
> >  </filter>
> >  <filter-mapping>
> >      <filter-name>MyFacesExtensionsFilter</filter-name>
> >       <servlet-name>faces</servlet-name>
> >   </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>*.jsf</url-pattern>
> >   </filter-mapping>
> >  <filter>
> >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> >
>  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> >  </filter>
> >  <filter-mapping>
> >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> >    <url-pattern>/*</url-pattern>
> >  </filter-mapping>
> >  <error-page>
> >
> >
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> >    <location>/session_expired.jsp</location>
> >  </error-page>
> > </web-app>
> >
> > Fabio Ferrari
> >
> > 2010/3/23 Jakob Korherr <ja...@gmail.com>
> >
> > > Hi Fabio,
> > >
> > > I saw that you have two FacesServlet definitions in your web.xml:
> > >
> > > --javax.faces.webapp.FacesServlet mapped for /faces/* named "Faces
> > Servlet"
> > > --org.apache.myfaces.webapp.MyFacesServlet mapped for *.jsf and *.faces
> > > named "faces"
> > >
> > > And you also have installed the MyFacesExtensionsFilter for the servlet
> > > "Faces Servlet" (the first one from above). This means the filter is
> only
> > > working if you use /faces/* to call your JSF-page and not if you use
> > *.jsf
> > > or *.faces.
> > >
> > > This filter is responsible to serve the javascript for the HTML page,
> so
> > it
> > > has to be configured correctly to use javascript (or other tomahawk
> > > resources).
> > >
> > > I would suggest that you remove the second servlet definition ("faces")
> > > from
> > > your web.xml because you just don't need it and, if you want them, add
> > > *.jsf
> > > and *.faces as mappings to "Faces Servlet".
> > >
> > > I guess this should make your webapp work!
> > >
> > > Regards,
> > > Jakob
> > >
> > > 2010/3/23 Fabio F. <fa...@gmail.com>
> > >
> > > > Hello,
> > > >
> > > > I've installed Eclipse galileo with myfaces core 1.2.8 and
> > > tomahawk12-1.1.9
> > > > .
> > > >
> > > > I am able to get working the tomahawk tags that don't have
> javascript,
> > > but
> > > > not those who have them.
> > > >
> > > > For example, if in a <t:inputDate> tag set "popupCalendar=false" the
> > page
> > > > is
> > > > working, if I set it to "true" it simply stops rendering the page,
> > > becoming
> > > > incomplete. No way to have an error message to debug.
> > > >
> > > > Is it a bug in tomahawk or am I missing something?
> > > >
> > > > Those are my files:
> > > >
> > > > web.xml:
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="
> > > > http://java.sun.com/xml/ns/javaee" xmlns:web="
> > > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> > xsi:schemaLocation="
> > > > http://java.sun.com/xml/ns/javaee
> > > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > > > version="2.5">
> > > >  <display-name>telemarketing</
> > > > display-name>
> > > >  <welcome-file-list>
> > > >    <welcome-file>index.html</welcome-file>
> > > >    <welcome-file>index.htm</welcome-file>
> > > >    <welcome-file>index.jsp</welcome-file>
> > > >    <welcome-file>default.html</welcome-file>
> > > >    <welcome-file>default.htm</welcome-file>
> > > >    <welcome-file>default.jsp</welcome-file>
> > > >  </welcome-file-list>
> > > >  <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>
> > > >  <context-param>
> > > >
> > >
>  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > > >    <param-value>resources.application</param-value>
> > > >  </context-param>
> > > >  <context-param>
> > > >    <description>State saving method: 'client' or 'server' (=default).
> > See
> > > > JSF Specification 2.5.2</description>
> > > >    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > > >    <param-value>server</param-value>
> > > >  </context-param>
> > > >  <context-param>
> > > >    <description>
> > > >    This parameter tells MyFaces if javascript code should be allowed
> in
> > > >    the rendered HTML output.
> > > >    If javascript is allowed, command_link anchors will have
> javascript
> > > code
> > > >    that submits the corresponding form.
> > > >    If javascript is not allowed, the state saving info and nested
> > > > parameters
> > > >    will be added as url parameters.
> > > >    Default is 'true'</description>
> > > >    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> > > >    <param-value>true</param-value>
> > > >  </context-param>
> > > >  <context-param>
> > > >    <description>
> > > >    If true, rendered HTML code will be formatted, so that it is
> > > > 'human-readable'
> > > >    i.e. additional line separators and whitespace will be written,
> that
> > > do
> > > > not
> > > >    influence the HTML code.
> > > >    Default is 'true'</description>
> > > >    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> > > >    <param-value>true</param-value>
> > > >  </context-param>
> > > >  <context-param>
> > > >    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> > > >    <param-value>false</param-value>
> > > >  </context-param>
> > > >  <context-param>
> > > >    <description>
> > > >    If true, a javascript function will be rendered that is able to
> > > restore
> > > > the
> > > >    former vertical scroll on every request. Convenient feature if you
> > > have
> > > > pages
> > > >    with long lists and you do not want the browser page to always
> jump
> > to
> > > > the top
> > > >    if you trigger a link or button action that stays on the same
> page.
> > > >    Default is 'false'
> > > > </description>
> > > >    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> > > >    <param-value>true</param-value>
> > > >  </context-param>
> > > >  <servlet>
> > > >    <servlet-name>faces</servlet-name>
> > > >
> > >
>  <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
> > > >    <load-on-startup>1</load-on-startup>
> > > >  </servlet>
> > > >  <servlet-mapping>
> > > >    <servlet-name>faces</servlet-name>
> > > >    <url-pattern>*.jsf</url-pattern>
> > > >  </servlet-mapping>
> > > >  <servlet-mapping>
> > > >    <servlet-name>faces</servlet-name>
> > > >    <url-pattern>*.faces</url-pattern>
> > > >  </servlet-mapping>
> > > >  <listener>
> > > >
> > > >
> > > >
> > >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > > >  </listener>
> > > >  <context-param>
> > > >    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> > > >    <param-value>netwave.utils.ErrorHandler</param-value>
> > > >  </context-param>
> > > >  <filter>
> > > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > > >
> > > >
> > > >
> > >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> > > >      <init-param>
> > > >          <param-name>uploadMaxFileSize</param-name>
> > > >          <param-value>20m</param-value>
> > > >      </init-param>
> > > >  </filter>
> > > >  <filter-mapping>
> > > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > > >      <servlet-name>Faces Servlet</servlet-name>
> > > >  </filter-mapping>
> > > >  <filter-mapping>
> > > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > > >      <url-pattern>/faces/*</url-pattern>
> > > >  </filter-mapping>
> > > >  <filter>
> > > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > > >
> > >
>  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> > > >  </filter>
> > > >  <filter-mapping>
> > > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > > >    <url-pattern>/*</url-pattern>
> > > >  </filter-mapping>
> > > >  <error-page>
> > > >
> > > >
> > > >
> > >
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> > > >    <location>/session_expired.jsp</location>
> > > >  </error-page>
> > > > </web-app>
> > > >
> > > > login.jsp:
> > > >
> > > > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > > > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > > > <html>
> > > > <head>
> > > > <meta http-equiv="Content-Type" content="text/html;
> > charset=ISO-8859-1">
> > > > <title>Login aziende</title>
> > > > </head>
> > > > <body>
> > > > <center><h1>Elenco aziende</h1></center>
> > > > <f:view>
> > > > <h:form id="login">
> > > >    <p>Entra</p>
> > > >    <p>Username: <h:inputText
> > > > value="#{BB_Aziende.userid}"></h:inputText></p>
> > > >    <p>Password: <h:inputSecret
> > > > value="#{BB_Aziende.password}"></h:inputSecret></p>
> > > >    <h:commandButton value="Login"
> > > > action="#{BB_Aziende.Login}"></h:commandButton>
> > > > </h:form>
> > > > </f:view>
> > > > </body>
> > > > </html>
> > > >
> > > > query.jsp:
> > > >
> > > > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > > > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > > > <%@ taglib prefix="t"  uri="http://myfaces.apache.org/tomahawk"%>
> > > >
> > > > <f:view>
> > > > <f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
> > > > <t:document>
> > > > <t:documentHead>
> > > > <meta http-equiv="Content-Type" content="text/html;
> > charset=ISO-8859-1">
> > > > <title>Benvenuto</title>
> > > > <style type="text/css">
> > > >    <!--
> > > >    .highlight { background-color: #A8D1E8; color=blue;}
> > > >    -->
> > > > </style>
> > > > </t:documentHead>
> > > > <t:documentBody>
> > > > <h:form id="queryaziende">
> > > >    <p>Benvenuto <h:outputLabel
> > > >
> value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
> > > > value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
> > > >    <p>Provincia: <h:selectOneMenu
> > > value="#{BB_Aziende.azienda.provincia}">
> > > >        <f:selectItems value="#{BB_Aziende.province}"/>
> > > >    </h:selectOneMenu>
> > > >    Stato: <h:selectOneMenu
> > value="#{BB_Aziende.azienda.noninteressato}">
> > > >        <f:selectItems value="#{BB_Aziende.stati}"/>
> > > >    </h:selectOneMenu></p>
> > > >    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
> > > > popupCalendar="true" required="true">
> > > >        <f:validator validatorId="checkvaliddate"/>
> > > >    </t:inputDate>
> > > >    <t:commandButton value="Query"
> > > > action="#{BB_Aziende.Queryaziende}"></t:commandButton>
> > > > </h:form>
> > > > </t:documentBody>
> > > > </t:document>
> > > > </f:view>
> > > >
> > > > Thank you in advance, best regards
> > > >
> > > > Fabio Ferrari
> > > >
> > > > P. S. Non è possibile che qualsiasi cosa scrivo venga rigettata per
> > spam.
> > > > Ma
> > > > lo fate apposta?
> > > >
> > >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
You're welcome!

Which url are you using to access the JSF-page in the browser?

Also: can you please provide the portion of the HTML that is supposed to
include the javascript (something like <script language="javascript"
type="text/javascript" src="..."></script>).

Regards,
Jakob

2010/3/23 Fabio F. <fa...@gmail.com>

> Thank you Jakob for the help, I tried to modify my web.xml but the problem
> is the same.
>
> This is my new web.xml file, any other idea?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> http://java.sun.com/xml/ns/javaee" xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> version="2.5">
>  <display-name>telemarketing</display-name>
>  <welcome-file-list>
>    <welcome-file>index.html</welcome-file>
>    <welcome-file>index.htm</welcome-file>
>    <welcome-file>index.jsp</welcome-file>
>    <welcome-file>default.html</welcome-file>
>    <welcome-file>default.htm</welcome-file>
>    <welcome-file>default.jsp</welcome-file>
>  </welcome-file-list>
>   <context-param>
>    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
>    <param-value>resources.application</param-value>
>  </context-param>
>  <context-param>
>    <description>State saving method: 'client' or 'server' (=default). See
> JSF Specification 2.5.2</description>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>server</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    This parameter tells MyFaces if javascript code should be allowed in
>    the rendered HTML output.
>    If javascript is allowed, command_link anchors will have javascript code
>    that submits the corresponding form.
>    If javascript is not allowed, the state saving info and nested
> parameters
>    will be added as url parameters.
>    Default is 'true'</description>
>    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    If true, rendered HTML code will be formatted, so that it is
> 'human-readable'
>    i.e. additional line separators and whitespace will be written, that do
> not
>    influence the HTML code.
>    Default is 'true'</description>
>    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <context-param>
>    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
>    <param-value>false</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    If true, a javascript function will be rendered that is able to restore
> the
>    former vertical scroll on every request. Convenient feature if you have
> pages
>    with long lists and you do not want the browser page to always jump to
> the top
>    if you trigger a link or button action that stays on the same page.
>    Default is 'false'
> </description>
>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <servlet>
>    <servlet-name>faces</servlet-name>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>    <load-on-startup>1</load-on-startup>
>  </servlet>
>  <servlet-mapping>
>     <servlet-name>faces</servlet-name>
>    <url-pattern>/faces/*</url-pattern>
>  </servlet-mapping>
>  <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>  </listener>
>  <context-param>
>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
>    <param-value>netwave.utils.ErrorHandler</param-value>
>  </context-param>
>  <filter>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>
>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>      <init-param>
>          <param-name>uploadMaxFileSize</param-name>
>          <param-value>20m</param-value>
>      </init-param>
>  </filter>
>  <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>       <servlet-name>faces</servlet-name>
>   </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>*.jsf</url-pattern>
>   </filter-mapping>
>  <filter>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
>  </filter>
>  <filter-mapping>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <url-pattern>/*</url-pattern>
>  </filter-mapping>
>  <error-page>
>
>
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
>    <location>/session_expired.jsp</location>
>  </error-page>
> </web-app>
>
> Fabio Ferrari
>
> 2010/3/23 Jakob Korherr <ja...@gmail.com>
>
> > Hi Fabio,
> >
> > I saw that you have two FacesServlet definitions in your web.xml:
> >
> > --javax.faces.webapp.FacesServlet mapped for /faces/* named "Faces
> Servlet"
> > --org.apache.myfaces.webapp.MyFacesServlet mapped for *.jsf and *.faces
> > named "faces"
> >
> > And you also have installed the MyFacesExtensionsFilter for the servlet
> > "Faces Servlet" (the first one from above). This means the filter is only
> > working if you use /faces/* to call your JSF-page and not if you use
> *.jsf
> > or *.faces.
> >
> > This filter is responsible to serve the javascript for the HTML page, so
> it
> > has to be configured correctly to use javascript (or other tomahawk
> > resources).
> >
> > I would suggest that you remove the second servlet definition ("faces")
> > from
> > your web.xml because you just don't need it and, if you want them, add
> > *.jsf
> > and *.faces as mappings to "Faces Servlet".
> >
> > I guess this should make your webapp work!
> >
> > Regards,
> > Jakob
> >
> > 2010/3/23 Fabio F. <fa...@gmail.com>
> >
> > > Hello,
> > >
> > > I've installed Eclipse galileo with myfaces core 1.2.8 and
> > tomahawk12-1.1.9
> > > .
> > >
> > > I am able to get working the tomahawk tags that don't have javascript,
> > but
> > > not those who have them.
> > >
> > > For example, if in a <t:inputDate> tag set "popupCalendar=false" the
> page
> > > is
> > > working, if I set it to "true" it simply stops rendering the page,
> > becoming
> > > incomplete. No way to have an error message to debug.
> > >
> > > Is it a bug in tomahawk or am I missing something?
> > >
> > > Those are my files:
> > >
> > > web.xml:
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> > > http://java.sun.com/xml/ns/javaee" xmlns:web="
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="
> > > http://java.sun.com/xml/ns/javaee
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > > version="2.5">
> > >  <display-name>telemarketing</
> > > display-name>
> > >  <welcome-file-list>
> > >    <welcome-file>index.html</welcome-file>
> > >    <welcome-file>index.htm</welcome-file>
> > >    <welcome-file>index.jsp</welcome-file>
> > >    <welcome-file>default.html</welcome-file>
> > >    <welcome-file>default.htm</welcome-file>
> > >    <welcome-file>default.jsp</welcome-file>
> > >  </welcome-file-list>
> > >  <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>
> > >  <context-param>
> > >
> >  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> > >    <param-value>resources.application</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>State saving method: 'client' or 'server' (=default).
> See
> > > JSF Specification 2.5.2</description>
> > >    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > >    <param-value>server</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>
> > >    This parameter tells MyFaces if javascript code should be allowed in
> > >    the rendered HTML output.
> > >    If javascript is allowed, command_link anchors will have javascript
> > code
> > >    that submits the corresponding form.
> > >    If javascript is not allowed, the state saving info and nested
> > > parameters
> > >    will be added as url parameters.
> > >    Default is 'true'</description>
> > >    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> > >    <param-value>true</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>
> > >    If true, rendered HTML code will be formatted, so that it is
> > > 'human-readable'
> > >    i.e. additional line separators and whitespace will be written, that
> > do
> > > not
> > >    influence the HTML code.
> > >    Default is 'true'</description>
> > >    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> > >    <param-value>true</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> > >    <param-value>false</param-value>
> > >  </context-param>
> > >  <context-param>
> > >    <description>
> > >    If true, a javascript function will be rendered that is able to
> > restore
> > > the
> > >    former vertical scroll on every request. Convenient feature if you
> > have
> > > pages
> > >    with long lists and you do not want the browser page to always jump
> to
> > > the top
> > >    if you trigger a link or button action that stays on the same page.
> > >    Default is 'false'
> > > </description>
> > >    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> > >    <param-value>true</param-value>
> > >  </context-param>
> > >  <servlet>
> > >    <servlet-name>faces</servlet-name>
> > >
> >  <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
> > >    <load-on-startup>1</load-on-startup>
> > >  </servlet>
> > >  <servlet-mapping>
> > >    <servlet-name>faces</servlet-name>
> > >    <url-pattern>*.jsf</url-pattern>
> > >  </servlet-mapping>
> > >  <servlet-mapping>
> > >    <servlet-name>faces</servlet-name>
> > >    <url-pattern>*.faces</url-pattern>
> > >  </servlet-mapping>
> > >  <listener>
> > >
> > >
> > >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > >  </listener>
> > >  <context-param>
> > >    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> > >    <param-value>netwave.utils.ErrorHandler</param-value>
> > >  </context-param>
> > >  <filter>
> > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >
> > >
> > >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> > >      <init-param>
> > >          <param-name>uploadMaxFileSize</param-name>
> > >          <param-value>20m</param-value>
> > >      </init-param>
> > >  </filter>
> > >  <filter-mapping>
> > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >      <servlet-name>Faces Servlet</servlet-name>
> > >  </filter-mapping>
> > >  <filter-mapping>
> > >      <filter-name>MyFacesExtensionsFilter</filter-name>
> > >      <url-pattern>/faces/*</url-pattern>
> > >  </filter-mapping>
> > >  <filter>
> > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > >
> >  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> > >  </filter>
> > >  <filter-mapping>
> > >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> > >    <url-pattern>/*</url-pattern>
> > >  </filter-mapping>
> > >  <error-page>
> > >
> > >
> > >
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> > >    <location>/session_expired.jsp</location>
> > >  </error-page>
> > > </web-app>
> > >
> > > login.jsp:
> > >
> > > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > > <html>
> > > <head>
> > > <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> > > <title>Login aziende</title>
> > > </head>
> > > <body>
> > > <center><h1>Elenco aziende</h1></center>
> > > <f:view>
> > > <h:form id="login">
> > >    <p>Entra</p>
> > >    <p>Username: <h:inputText
> > > value="#{BB_Aziende.userid}"></h:inputText></p>
> > >    <p>Password: <h:inputSecret
> > > value="#{BB_Aziende.password}"></h:inputSecret></p>
> > >    <h:commandButton value="Login"
> > > action="#{BB_Aziende.Login}"></h:commandButton>
> > > </h:form>
> > > </f:view>
> > > </body>
> > > </html>
> > >
> > > query.jsp:
> > >
> > > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > > <%@ taglib prefix="t"  uri="http://myfaces.apache.org/tomahawk"%>
> > >
> > > <f:view>
> > > <f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
> > > <t:document>
> > > <t:documentHead>
> > > <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> > > <title>Benvenuto</title>
> > > <style type="text/css">
> > >    <!--
> > >    .highlight { background-color: #A8D1E8; color=blue;}
> > >    -->
> > > </style>
> > > </t:documentHead>
> > > <t:documentBody>
> > > <h:form id="queryaziende">
> > >    <p>Benvenuto <h:outputLabel
> > > value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
> > > value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
> > >    <p>Provincia: <h:selectOneMenu
> > value="#{BB_Aziende.azienda.provincia}">
> > >        <f:selectItems value="#{BB_Aziende.province}"/>
> > >    </h:selectOneMenu>
> > >    Stato: <h:selectOneMenu
> value="#{BB_Aziende.azienda.noninteressato}">
> > >        <f:selectItems value="#{BB_Aziende.stati}"/>
> > >    </h:selectOneMenu></p>
> > >    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
> > > popupCalendar="true" required="true">
> > >        <f:validator validatorId="checkvaliddate"/>
> > >    </t:inputDate>
> > >    <t:commandButton value="Query"
> > > action="#{BB_Aziende.Queryaziende}"></t:commandButton>
> > > </h:form>
> > > </t:documentBody>
> > > </t:document>
> > > </f:view>
> > >
> > > Thank you in advance, best regards
> > >
> > > Fabio Ferrari
> > >
> > > P. S. Non è possibile che qualsiasi cosa scrivo venga rigettata per
> spam.
> > > Ma
> > > lo fate apposta?
> > >
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by "Fabio F." <fa...@gmail.com>.
Thank you Jakob for the help, I tried to modify my web.xml but the problem
is the same.

This is my new web.xml file, any other idea?

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:web="
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
  <display-name>telemarketing</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See
JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>
  <context-param>
    <description>
    This parameter tells MyFaces if javascript code should be allowed in
    the rendered HTML output.
    If javascript is allowed, command_link anchors will have javascript code
    that submits the corresponding form.
    If javascript is not allowed, the state saving info and nested
parameters
    will be added as url parameters.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>
    If true, rendered HTML code will be formatted, so that it is
'human-readable'
    i.e. additional line separators and whitespace will be written, that do
not
    influence the HTML code.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
  </context-param>
  <context-param>
    <description>
    If true, a javascript function will be rendered that is able to restore
the
    former vertical scroll on every request. Convenient feature if you have
pages
    with long lists and you do not want the browser page to always jump to
the top
    if you trigger a link or button action that stays on the same page.
    Default is 'false'
</description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>
  <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
  <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
    <param-value>netwave.utils.ErrorHandler</param-value>
  </context-param>
  <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
          <param-name>uploadMaxFileSize</param-name>
          <param-value>20m</param-value>
      </init-param>
  </filter>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>faces</servlet-name>
  </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>*.jsf</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <error-page>

<exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/session_expired.jsp</location>
  </error-page>
</web-app>

Fabio Ferrari

2010/3/23 Jakob Korherr <ja...@gmail.com>

> Hi Fabio,
>
> I saw that you have two FacesServlet definitions in your web.xml:
>
> --javax.faces.webapp.FacesServlet mapped for /faces/* named "Faces Servlet"
> --org.apache.myfaces.webapp.MyFacesServlet mapped for *.jsf and *.faces
> named "faces"
>
> And you also have installed the MyFacesExtensionsFilter for the servlet
> "Faces Servlet" (the first one from above). This means the filter is only
> working if you use /faces/* to call your JSF-page and not if you use *.jsf
> or *.faces.
>
> This filter is responsible to serve the javascript for the HTML page, so it
> has to be configured correctly to use javascript (or other tomahawk
> resources).
>
> I would suggest that you remove the second servlet definition ("faces")
> from
> your web.xml because you just don't need it and, if you want them, add
> *.jsf
> and *.faces as mappings to "Faces Servlet".
>
> I guess this should make your webapp work!
>
> Regards,
> Jakob
>
> 2010/3/23 Fabio F. <fa...@gmail.com>
>
> > Hello,
> >
> > I've installed Eclipse galileo with myfaces core 1.2.8 and
> tomahawk12-1.1.9
> > .
> >
> > I am able to get working the tomahawk tags that don't have javascript,
> but
> > not those who have them.
> >
> > For example, if in a <t:inputDate> tag set "popupCalendar=false" the page
> > is
> > working, if I set it to "true" it simply stops rendering the page,
> becoming
> > incomplete. No way to have an error message to debug.
> >
> > Is it a bug in tomahawk or am I missing something?
> >
> > Those are my files:
> >
> > web.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> > http://java.sun.com/xml/ns/javaee" xmlns:web="
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> > http://java.sun.com/xml/ns/javaee
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> > version="2.5">
> >  <display-name>telemarketing</
> > display-name>
> >  <welcome-file-list>
> >    <welcome-file>index.html</welcome-file>
> >    <welcome-file>index.htm</welcome-file>
> >    <welcome-file>index.jsp</welcome-file>
> >    <welcome-file>default.html</welcome-file>
> >    <welcome-file>default.htm</welcome-file>
> >    <welcome-file>default.jsp</welcome-file>
> >  </welcome-file-list>
> >  <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>
> >  <context-param>
> >
>  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> >    <param-value>resources.application</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>State saving method: 'client' or 'server' (=default). See
> > JSF Specification 2.5.2</description>
> >    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> >    <param-value>server</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>
> >    This parameter tells MyFaces if javascript code should be allowed in
> >    the rendered HTML output.
> >    If javascript is allowed, command_link anchors will have javascript
> code
> >    that submits the corresponding form.
> >    If javascript is not allowed, the state saving info and nested
> > parameters
> >    will be added as url parameters.
> >    Default is 'true'</description>
> >    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
> >    <param-value>true</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>
> >    If true, rendered HTML code will be formatted, so that it is
> > 'human-readable'
> >    i.e. additional line separators and whitespace will be written, that
> do
> > not
> >    influence the HTML code.
> >    Default is 'true'</description>
> >    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> >    <param-value>true</param-value>
> >  </context-param>
> >  <context-param>
> >    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
> >    <param-value>false</param-value>
> >  </context-param>
> >  <context-param>
> >    <description>
> >    If true, a javascript function will be rendered that is able to
> restore
> > the
> >    former vertical scroll on every request. Convenient feature if you
> have
> > pages
> >    with long lists and you do not want the browser page to always jump to
> > the top
> >    if you trigger a link or button action that stays on the same page.
> >    Default is 'false'
> > </description>
> >    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> >    <param-value>true</param-value>
> >  </context-param>
> >  <servlet>
> >    <servlet-name>faces</servlet-name>
> >
>  <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
> >    <load-on-startup>1</load-on-startup>
> >  </servlet>
> >  <servlet-mapping>
> >    <servlet-name>faces</servlet-name>
> >    <url-pattern>*.jsf</url-pattern>
> >  </servlet-mapping>
> >  <servlet-mapping>
> >    <servlet-name>faces</servlet-name>
> >    <url-pattern>*.faces</url-pattern>
> >  </servlet-mapping>
> >  <listener>
> >
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >  </listener>
> >  <context-param>
> >    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
> >    <param-value>netwave.utils.ErrorHandler</param-value>
> >  </context-param>
> >  <filter>
> >      <filter-name>MyFacesExtensionsFilter</filter-name>
> >
> >
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> >      <init-param>
> >          <param-name>uploadMaxFileSize</param-name>
> >          <param-value>20m</param-value>
> >      </init-param>
> >  </filter>
> >  <filter-mapping>
> >      <filter-name>MyFacesExtensionsFilter</filter-name>
> >      <servlet-name>Faces Servlet</servlet-name>
> >  </filter-mapping>
> >  <filter-mapping>
> >      <filter-name>MyFacesExtensionsFilter</filter-name>
> >      <url-pattern>/faces/*</url-pattern>
> >  </filter-mapping>
> >  <filter>
> >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> >
>  <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
> >  </filter>
> >  <filter-mapping>
> >    <filter-name>CustomCharacterEncodingFilter</filter-name>
> >    <url-pattern>/*</url-pattern>
> >  </filter-mapping>
> >  <error-page>
> >
> >
> >
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
> >    <location>/session_expired.jsp</location>
> >  </error-page>
> > </web-app>
> >
> > login.jsp:
> >
> > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Login aziende</title>
> > </head>
> > <body>
> > <center><h1>Elenco aziende</h1></center>
> > <f:view>
> > <h:form id="login">
> >    <p>Entra</p>
> >    <p>Username: <h:inputText
> > value="#{BB_Aziende.userid}"></h:inputText></p>
> >    <p>Password: <h:inputSecret
> > value="#{BB_Aziende.password}"></h:inputSecret></p>
> >    <h:commandButton value="Login"
> > action="#{BB_Aziende.Login}"></h:commandButton>
> > </h:form>
> > </f:view>
> > </body>
> > </html>
> >
> > query.jsp:
> >
> > <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> > <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> > <%@ taglib prefix="t"  uri="http://myfaces.apache.org/tomahawk"%>
> >
> > <f:view>
> > <f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
> > <t:document>
> > <t:documentHead>
> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> > <title>Benvenuto</title>
> > <style type="text/css">
> >    <!--
> >    .highlight { background-color: #A8D1E8; color=blue;}
> >    -->
> > </style>
> > </t:documentHead>
> > <t:documentBody>
> > <h:form id="queryaziende">
> >    <p>Benvenuto <h:outputLabel
> > value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
> > value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
> >    <p>Provincia: <h:selectOneMenu
> value="#{BB_Aziende.azienda.provincia}">
> >        <f:selectItems value="#{BB_Aziende.province}"/>
> >    </h:selectOneMenu>
> >    Stato: <h:selectOneMenu value="#{BB_Aziende.azienda.noninteressato}">
> >        <f:selectItems value="#{BB_Aziende.stati}"/>
> >    </h:selectOneMenu></p>
> >    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
> > popupCalendar="true" required="true">
> >        <f:validator validatorId="checkvaliddate"/>
> >    </t:inputDate>
> >    <t:commandButton value="Query"
> > action="#{BB_Aziende.Queryaziende}"></t:commandButton>
> > </h:form>
> > </t:documentBody>
> > </t:document>
> > </f:view>
> >
> > Thank you in advance, best regards
> >
> > Fabio Ferrari
> >
> > P. S. Non è possibile che qualsiasi cosa scrivo venga rigettata per spam.
> > Ma
> > lo fate apposta?
> >
>

Re: Tomahawk and eclipse galileo not working?

Posted by Jakob Korherr <ja...@gmail.com>.
Hi Fabio,

I saw that you have two FacesServlet definitions in your web.xml:

--javax.faces.webapp.FacesServlet mapped for /faces/* named "Faces Servlet"
--org.apache.myfaces.webapp.MyFacesServlet mapped for *.jsf and *.faces
named "faces"

And you also have installed the MyFacesExtensionsFilter for the servlet
"Faces Servlet" (the first one from above). This means the filter is only
working if you use /faces/* to call your JSF-page and not if you use *.jsf
or *.faces.

This filter is responsible to serve the javascript for the HTML page, so it
has to be configured correctly to use javascript (or other tomahawk
resources).

I would suggest that you remove the second servlet definition ("faces") from
your web.xml because you just don't need it and, if you want them, add *.jsf
and *.faces as mappings to "Faces Servlet".

I guess this should make your webapp work!

Regards,
Jakob

2010/3/23 Fabio F. <fa...@gmail.com>

> Hello,
>
> I've installed Eclipse galileo with myfaces core 1.2.8 and tomahawk12-1.1.9
> .
>
> I am able to get working the tomahawk tags that don't have javascript, but
> not those who have them.
>
> For example, if in a <t:inputDate> tag set "popupCalendar=false" the page
> is
> working, if I set it to "true" it simply stops rendering the page, becoming
> incomplete. No way to have an error message to debug.
>
> Is it a bug in tomahawk or am I missing something?
>
> Those are my files:
>
> web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
> http://java.sun.com/xml/ns/javaee" xmlns:web="
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> version="2.5">
>  <display-name>telemarketing</
> display-name>
>  <welcome-file-list>
>    <welcome-file>index.html</welcome-file>
>    <welcome-file>index.htm</welcome-file>
>    <welcome-file>index.jsp</welcome-file>
>    <welcome-file>default.html</welcome-file>
>    <welcome-file>default.htm</welcome-file>
>    <welcome-file>default.jsp</welcome-file>
>  </welcome-file-list>
>  <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>
>  <context-param>
>    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
>    <param-value>resources.application</param-value>
>  </context-param>
>  <context-param>
>    <description>State saving method: 'client' or 'server' (=default). See
> JSF Specification 2.5.2</description>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>server</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    This parameter tells MyFaces if javascript code should be allowed in
>    the rendered HTML output.
>    If javascript is allowed, command_link anchors will have javascript code
>    that submits the corresponding form.
>    If javascript is not allowed, the state saving info and nested
> parameters
>    will be added as url parameters.
>    Default is 'true'</description>
>    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    If true, rendered HTML code will be formatted, so that it is
> 'human-readable'
>    i.e. additional line separators and whitespace will be written, that do
> not
>    influence the HTML code.
>    Default is 'true'</description>
>    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <context-param>
>    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
>    <param-value>false</param-value>
>  </context-param>
>  <context-param>
>    <description>
>    If true, a javascript function will be rendered that is able to restore
> the
>    former vertical scroll on every request. Convenient feature if you have
> pages
>    with long lists and you do not want the browser page to always jump to
> the top
>    if you trigger a link or button action that stays on the same page.
>    Default is 'false'
> </description>
>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <servlet>
>    <servlet-name>faces</servlet-name>
>    <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
>    <load-on-startup>1</load-on-startup>
>  </servlet>
>  <servlet-mapping>
>    <servlet-name>faces</servlet-name>
>    <url-pattern>*.jsf</url-pattern>
>  </servlet-mapping>
>  <servlet-mapping>
>    <servlet-name>faces</servlet-name>
>    <url-pattern>*.faces</url-pattern>
>  </servlet-mapping>
>  <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>  </listener>
>  <context-param>
>    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
>    <param-value>netwave.utils.ErrorHandler</param-value>
>  </context-param>
>  <filter>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>
>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>      <init-param>
>          <param-name>uploadMaxFileSize</param-name>
>          <param-value>20m</param-value>
>      </init-param>
>  </filter>
>  <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>      <servlet-name>Faces Servlet</servlet-name>
>  </filter-mapping>
>  <filter-mapping>
>      <filter-name>MyFacesExtensionsFilter</filter-name>
>      <url-pattern>/faces/*</url-pattern>
>  </filter-mapping>
>  <filter>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
>  </filter>
>  <filter-mapping>
>    <filter-name>CustomCharacterEncodingFilter</filter-name>
>    <url-pattern>/*</url-pattern>
>  </filter-mapping>
>  <error-page>
>
>
> <exception-type>javax.faces.application.ViewExpiredException</exception-type>
>    <location>/session_expired.jsp</location>
>  </error-page>
> </web-app>
>
> login.jsp:
>
> <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Login aziende</title>
> </head>
> <body>
> <center><h1>Elenco aziende</h1></center>
> <f:view>
> <h:form id="login">
>    <p>Entra</p>
>    <p>Username: <h:inputText
> value="#{BB_Aziende.userid}"></h:inputText></p>
>    <p>Password: <h:inputSecret
> value="#{BB_Aziende.password}"></h:inputSecret></p>
>    <h:commandButton value="Login"
> action="#{BB_Aziende.Login}"></h:commandButton>
> </h:form>
> </f:view>
> </body>
> </html>
>
> query.jsp:
>
> <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
> <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
> <%@ taglib prefix="t"  uri="http://myfaces.apache.org/tomahawk"%>
>
> <f:view>
> <f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
> <t:document>
> <t:documentHead>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Benvenuto</title>
> <style type="text/css">
>    <!--
>    .highlight { background-color: #A8D1E8; color=blue;}
>    -->
> </style>
> </t:documentHead>
> <t:documentBody>
> <h:form id="queryaziende">
>    <p>Benvenuto <h:outputLabel
> value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
> value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
>    <p>Provincia: <h:selectOneMenu value="#{BB_Aziende.azienda.provincia}">
>        <f:selectItems value="#{BB_Aziende.province}"/>
>    </h:selectOneMenu>
>    Stato: <h:selectOneMenu value="#{BB_Aziende.azienda.noninteressato}">
>        <f:selectItems value="#{BB_Aziende.stati}"/>
>    </h:selectOneMenu></p>
>    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
> popupCalendar="true" required="true">
>        <f:validator validatorId="checkvaliddate"/>
>    </t:inputDate>
>    <t:commandButton value="Query"
> action="#{BB_Aziende.Queryaziende}"></t:commandButton>
> </h:form>
> </t:documentBody>
> </t:document>
> </f:view>
>
> Thank you in advance, best regards
>
> Fabio Ferrari
>
> P. S. Non è possibile che qualsiasi cosa scrivo venga rigettata per spam.
> Ma
> lo fate apposta?
>