I don't really know what is going on. I am using Sitemesh 2.3, Tomahawk 1.1.6 and JSF RI 1.2. I wonder if I can zip content in this eMail list.
Here is my welcome.jsp (complete). Notice the alert(mensaje + " This is modified áñé"); line, if I don't use the org.apache.myfaces.component.html.util.StreamingAddResource class, it gets rendered as an HTML encoded, not desireable, but when I use org.apache.myfaces.component.html.util.StreamingAddResource then the resources are not resolved to client. What I am doing wrong? Have MyFaces developers seen these things? <[EMAIL PROTECTED] uri="http://java.sun.com/jsf/core" prefix="f"%> <[EMAIL PROTECTED] uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <f:view> <t:document> <t:documentHead> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="Eddy Johana Angarita Navarro" content="TRÉBOL Software S.A."> <title>Insert title here</title> <script language="javascript"> function a() { alert("a"); } function validaLongitud(texto, longitud, e, mensaje) { if (!e) e = window.event; if (!isEdicionKey(e) && (texto.value.length + 1) > longitud) { texto.value = texto.value.substring( 0, longitud); alert(mensaje + " This is modified áñé"); return false; } return true; } </script> </t:documentHead> <t:documentBody> <h:outputLabel value="{msg.welcome} {loginBean.name }"></h:outputLabel> <h:form> <t:inputDate id="date1" popupCalendar="true" /> <t:inputCalendar id="secondOne" monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" popupButtonStyleClass="standard_bold" currentDayCellClass="currentDayCell" value="11/12/2007" renderAsPopup="true" popupTodayString="Hoy es: " popupDateFormat="dd/MM/yyyy" popupWeekString="Sm" popupGotoString="Mes Actual" popupScrollLeftMessage="Ir al mes anterior" popupScrollRightMessage="Ir al próximo mes" popupSelectMonthMessage="Selecione el mes" popupSelectYearMessage="Selecione el año" popupSelectDateMessage="Selecione [date] como dato" helpText="DD/MM/YYYY" lang="es" title="Rowset 1" renderPopupButtonAsImage="true" forceId="true" /> </h:form> </t:documentBody> </t:document> </f:view> Here is my web.xml (complete) <?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>jsfsitemeshsimple</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> <filter> <filter-name>sitemesh</filter-name> <filter-class> com.opensymphony.module.sitemesh.filter.PageFilter </filter-class> </filter> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>MyFacesJSFServlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>MyFacesJSFServlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <context-param> <description> State saving method: "client" or "server" (= default) See JSF Specification 2.5.3 </description> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <context-param> <description> Only applicable if state saving method is "server" (= default). Defines the amount (default = 20) of the latest views are stored in session. </description> <param-name> org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION </param-name> <param-value>20</param-value> </context-param> <!-- <context-param> <description> A class implementing the org.apache.myfaces.shared.renderkit.html.util.AddResource interface. It is responsible to place scripts and css on the right position in your HTML document. Default: "org.apache.myfaces.renderkit.html.util.DefaultAddResource" Follow the description on the MyFaces-Wiki-Performance page to enable StreamingAddResource instead of DefaultAddResource if you want to gain performance. </description> <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> <param-value> c:\Temp\trash\T20\T3\org\apache\myfaces\renderkit\html\util\DefaultAddResource.class org.apache.myfaces.component.html.util.StreamingAddResource org.apache.myfaces.renderkit.html.util.DefaultAddResource </param-value> </context-param> --> <context-param> <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> <param-value> org.apache.myfaces.component.html.util.StreamingAddResource </param-value> </context-param> <context-param> <description> Change the url-pattern from the ExtensionsFilter Default is "/faces/myFacesExtensionResource" Note: The filter-mapping for ExtensionsFilter, the url-pattern is this value + "/*", else there comes a exception </description> <param-name> org.apache.myfaces.RESOURCE_VIRTUAL_PATH </param-name> <param-value>/faces/extensionResource</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: "true" </description> <param-name>org.apache.myfaces.PRETTY_HTML</param-name> <param-value>true</param-value> </context-param> <filter> <filter-name>extensionsFilter</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>uploadMaxFileSize</param-name> <param-value>100m</param-value> </init-param> <init-param> <description> Set the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description> <param-name>uploadThresholdSize</param-name> <param-value>100k</param-value> </init-param> </filter> <filter-mapping> <filter-name>extensionsFilter</filter-name> <url-pattern>*.jsf</url-pattern> </filter-mapping> <filter-mapping> <filter-name>extensionsFilter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> </web-app> -----Mensaje original----- De: David Delbecq [mailto:[EMAIL PROTECTED] Enviado el: Tuesday, December 18, 2007 8:08 AM Para: MyFaces Discussion Asunto: Re: Is this a BUG in Tomahawk or am I using mistakenly? edit.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:s="http://myfaces.apache.org/sandbox" xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" xmlns:rich="http://richfaces.ajax4jsf.org/rich" xmlns:i="http://www.meteo.be/Intranet-Jsf"> <ui:composition template="layout.xhtml"> <ui:param name="title" value="Edit Employee" /> <ui:define name="content"> <h:form acceptcharset="UTF-8" id="employeeForm" rendered="#{hrSession.employee != null}" enctype="multipart/form-data"> ..... <t:inputCalendar id="birthdate" value="#{hrSession.employee.birthDate}" popupTodayString="" renderAsPopup="true" renderPopupButtonAsImage="true" popupDateFormat="dd MMMM yyyy"> <f:convertDateTime pattern="dd MMMM yyyy" timeZone="Europe/Paris" /> </t:inputCalendar> <h:message styleClass="warning" for="birthdate"/> ......... </h:form> </ui:define> </ui:composition> layout.xhtml: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:ui="http://java.sun.com/jsf/facelets" locale="#{strutsSession.locale}"> <t:document> <t:documentHead> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/workflow.css" /> ..... </t:documentHead> <t:documentBody> <div><ui:insert name="content" /></div> </t:documentBody> </t:document> </f:view> web.xml: .... <context-param> <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> <param-value> org.apache.myfaces.component.html.util.StreamingAddResource </param-value> </context-param> .... <!-- Set up the tomahawk 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>50m</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-name> </filter-mapping> .... En l'instant précis du 18/12/07 13:58, Carlos Adolfo Ortiz Quiros s'exprimait en ces termes: > Well, then something must be missing, or something was not correctly setup. > Do you have sample code you can post here? > Have you flushed all of your browser contents so it gets fresh resources? > Perhaps I can prepare sample code if it also helps! > > -----Mensaje original----- > De: david delbecq [mailto:[EMAIL PROTECTED] > Enviado el: Monday, December 17, 2007 5:43 PM > Para: MyFaces Discussion > Asunto: Re: Is this a BUG in Tomahawk or am I using mistakenly? > > Using streamin addressouces with calendar and popup and image without > troubles here. > Ensure your t:document is inside a f:view. Note that we are using > facelets, maybe this change behaviour somehow, but it shouldn't > Carlos Adolfo Ortiz Quiros a écrit : > >> I tried that too. It keeps bugging me. >> It is simple if you make the test page. >> org.apache.myfaces.component.html.util.StreamingAddResource and a JSF/JSP >> page with only the inputCalendar with the properties I give here, and you >> should get the same error, shouldn't it? >> >> -----Mensaje original----- >> De: david delbecq [mailto:[EMAIL PROTECTED] >> Enviado el: Monday, December 17, 2007 5:06 PM >> Para: MyFaces Discussion >> Asunto: Re: Is this a BUG in Tomahawk or am I using mistakenly? >> >> StreamingAddRessource requires you to use t:document, t:documentBody and >> t:documentHead tags to indicagte where document start, where body start >> and where head start. >> >> Carlos Adolfo Ortiz Quiros a écrit : >> >> >>> Hi >>> >>> >>> I have this >>> >>> <context-param> >>> <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> >>> >>> <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value> >>> </context-param> >>> >>> >>> >>> I need to use this because I need special characters in my HTML >>> rendered code such as áéñ, etc and shown in an alert in the javascript >>> code included in a page (The people would require this if using >>> non-latin characters). This works fine, but when I use it with the >>> <t:inputCalendar> component of the Tomahawk distribution, with the >>> [renderAsPopup="true"] and [renderPopupButtonAsImage="true"] >>> properties, it does not work as the resources are not found for some >>> reason. >>> >>> >>> >>> This is a bug, please check it out, I am an user for the framework, >>> not a committer or developer of it. >>> >>> >>> >>> >>> >>> **CARLOS ADOLFO ORTIZ Q** >>> >>> Ingeniero de Desarrollo >>> >>> **TRÉBOL Software S.A.****** >>> >>> Tel : (574)3110663 Fax : (574)3113474 >>> >>> Dirección Cll 16 # 28-195 >>> >>> Medellín - Colombia >>> >>> http://www.trebol.com.co <http://www.trebol.com.co/> >>> >>> >>> >>> La información de este mensaje y sus anexos son propiedad exclusiva >>> de Axede S.A. Es únicamente para el uso del destinatario >>> intencional y pueden contener información de carácter privado o >>> confidencial. Le informamos que cualquier revisión, retransmisión, >>> divulgación, copia o uso indebido del mismo está estrictamente >>> prohibida y será sancionada legalmente. >>> >>> >>> >>> Information contained in this message and every attachment is property of >>> Axede S.A. Only the destiny user is able to make use of the data here >>> contained, which is private and/or confidential. Any revision, >>> broadcasting, spreading, copy or illegal use of this information is >>> strictly prohibited and will be sanctioned by legal means. >>> >>> >> >> La información de este mensaje y sus anexos son propiedad exclusiva >> de Axede S.A. Es únicamente para el uso del destinatario >> intencional y pueden contener información de carácter privado o >> confidencial. Le informamos que cualquier revisión, retransmisión, >> divulgación, copia o uso indebido del mismo está estrictamente >> prohibida y será sancionada legalmente. >> >> >> >> Information contained in this message and every attachment is property of >> Axede S.A. Only the destiny user is able to make use of the data here >> contained, which is private and/or confidential. Any revision, broadcasting, >> spreading, copy or illegal use of this information is strictly prohibited >> and will be sanctioned by legal means. >> >> > > > > La información de este mensaje y sus anexos son propiedad exclusiva > de Axede S.A. Es únicamente para el uso del destinatario > intencional y pueden contener información de carácter privado o > confidencial. Le informamos que cualquier revisión, retransmisión, > divulgación, copia o uso indebido del mismo está estrictamente > prohibida y será sancionada legalmente. > > > > Information contained in this message and every attachment is property of > Axede S.A. Only the destiny user is able to make use of the data here > contained, which is private and/or confidential. Any revision, broadcasting, > spreading, copy or illegal use of this information is strictly prohibited and > will be sanctioned by legal means. > -- http://www.devlog.be (a belgian developer's logs) La información de este mensaje y sus anexos son propiedad exclusiva de Axede S.A. Es únicamente para el uso del destinatario intencional y pueden contener información de carácter privado o confidencial. Le informamos que cualquier revisión, retransmisión, divulgación, copia o uso indebido del mismo está estrictamente prohibida y será sancionada legalmente. Information contained in this message and every attachment is property of Axede S.A. Only the destiny user is able to make use of the data here contained, which is private and/or confidential. Any revision, broadcasting, spreading, copy or illegal use of this information is strictly prohibited and will be sanctioned by legal means.