RE: SEVERE: Error configuring application listener of class
Tony, I don't believe the examples for Tomahawk have been updated yet. The ServletContextListener should be in the utils subpackage (Check your tomahawk jar for the full package name of the update ServletContextListener class. I believe it was discussed earlier this week on this list. Regards, David -Original Message- From: tony k [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 10:12 PM To: users@myfaces.apache.org Subject: SEVERE: Error configuring application listener of class getting the following spew (see below) when trying to run tomahawk examples as downloaded from: https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/examples/simple oddly, the example app seems to come up ok, but i had an app that i was working on that receives the same error and then doesn't come up ok. wondering if the error below is ignorable, or is some how related to my problem. any suggestions appreciated! ;) here are some other details: myfaces-1.1.3 (with associated dependencies) tomahawk-1.1.2 eclipse+wtp 1.5rc2 tomcat 5.5.16 SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) May 17, 2006 9:58:35 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) May 17, 2006 9:58:35 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart May 17, 2006 9:58:35 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/facesExamples] startup failed due to previous errors -- View this message in context: http://www.nabble.com/SEVERE%3A-Error-configuring-application-listener-of-class-t1640412.html#a4443170 Sent from the MyFaces - Users forum at Nabble.com.
RE: How to improve JSF performance?
Tomahawk is a inside the optional MyFaces Tomahawk component jar. See: http://myfaces.apache.org/tomahawk/ Specifically, the last 3 notes on that page. Regards, David -Original Message- From: Yasushi Okubo [mailto:[EMAIL PROTECTED] Sent: Friday, May 19, 2006 2:05 PM To: MyFaces Discussion Subject: Re: How to improve JSF performance? Hi, Gerald Could you advise where I can find t:document TLD ? Is it in tomahawk extension inside myfaces1,1/1.1.1 ? I cannot find this tag in documentation. Thanks, yasushi Gerald Müllan wrote: Performance measurements have shown that plain server side state saving (without serialization and without compressing state) comes with the best values. Also usage of StreamingAddResource brings about 20% performance improvements. Apart from that, using JSP as page description slows down. Facelets would be the better choice concerning performance. cheers, Gerald On 5/19/06, Murat Hazer [EMAIL PROTECTED] wrote: did you see this on the wiki http://wiki.apache.org/myfaces/Performance regards... On 5/19/06, iSquareOne LLC [EMAIL PROTECTED] wrote: Hi, all, This is a bit tricky. We have two applications - one is built on pure JSP and the other one is built on JSF. We found the JSF application performance is much worse than the pure JSP application. We did not expect that much difference. JSF uses JSP page after all. So, what could have caused the slow down? Are there ways to improve JSF performance? We build the application on My Faces 1.1 and JBoss 4.0.2 Any thoughts are very welcome! Thanks in advance! - Shawn How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. -- Murat HAZER Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer Tel - Phone: +90 222 335 05 80 - 1395 Cep Tel - Mobile Phone: +90 532 472 00 63 Blog URL: http://www.projedunyasi.org Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/
RE: myfaces-commons-1.1.3.jar
It looks like those classes were moved slightly to a shared_tomahawk area like so: org.apache.myfaces.renderkit.RendererUtils.class BECAME: org.apache.myfaces.shared_tomahawk.renderkit.RenderUtils.class org.apache.myfaces.renderkit.html.HtmlRenderer.class BECAME: org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer.class to: Both are in tomahawk-1.1.2.jar. Remember, GREP or FIND is your friend. :) Regards, David -Original Message- From: Bill Schneider [mailto:[EMAIL PROTECTED] Sent: Sunday, May 14, 2006 7:32 PM To: users@myfaces.apache.org Subject: Re: myfaces-commons-1.1.3.jar There is no myfaces-commons anymore in the new release. Can you point us to the documentation where this is still stated, so we can fix it? http://myfaces.apache.org/javadoc.html refers to http://myfaces.apache.org/commons/apidocs/index.html which lists 'Commons 1.1.3-SNAPSHOT' I can't compile anything anymore--I have in my classpath myfaces-api-1.1.3.jar, myfaces-core-1.1.3.jar, tomahawk-1.1.2.jar, and none of these JARs contain essential classes such as org.apache.myfaces.renderkit.RendererUtils org.apache.myfaces.renderkit.html.HtmlRenderer etc. or am I supposed to change references to these classes to something else? -- Bill -- Bill Schneider Chief Architect Vecna Technologies, Inc. 5004 Lehigh Road College Park, MD 20740 [EMAIL PROTECTED] t: 240-737-1640 f: 301-699-3180
RE: Deployment warning: /WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES context parameter of the deployment descriptor
I didn't know MyFaces had added warnings like that. What version of MyFaces are you using? OR Is it something the Sun App server 8.2 is doing only on deploy or did you get that log entry every time you started your webapp? Nifty. Regards, David Friedman / [EMAIL PROTECTED] -Original Message-From: Cosma Colanicchia [mailto:[EMAIL PROTECTED]Sent: Tuesday, May 09, 2006 11:31 AMTo: MyFaces DiscussionSubject: Re: Deployment warning: /WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES context parameter of the deployment descriptorAFAIK, WEB-INF/faces-config.xml is loaded by default, you have to list only additional faces-config files in your web.xmlCosma 2006/5/9, Todd Patrick [EMAIL PROTECTED]: When I deploy a Myfaces based project to Sun Java System Application Server 8.2, I receive the following warning: [#|2006-05-09T10:13:14.005-0500|WARNING|sun-appserver-pe8.2|org.apache.myfaces.config.FacesConfigurator|_ThreadID=11;|/WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES context parameter of the deployment descriptor. This should be removed, as it will be loaded twice. See JSF spec 1.1, 10.3.2|#] Therefore, I went and looked at the JSF spec 1.1 as noted below. What should I be removing to clear this warning? I checked my web.xml file and it does have: context-paramparam-namejavax.faces.CONFIG_FILES/param-nameparam-value/WEB-INF/faces-config.xml/param-value/context-param Is it ok to remove this, since my faces-config.xml is in the /WEB-INF directory? I just want to double-check. Thanks, --Todd JSF spec 1.1, 10.3.2: At application startup time, before any requests are processed, the JSF implementation must process zero or more application configuration resources, located according to the following algorithm: Search for all resources named "META-INF/faces-config.xml" in the ServletContext resource paths for this web application, and load each as a JSF configuration resource (in reverse order of the order in which they are returned by getResources()). Check for the existence of a context initialization parameter named javax.faces.CONFIG_FILES. If it exists, treat it as a comma-delimited list of context relative resource paths (starting with a "/"), and load each of the specfied resources. Check for the existence of a web application configuration resource named "/WEB-INF/faces-config.xml", and load it if the resource exists. This algorithm provides considerable flexibility for developers that are assembling the components of a JSF-based web application. For example, an application might include one or more custom UIComponent implementations, along with associated Renderers, so it can declare them in an application resource named "/WEBINF/ faces-config.xml" with no need to programmatically register them with Application instance. In addition, the application might choose to include a component library (packaged as a JAR file) that includes a "META-INF/facesconfig. xml" resource. The existence of this resource causes components, renderers, and other JSF implementation classes that are stored in this library JAR file to be automatically registered, with no action required by the application. Chapter 10 Using JSF in Web Applications 10-11 XML parsing errors detected during the loading of an application resource file are fatal to application startup, and must cause the application to not be made available by the container. Whether or not a validating parse is performed is up to the JSF implementation; it is recommended that the JSF implementation provide a configuration parameter to control whether or not validation occurs.
RE: Warning: Please adjust your web.xml to use org.apache.myfaces.webapp.filter.ExtensionsFilter
If it helps, I have that class file in my copy of the 1.1.3 Tomahawk SNAPSHOT download. Regards, David -Original Message-From: Todd Patrick [mailto:[EMAIL PROTECTED]Sent: Tuesday, May 09, 2006 12:00 PMTo: MyFaces DiscussionSubject: Warning: Please adjust your web.xml to use org.apache.myfaces.webapp.filter.ExtensionsFilter I have: myfaces-core-1.1.3 tomahawk-1.1.2 Sun Java System Application Server 8.2 I receive the following warning when deploying my .war file: [#|2006-05-09T10:47:13.007-0500|WARNING|sun-appserver-pe8.2|org.apache.myfaces.component.html.util.ExtensionsFilter|_ThreadID=10;|Please adjust your web.xml to use org.apache.myfaces.webapp.filter.ExtensionsFilter|#] So, I checked the my-faces-impl-1.1.3.jar and to my surprise there is no package for "org.apache.myfaces.webapp.filter"??? Only "org.apache.myfaces.webapp", which has two class files: MyFacesServlet.class StartupServletContextListener.class What is the correct ExtensionsFilter path to use for my web.xml under myfaces-core-1.1.3 and tomahawk-1.1.2. Thanks, --Todd
RE: How do I properly use jsp:forward in MyFaces?
Todd, You need to get rid of the Tomahawk references, which is the only reason you would have the extensions filter. This note was on the front page of the myfaces.apache.org site: Please pay attention to the fact that you cannot use this release of MyFaces Core with the MyFaces Tomahawk library in version 1.1.1 - it will only work with the Tomahawk library in version 1.1.2 and onward. (The 1.1.2 release is currently only available as a nightly. The official release is expected in a few days.) Where "This release" is myfaces v 1.1.2 as you mentioned below. Getting rid of the extensions filter should clear some things up as long as you do not, for right now, plan on using the Tomahawk "t" taglib. For learning purposes, I recommend staying away from that taglib. Regards, David -Original Message-From: Todd Patrick [mailto:[EMAIL PROTECTED]Sent: Friday, May 05, 2006 12:29 PMTo: MyFaces DiscussionSubject: RE: How do I properly use jsp:forward in MyFaces? No errors in the log file. I changed my web.xml file to: ?xml version="1.0" encoding="UTF-8"?web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" context-param param-namecom.sun.faces.verifyObjects/param-name param-valuetrue/param-value /context-param context-param param-namecom.sun.faces.validateXml/param-name param-valuetrue/param-value /context-param context-param param-namejavax.faces.CONFIG_FILES/param-name param-value/WEB-INF/faces-config.xml/param-value /context-param context-param param-namejavax.faces.STATE_SAVING_METHOD/param-name param-valueclient/param-value /context-param context-param param-nameorg.apache.myfaces.ALLOW_JAVASCRIPT/param-name param-valuetrue/param-value /context-param context-param param-nameorg.apache.myfaces.DETECT_JAVASCRIPT/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.PRETTY_HTML/param-name param-valuetrue/param-value /context-param context-param param-nameorg.apache.myfaces.AUTO_SCROLL/param-name param-valuetrue/param-value /context-param context-param param-nameorg.apache.myfaces.CHECK_EXTENSIONS_FILTER/param-name param-valuetrue/param-value /context-param filter filter-nameMyFacesExtensionsFilter/filter-name filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class init-param param-namemaxFileSize/param-name param-value20m/param-value /init-param /filter filter-mapping filter-nameMyFacesExtensionsFilter/filter-name servlet-nameFaces Servlet/servlet-name /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern*.jsf/url-pattern /filter-mapping servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern*.jsf/url-pattern /servlet-mapping session-config session-timeout 30 /session-timeout /session-config welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list/web-app Plus, I changed the jsp-forward tag to: jsp:forward page="tbrowser.jsf"/ Now I get the same ole'error:javax.servlet.ServletException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered. What's interesting is when I look in the myfaces-impl-1.1.2.jar, the following package isn't there: org.apache.myfaces.webapp.filter Only: org.apache.myfaces.webapp What is going on? Geez... I did get the simple.war to work, blank.war had a _javascript_ error. Thanks, --Todd From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 10:22 AMTo: MyFaces DiscussionSubject: RE: How do I properly use jsp:forward in MyFaces? Todd, Does your web server have any startup errors in the log files for the /transactionbrowser web application? Also, have you put a simple/basic JSF page in /tbrowser.jsp and can you post it so we can check the syntax? Regards, David -Original Message-From: Cagatay Civici [mailto:[EMAIL PROTECTED]Sent: Friday, May 05, 2006 9:33 AMTo: MyFaces DiscussionSubject: Re: How do I properly use jsp:forward in MyFaces?Hi,Removing the "/" at the beginning may work,jsp:forward page="faces/tbrowser"/Cagatay On 5/5/06, Todd Patrick [EMAIL PROTECTED] wrote: OK, this is making s
RE: Oh so very very close - Filter Mapping Error still: ExtensionsFilter not correctly configured.
Todd,I really doubt you need it for learning MyFaces and I recommend you take those ExtensionFilter lines out of your web.xml until you get the hang of JSF. The core is basically equivalent to the JSF RI. Tomahawk is extra toys to play with and probably not even referenced in most older JSF books. And, since it has been changing lately and being moved into a separate set of package to help programmers see how distinct it is from the core, those books which do reference Tomahawk probably don't even have the new syntax or current usage information for it, hence your extensionsFilter problem as a prime example of how it has changed lately. However, if you are sure you need Tomahawk, which is an optional, component, try taking the /WEB-INF/web.xml file from the tomahawk file (tomahawk-examples-1.1.3-SNAPSHOT-bin.zip) example war: tomahawk-examples-1.1.3-SNAPSHOT/myfaces-example-blank-1.1.3-SNAPSHOT.warBoth are available in the nightly section (I was just there and downloaded it). But, basically, THIS is how the tomahawk extensions are loaded in the 1.1.3 snapshot. Again, you really shouldremove the extensions filter if you arelearning JSF - stick to theCORE until you can handle JSF with ease.filter filter-nameextensionsFilter/filter-name filter-classorg.apache.myfaces.component.html.util.ExtensionsFilter/filter-class init-param descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB/description param-nameuploadMaxFileSize/param-name param-value100m/param-value /init-param init-param descriptionSet 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-nameuploadThresholdSize/param-name param-value100k/param-value /init-param/filter !-- followed by mappings -- filter-mapping filter-nameextensionsFilter/filter-name url-pattern*.jsf/url-pattern/filter-mappingfilter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/*/url-pattern/filter-mappingRegards,David Friedman / [EMAIL PROTECTED]-Original Message-From: Todd Patrick [mailto:[EMAIL PROTECTED]]Sent: Friday, May 05, 2006 3:36 PMTo: MyFaces DiscussionSubject: Oh so very very close - Filter Mapping Error still:ExtensionsFilter not correctly configured.I have:MyFaces Core 1.1.2tomahawk-1.1.3-SNAPSHOTMy web.xml filter is set-up as: filter filter-nameMyFacesExtensionsFilter/filter-namefilter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class init-param param-namemaxFileSize/param-name param-value20m/param-value /init-param /filter filter-mapping filter-nameMyFacesExtensionsFilter/filter-name servlet-nameFaces Servlet/servlet-name /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern /filter-mapping servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern*.jsf/url-pattern /servlet-mappingHowever, I still return the error:javax.servlet.ServletException: ExtensionsFilter not correctlyconfigured. JSF mapping missing. JSF pages not covered.When I add:context-paramparam-nameorg.apache.myfaces.CHECK_EXTENSIONS_FILTER/param-name param-valuefalse/param-value/context-paramI don't have the error, I just get plain HTML GUI controls.I know I am close, but I can't get past this... Do I need to use theSNAPSHOT of MyFaces Core instead of MyFaces Core 1.1.2?Thanks,--Todd
RE: How do I properly use jsp:forward in MyFaces?
Todd, From your various posts tonight, you seem to have a number of JSF concepts mixed. Is this your first Faces Webapp? (That is not meant to be an insult but a simple question) If your project folder looks like this as you indicated: /transactionbrowser/ - WEB-INF - resources -index.jsp -tbrowser.jsp Then the various mappings you have posted over the past 24 hours have often been incorrect. With this webapp, your main url would likely be: http://127.0.0.1/transactionbrowser and you would expect it to invoke the welcome page /index.jsp. Your example index.jsp was listed as: jsp:forward page="/faces/tbrowser.jsp"/ THAT is where your first make came from: your mappings. JSF is often taught using SUFFIX mapping so the urls such as /index.jsf are understood to be imaginary (no such file exists) allowing the servlet to map /index.jsf to compile the view from the jsp file /index.jsp. With prefix mapping the url "/index.jsf" would be equivalent to "/faces/index" see? When you switch to PREFIX mapping like having mappings start "/faces/whatever", you must skip the .jsp extension so your index.jsp file should contain: jsp:forward page="/faces/tbrowser"/ Adding the .jsp suffix while using prefix mapping is causing your problem (that plus how your web.xml Servlet and Filter mappings are setup). I stronglyrecommend you to back to the myfaces blank.war and example war files to see how standard *.jsf suffix mapping works and begin your application with that style until you are positive you can make a working JSF application. It will save you time and effort since searching (the web or this lists's archives) on the *.jsf SUFFIX extension will result in a much greater number of relevant posts than if you use PREFIX "/faces/*" mapping. Regards, David Friedman / [EMAIL PROTECTED] -Original Message-From: Todd Patrick [mailto:[EMAIL PROTECTED]Sent: Friday, May 05, 2006 1:15 AMTo: MyFaces DiscussionSubject: How do I properly use jsp:forward in MyFaces? I have a project folder that looks like: /transactionbrowser/ - WEB-INF - resources -index.jsp -tbrowser.jsp With the servlet-mapping of: filter filter-nameMyFacesExtensionsFilter/filter-name filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class init-param param-namemaxFileSize/param-name param-value20m/param-value /init-param/filterfilter-mapping filter-nameMyFacesExtensionsFilter/filter-name servlet-nameFaces Servlet/servlet-name/filter-mappingfilter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern/filter-mapping servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup/servletservlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern/servlet-mapping The only URLs that work are: http://127.0.0.1:8080/transactionbrowser/faces/tbrowser.jsp http://127.0.0.1:8080/transactionbrowser/faces/ On my index.jsp I have: jsp:forward page="/faces/tbrowser.jsp"/ So, when I go to: http://127.0.0.1:8080/transactionbrowser/ I see the page, but not with the MyFaces rendering, I still plain control GUI components with none of the add MyFaces filter files. How do I use jsp:forward properly to get to: http://127.0.0.1:8080/transactionbrowser/faces/ or http://127.0.0.1:8080/transactionbrowser/faces/tbrowser.jsp I can't use the following since that doesn't run the MyFaces servlet: jsp:forward page="/transactionbrowser/faces/tbrowser.jsp"/ Thoughts or examples are appreciated. Thanks, --Todd
RE: facelets with MyFAces-1.2.2-SNAPSHOT
Marco, Don't forget to set the appropriate web.xml config-params that facelets requires. I recommend reading (or printing out) a copy of the Facelets docbook on their site. Regards, David -Original Message-From: Marco Mistroni [mailto:[EMAIL PROTECTED]Sent: Sunday, February 19, 2006 11:49 AMTo: MyFaces DiscussionSubject: facelets with MyFAces-1.2.2-SNAPSHOThello all, i might have missed some threads about MyFaces and facelets...i m struggling with getting facelets-1.0 at work with myfaces-1.2.2i have configured the viewhandler as followsview-handler com.sun.facelets.FaceletViewHandler/view-handlerobviously, after deploying my application and getting erros, i figured out htatmaybe the view handler is the wrong one..i am including following jars in my WEB-INF\lib facelets-1.0-bsh.jarel-api.jarel-ri.jaranyone has any idea on how to solve my problem? does myfaces has own implementationof facelets view-handler?thanx and regardsmarco
RE: migrating to Facelets
You will probably have to change any jsp taglib entries to html namespace entries so instead of: %@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"% ... etc html You would need: html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:ui="http://java.sun.com/jsf/facelets" Or something like that. Regards, David -Original Message-From: Yee CN [mailto:[EMAIL PROTECTED]Sent: Sunday, February 05, 2006 11:03 PMTo: 'MyFaces Discussion'Subject: Q: migrating to Facelets Hi, I am thinking of migrating to Facelets and I need to gauge the efforts required. Assuming that my jsf pages are relatively pure (i.e. no jstl etc), would my pages compile and run as it is without modifications? I got the impression that this is so can someone please confirm? Is there any gotcha to watch out for? Many thanks. Best regards, Yee
RE: Problem with cookies
Hans, Adding a cookie to the Response object does not automatically add it to the Request object. You have to wait until your page finishes so the client can receive the cookie. Requests AFTER that will have the cookie. In your code, I see you setting a cookie in speichereCookies() but immediately checking for it in the Request object by invoking ladeCookie() at the end of that method. The problem is you just created the cookie in the HttpServletResponse and the client didn't get it yet. Remember the Request and Response objects are not tied together. Again, the NEXT client submit should have your cookie set and readable in the Request object. Regards, David Friedman / [EMAIL PROTECTED] -Original Message-From: Hans Sowa [mailto:[EMAIL PROTECTED]Sent: Monday, January 23, 2006 5:49 AMTo: MyFaces DiscussionSubject: Re: Problem with cookies Hi allCan somebody help me?Thanks in advance. 2006/1/20, Hans Sowa [EMAIL PROTECTED]: HiI try to save and load cookies from my Myfaces projekt. I see that I save the cookies in the response but if I load the cookies again I can just find the myfaces cookies but not my ones.Here is the code which I use: load code: public void ladeCookie() { Cookie[] cookies; FacesContext faces = FacesContext.getCurrentInstance(); HttpServletRequest request = (HttpServletRequest) faces .getExternalContext().getRequest(); cookies = request.getCookies(); for (int i = 0; i cookies.length; i++) { if (cookies[i].getName().equals(SessionUser.DATENBANK)) { this.setDatenBank(cookies[i].getValue()); } } }save code: public void speichereCookies() { Cookie c = new Cookie(SessionUser.DATENBANK, this.getDatenBank()); c.setMaxAge(-1); FacesContext faces = FacesContext.getCurrentInstance (); HttpServletResponse response = (HttpServletResponse) faces .getExternalContext().getResponse(); response.addCookie(c); this.ladeCookie(); }Hope this is enough to find the problem.Thanks in advance.
RE: How to override the MyFaces 1.1.1 taglib listener registration?
Ronald, I want to virtual host so the path /hello maps internally to /hostname/hello. I'm trying to do some sort of internal redirect WITHOUT having to put dummy/stub files in the main /WEBAPP folder which would then include the relevant virtual host file(s). So, this kind of cancels out Facelets or Shale/Clay for that very purpose. I've tried making another ViewHandler.createView(context, hostname + viewId) but that ALSO changes the submitted path to /hostname/whatever.jsf instead of retaining it as /whatever.jsf. Now, I'm thinking I can use the servletContextListener to put my own ExternalContext in there so when the JSP calls ExternalContext.dispatch(), I can override that method to invoke /localhost/filename since I won't have a generic /filename setup. I'm open to new ideas and suggestions. I wonder sometimes why I go for the complicated stuff when I program application services. *sigh* Regards, David -Original Message- From: R. Müller [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 5:14 AM To: MyFaces Discussion Subject: Re: How to override the MyFaces 1.1.1 taglib listener registration? Hi David, why you want to override - define your own in the web.xml ! listener listener-classmyServletContextListener/listener-class /listener You have to implement the 'javax.servlet.ServletContextListener' - Interface with the following two methods : public void contextInitialized(ServletContextEvent e); public void contextDestroyed(ServletContextEvent e); The same if want to listen for sessions. You have to additionally implement the 'javax.servlet.http.HttpSessionListener'-Interface with public void sessionCreated(HttpSessionEvent e); public void sessionDestroyed(HttpSessionEvent e); regards Ronald David G. Friedman wrote: In the MyFaces taglib, it has the listener declaration (which works in my Tomcat 5.0.28 : listener listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class /listener Is there any way to override this other than: a) Edit the taglib file to change it. b) make my own /WEB-INF/classes/org/apache/myfaces/webapp/StartupServletContextListener.java file? Regards, David
RE: How to override the MyFaces 1.1.1 taglib listener registration?
I don't have control over that option with my hosting provider. I just have JSF (MyFaces) to work with to make everything dynamic. I tried creating the new UIViewRoot with the /hostname/whatever path then resetting it back to /whatever before returning it with CreateViewRoot but that didn't work. It doesn't find the file now so at least I know ViewHandler.createView() isn't the correct place for my logic. *shrug* Regards, David -Original Message- From: Jesse Alexander (KBSA 21) [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 1:57 PM To: MyFaces Discussion Subject: RE: How to override the MyFaces 1.1.1 taglib listener registration? Why not use an apache webserver with its url-rewriting capabilities? hth Alexander -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 5:55 PM To: MyFaces Discussion Subject: RE: How to override the MyFaces 1.1.1 taglib listener registration? Ronald, I want to virtual host so the path /hello maps internally to /hostname/hello. I'm trying to do some sort of internal redirect WITHOUT having to put dummy/stub files in the main /WEBAPP folder which would then include the relevant virtual host file(s). So, this kind of cancels out Facelets or Shale/Clay for that very purpose. I've tried making another ViewHandler.createView(context, hostname + viewId) but that ALSO changes the submitted path to /hostname/whatever.jsf instead of retaining it as /whatever.jsf. Now, I'm thinking I can use the servletContextListener to put my own ExternalContext in there so when the JSP calls ExternalContext.dispatch(), I can override that method to invoke /localhost/filename since I won't have a generic /filename setup. I'm open to new ideas and suggestions. I wonder sometimes why I go for the complicated stuff when I program application services. *sigh* Regards, David -Original Message- From: R. Müller [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 5:14 AM To: MyFaces Discussion Subject: Re: How to override the MyFaces 1.1.1 taglib listener registration? Hi David, why you want to override - define your own in the web.xml ! listener listener-classmyServletContextListener/listener-class /listener You have to implement the 'javax.servlet.ServletContextListener' - Interface with the following two methods : public void contextInitialized(ServletContextEvent e); public void contextDestroyed(ServletContextEvent e); The same if want to listen for sessions. You have to additionally implement the 'javax.servlet.http.HttpSessionListener'-Interface with public void sessionCreated(HttpSessionEvent e); public void sessionDestroyed(HttpSessionEvent e); regards Ronald David G. Friedman wrote: In the MyFaces taglib, it has the listener declaration (which works in my Tomcat 5.0.28 : listener listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class /listener Is there any way to override this other than: a) Edit the taglib file to change it. b) make my own /WEB-INF/classes/org/apache/myfaces/webapp/StartupServletContextListener.java file? Regards, David
RE: How to override the MyFaces 1.1.1 taglib listener registration?
I've been playing with Facelets so I'm all ears. Feel free to backchannel me or to move this to the facelets list if you prefer. Regards, David -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper Sent: Thursday, January 12, 2006 10:52 PM To: users@myfaces.apache.org Subject: Re: How to override the MyFaces 1.1.1 taglib listener registration? David, I have a solution for this based on subclassing FaceletsViewHandler; the trick is to map the view ID to a view, load the view to create the component tree, but retain the view ID. It's a little tricky -- and can't be done in a way that's portable, so if you're not using Facelets my solution wont work for you. But if you are using Facelets, and would like the details, let me know. L. David G. Friedman wrote: I don't have control over that option with my hosting provider. I just have JSF (MyFaces) to work with to make everything dynamic. I tried creating the new UIViewRoot with the /hostname/whatever path then resetting it back to /whatever before returning it with CreateViewRoot but that didn't work. It doesn't find the file now so at least I know ViewHandler.createView() isn't the correct place for my logic. *shrug* Regards, David -Original Message- From: Jesse Alexander (KBSA 21) [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 1:57 PM To: MyFaces Discussion Subject: RE: How to override the MyFaces 1.1.1 taglib listener registration? Why not use an apache webserver with its url-rewriting capabilities? hth Alexander -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 5:55 PM To: MyFaces Discussion Subject: RE: How to override the MyFaces 1.1.1 taglib listener registration? Ronald, I want to virtual host so the path /hello maps internally to /hostname/hello. I'm trying to do some sort of internal redirect WITHOUT having to put dummy/stub files in the main /WEBAPP folder which would then include the relevant virtual host file(s). So, this kind of cancels out Facelets or Shale/Clay for that very purpose. I've tried making another ViewHandler.createView(context, hostname + viewId) but that ALSO changes the submitted path to /hostname/whatever.jsf instead of retaining it as /whatever.jsf. Now, I'm thinking I can use the servletContextListener to put my own ExternalContext in there so when the JSP calls ExternalContext.dispatch(), I can override that method to invoke /localhost/filename since I won't have a generic /filename setup. I'm open to new ideas and suggestions. I wonder sometimes why I go for the complicated stuff when I program application services. *sigh* Regards, David -Original Message- From: R. Müller [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 5:14 AM To: MyFaces Discussion Subject: Re: How to override the MyFaces 1.1.1 taglib listener registration? Hi David, why you want to override - define your own in the web.xml ! listener listener-classmyServletContextListener/listener-class /listener You have to implement the 'javax.servlet.ServletContextListener' - Interface with the following two methods : public void contextInitialized(ServletContextEvent e); public void contextDestroyed(ServletContextEvent e); The same if want to listen for sessions. You have to additionally implement the 'javax.servlet.http.HttpSessionListener'-Interface with public void sessionCreated(HttpSessionEvent e); public void sessionDestroyed(HttpSessionEvent e); regards Ronald David G. Friedman wrote: In the MyFaces taglib, it has the listener declaration (which works in my Tomcat 5.0.28 : listener listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class /listener Is there any way to override this other than: a) Edit the taglib file to change it. b) make my own /WEB-INF/classes/org/apache/myfaces/webapp/StartupServletContextListener.java file? Regards, David
RE: JFYI: change session to request bean - the way life
I was just thinking along the lines of some(?) previous poster recommending we (JSF Programmers) use scope names dot managed bean names in our JSF/JSP files to ensure scope conflicts like this never happen. Perhaps this was a good example of that for debugging purposes. :) Regards, David -Original Message- From: Mario Ivankovits [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 1:50 AM To: MyFaces Discussion Subject: Re: JFYI: change session to request bean - the way life Hi David! So you never did a session.invalidate() or removed the object from the session? Not before your removal of the sessions file? No, why should I? During development I often restart tomcat, but not more. Once I figured out the bean is still in session scope the first idea I had was to remove the file, sure, there are a couple of ways to remove the object from the session. After thinking about this topic even more, another solution could haven been to simply restart the browser, then the session cookie will be lost and a new session will be created. Ciao, Mario
How to override the MyFaces 1.1.1 taglib listener registration?
In the MyFaces taglib, it has the listener declaration (which works in my Tomcat 5.0.28 : listener listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class /listener Is there any way to override this other than: a) Edit the taglib file to change it. b) make my own /WEB-INF/classes/org/apache/myfaces/webapp/StartupServletContextListener.java file? Regards, David
RE: tobago examples
No problems here in IE or Firefox. What browser/version/platform are you using? Can you use another one to check it's not your OS or Internet connection? -David -Original Message- From: Dennis Byrne [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 20, 2005 11:36 AM To: MyFaces Discussion Subject: Re: tobago examples That's weird. I just went back there and only got a 404 on step 3 (the tab starting w/ List). Original message Date: Tue, 20 Dec 2005 11:31:10 +0100 From: Matthias Wessendorf [EMAIL PROTECTED] Subject: Re: tobago examples To: MyFaces Discussion users@myfaces.apache.org can't reproduce ... On 12/20/05, Dennis Byrne [EMAIL PROTECTED] wrote: 1.) http://tobago.atanion.net/tobago-example-demo/ 2.) click on Tree Control 3.) click on the second tab. 4.) click on the first tab. 5.) click on the second tab 6.) 404 for http://tobago.atanion.net/tobago-example- demo/faces/overview/treeControl.jsp Original message Date: Tue, 20 Dec 2005 00:50:59 -0900 From: Dennis Byrne [EMAIL PROTECTED] Subject: tobago examples To: users@myfaces.apache.org http://tobago.atanion.net/tobago-example-demo/ I believe I have accidently brought down the demo app for tobago. This is the second time I have clicked on one of the tabs and received an error page, as well as a 404 whenever I go any page of the app. I cannot remember the name of the tab I clicked on. If someone can tell me how to get a war file, it probably won't take long for me to retrace my steps. Dennis Byrne Dennis Byrne -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com Dennis Byrne
RE: lifecycle questions
I doubt you'll find any examples. Changing the lifecycle is really a pretty unusual thing to do. I'm a lot closer but my problem right now is a listener order one: the Myfaces listener loads from the Jar BEFORE my listener can load (to add my new lifecycle). Essentially, the spec says I can change the default lifecycle (a default implementation stores under the lifecycleFactory key DEFAULT) using the web.xml context param: context-param param-namejavax.faces.LIFECYCLE_ID/param-name param-valueDEFAULT/param-value /context-param So, I want to change DEFAULT to DAVID so I can use my own lifecycle. But I do that in my listener, which won't load until AFTER the MyFaces jar's one loads so DAVID doesn't get in there and MyFaces initialization blows up like so: INFO: Reading config /WEB-INF/faces-config.xml Dec 14, 2005 3:29:24 PM org.apache.myfaces.webapp.StartupServletContextListener initFaces SEVERE: Error initializing ServletContext java.lang.IllegalArgumentException: Unknown lifecycle 'DAVID'. at org.apache.myfaces.lifecycle.LifecycleFactoryImpl.getLifecycle(LifecycleFactoryImpl.java:60) I would prefer this over also having to change the lifecycleFactory in faces-config.xml to use a key other than javax.faces.LIFECYCLE_ID so things can still follow the JSF v1.1 spec. Now, JSF spec v1.2 would allow me to specify the javax.faces.LIFECYCLE_ID in an init param for the servlet (i.e. AFTER my listener loaded) but MyFaces isn't that far along yet so it is not an option. And yes, I tried pushing my lifecycle into the factory to replace DEFAULT but that exceptions out/fails: INFO: java.lang.IllegalArgumentException: Lifecycle with id 'DEFAULT' already exists. Does anyone have any ideas on how to change the listener load order? Thanks again for any suggestions, David
RE: lifecycle questions
FYI, I'm going to try to go the other way: Create my own lifecycleFactory implementation, specify it in a faces-config.xml file, then have that one's constructor add a lifecycle called DAVID, which will be specified in the web.xml as mentioned below. I'll keep everyone posted, I just need a mental break right now. Regards, David -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 4:12 PM To: MyFaces Discussion Subject: RE: lifecycle questions I doubt you'll find any examples. Changing the lifecycle is really a pretty unusual thing to do. I'm a lot closer but my problem right now is a listener order one: the Myfaces listener loads from the Jar BEFORE my listener can load (to add my new lifecycle). Essentially, the spec says I can change the default lifecycle (a default implementation stores under the lifecycleFactory key DEFAULT) using the web.xml context param: context-param param-namejavax.faces.LIFECYCLE_ID/param-name param-valueDEFAULT/param-value /context-param So, I want to change DEFAULT to DAVID so I can use my own lifecycle. But I do that in my listener, which won't load until AFTER the MyFaces jar's one loads so DAVID doesn't get in there and MyFaces initialization blows up like so: INFO: Reading config /WEB-INF/faces-config.xml Dec 14, 2005 3:29:24 PM org.apache.myfaces.webapp.StartupServletContextListener initFaces SEVERE: Error initializing ServletContext java.lang.IllegalArgumentException: Unknown lifecycle 'DAVID'. at org.apache.myfaces.lifecycle.LifecycleFactoryImpl.getLifecycle(LifecycleFactoryImpl.java:60) I would prefer this over also having to change the lifecycleFactory in faces-config.xml to use a key other than javax.faces.LIFECYCLE_ID so things can still follow the JSF v1.1 spec. Now, JSF spec v1.2 would allow me to specify the javax.faces.LIFECYCLE_ID in an init param for the servlet (i.e. AFTER my listener loaded) but MyFaces isn't that far along yet so it is not an option. And yes, I tried pushing my lifecycle into the factory to replace DEFAULT but that exceptions out/fails: INFO: java.lang.IllegalArgumentException: Lifecycle with id 'DEFAULT' already exists. Does anyone have any ideas on how to change the listener load order? Thanks again for any suggestions, David
RE: lifecycle questions
Followup: I DID manage to load my own lifecycle using a lifecycleFactory. But for the record, I just can't figure out where the DEFAULT lifecycle loads. In the myfaces lifecycleFactoryImpl's no-arg constructor it adds the DEFAULT lifecycle but somehow that seems to load BEFORE my factory/lifecycle-factory faces configuration setting. (It's not in the standard-faces-config.xml file either or any other MyFaces config files I can find). I couldn't add both mine and the default because somehow, BEFORE my lifecycle-factory setting loads, JSF loads a default factory with a default lifecycle. I just change which is being used. So, here is how I did it in four simple steps. 1. Create a class that extends the myfaces lifecycleFactoryImpl and have your constructor add the lifecycle under your own key kind of like so: public final static String CUSTOM_LIFECYCLE = DAVID; public lifecycleFactory() { addLifecycle(lifecycleFactory.CUSTOM_LIFECYCLE, new LifecycleImpl()); }; 2. Create my own lifecycle class. For the above test example, I simply installed a second copy of class org.apache.myfaces.lifecycle.lifecycleImpl because my own implementation isn't ready yet. 3. Set the faces config (faces-config.xml) to load your own lifecycleFactory implementation: factory lifecycle-factorycom.friedsoftware.test.lifecycleFactory/lifecycle-factory /factory 4. Set the javax.faces.LIFECYCLE_ID to the string you used to add your lifecycle to the factory. The above constant was DAVID so I set this in web.xml: context-param param-namejavax.faces.LIFECYCLE_ID/param-name param-valueDAVID/param-value /context-param That's it. Now I can continue on with my experiment to make the view creation keep the viewId of /about.jsf but try templating off /hostname/about.jsf to reduce file IO when virtual hosting with JSF. More to follow (and possibly a Wiki post!). Regards, David -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 5:02 PM To: MyFaces Discussion Subject: RE: lifecycle questions FYI, I'm going to try to go the other way: Create my own lifecycleFactory implementation, specify it in a faces-config.xml file, then have that one's constructor add a lifecycle called DAVID, which will be specified in the web.xml as mentioned below. I'll keep everyone posted, I just need a mental break right now. Regards, David -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 4:12 PM To: MyFaces Discussion Subject: RE: lifecycle questions I doubt you'll find any examples. Changing the lifecycle is really a pretty unusual thing to do. I'm a lot closer but my problem right now is a listener order one: the Myfaces listener loads from the Jar BEFORE my listener can load (to add my new lifecycle). Essentially, the spec says I can change the default lifecycle (a default implementation stores under the lifecycleFactory key DEFAULT) using the web.xml context param: context-param param-namejavax.faces.LIFECYCLE_ID/param-name param-valueDEFAULT/param-value /context-param So, I want to change DEFAULT to DAVID so I can use my own lifecycle. But I do that in my listener, which won't load until AFTER the MyFaces jar's one loads so DAVID doesn't get in there and MyFaces initialization blows up like so: INFO: Reading config /WEB-INF/faces-config.xml Dec 14, 2005 3:29:24 PM org.apache.myfaces.webapp.StartupServletContextListener initFaces SEVERE: Error initializing ServletContext java.lang.IllegalArgumentException: Unknown lifecycle 'DAVID'. at org.apache.myfaces.lifecycle.LifecycleFactoryImpl.getLifecycle(LifecycleFactoryImpl.java:60) I would prefer this over also having to change the lifecycleFactory in faces-config.xml to use a key other than javax.faces.LIFECYCLE_ID so things can still follow the JSF v1.1 spec. Now, JSF spec v1.2 would allow me to specify the javax.faces.LIFECYCLE_ID in an init param for the servlet (i.e. AFTER my listener loaded) but MyFaces isn't that far along yet so it is not an option. And yes, I tried pushing my lifecycle into the factory to replace DEFAULT but that exceptions out/fails: INFO: java.lang.IllegalArgumentException: Lifecycle with id 'DEFAULT' already exists. Does anyone have any ideas on how to change the listener load order? Thanks again for any suggestions, David
lifecycle questions
I'm getting lost in how to make a custom lifecycle (NOT a phase listener) after searching through the MyFaces v1.1.1 code. I was thinking of changing the lifecycleImpl.java class to alter execute()'s restoreView() to try setting different values between setViewId(String) and setViewRoot(String). The more I look into things the more I'm confused. My 3 big questions right now are: 1. Why can't I set the lifecycle class directly in the config file? What is the point of having the factory class instead of just setting (in JSF v1.1) the lifecycle implementation in the application / section of the faces config? 2. Why is there a webapp init variable for the lifecycleFactory when stuff only gets added as the string DEFAULT? Is this so you can put he MyFaces jars in a central location then each webapp's listener can add it's own lifecycle factory under it's own key? That way /appone can use one lifecycleFactory different from /apptwo so they do different things in different steps but use the same generic myfaces jar/classes? I understand this is in the spec for JSF v1.2 for that very purpose plus additionally letting different servlet mappings in the same webapp set which lifecycle to use (i.e. for mapping different JSF servlets for *.jsf, *.ajax, *.source, etc.) but MyFaces isn't there yet. (Note: just found a java/ibm developerworks page on patterns so the factory idea makes a little more sense I just wish I knew where I should add my own factory.) 3. Are there any examples for changing the lifecycle (not adding PhaseListeners) or lifecycleFactory because I'm not finding them in the MyFaces codebase (not on the keywords I'm using to search in via Eclipse 3.1.1) or with the keywords I've been trying in various search engines. Thank you for taking a moment on this complicated JSF question. Regards, David
svn problem
I tried checking out the SVN repository but the current repository was empty.. Did I miss something? Is it empty at certain times of the day during a build? (like 9pm Eastern US time?) Regards, David
RE: svn problem
Nevermind. I just had to hit checkout. My mistake was thinking I'd be able to browse it before trying to check anything out into an Eclipse project. I guess SubClipse doesn't necessarily work that way. It had me fooled since it let me look at other directories under https://svn.apache.org/repos/asf/myfaces and they browse as I'd expected when using SubClipse. It is just 'current' that came up empty. Regards, David -Original Message- From: Dennis Byrne [mailto:[EMAIL PROTECTED] Sent: Monday, December 12, 2005 9:19 PM To: MyFaces Discussion Subject: Re: svn problem It only appears empty w/ SVN externals . CO of current should get everything. What does the SVN client say? Original message Date: Mon, 12 Dec 2005 21:10:54 -0500 From: David G. Friedman [EMAIL PROTECTED] Subject: svn problem To: MyFaces users@myfaces.apache.org I tried checking out the SVN repository but the current repository was empty.. Did I miss something? Is it empty at certain times of the day during a build? (like 9pm Eastern US time?) Regards, David Dennis Byrne
virtual hosting with Myfaces using different setViewId / setViewRoot strings?
I want to virtual host with JSF (MyFaces). Since not every site will have the same exact page names, I came up with the exotic idea of modifying the lifecycleImpl class so it sets the view root as /whatever.jsf but uses createView on /hostname/whatever.jsf. That way, a virtual host (called 'hostname') would only see the pages they'd defined and I would not have to make dummy pages so all sites have a /whatever.jsf page. So, has anyone tried setting different values for setViewId and setViewRoot before? I'm wondering if someone experienced can make any suggestions on this idea before I try it (and possibly blow everything up on my own). Thanks for any opinions or suggestions, David
RE: Changing the default LifeCycle
Mike, Out of curiousity, what would you do with a new lifecycle Factory? (e.g. applicationfactorylifecycleFactory///) Regards, David -Original Message- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 2:46 PM To: MyFaces Discussion Subject: Re: Changing the default LifeCycle I looked at this a week or two ago. I think it was lifecycle-factory. On 11/9/05, Duncan Krebs [EMAIL PROTECTED] wrote: Hi, I figured out how to change the viewHandler in my faces config using the view-hanldermyviewhandler/view-handler element, does anyone know what element I'd use to set my own LifeCycle class? Thanks
RE: SV: Call managed bean method based on request attribute
Robert, The JSF Spec v1.1 lists the properties available to managed beans in the various scopes. The '#{param.whatever]' property mentioned below comes from the specs listing for request scope. That spec at the java.sun.com site has more goodies and other information that might make it the document you're looking for. Regards, David -Original Message-From: Robert Parsons [mailto:[EMAIL PROTECTED]Sent: Wednesday, November 02, 2005 2:29 AMTo: MyFaces DiscussionSubject: Re: SV: Call managed bean method based on request attributeI was thinking I might be able to do something like that after I saw some examples that were accessing other properties or beans or something. However, I couldnt find any good doco on what I could do. I really need a good book on this stuff, but I better wait till JSF 1.2 comes out.Anyway, thanks!-Robert.[EMAIL PROTECTED] wrote: Hi Another solution to this is to do something like this: managed-bean managed-bean-namecustomer/managed-bean-name managed-bean-classxx.xx.xx.Customer/managed-bean-class managed-bean-scoperequest/managed-bean-scopemanaged-propertyproperty-namecustId/property-namevalue#{param.id}/value/managed-property/managed-bean When your bean is being construted, the request parameter (#{param.id} will be inserted into it. Hermod -Opprinnelig melding-Fra: Frode Oldervoll [mailto:[EMAIL PROTECTED]]Sendt: 2. november 2005 08:08Til: 'MyFaces Discussion'Emne: RE: Call managed bean method based on request attribute Use FacesContext.getCurrentInstance().addMessage -Frode From: Robert Parsons [mailto:[EMAIL PROTECTED]] Sent: 2. november 2005 07:37To: MyFaces DiscussionSubject: Re: Call managed bean method based on request attribute Thanks! Just another question if anyone is still around, if I want to add a message to the response from a bean method rather than at validation time (such as 'save' method), how do that? The only way I can see of adding messages is by throwing a ValitatorException :S.Thanks in advance,-Robert.Mathias Brökelmann wrote: use FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id")2005/11/1, Robert Parsons [EMAIL PROTECTED]: Hi,I'm after some basic design assistance here. If I have a managed beanthat represents some database entity, how can I populate that bean fromthe database based on a request parameter?For example, say I have a managed bean called Customer. The form forediting the bean is 'editCustomer.faces'. If the page is accesseddirectly (without any request parameters) a blank form is dispalyedwhich can be used to create a new Person. (which would possibly have anaction for inserting it into the database).However, if a request like 'editCustomer.faces?id=14' was issued, I wantthe Customer bean to load customer number 14 from the database.What is the best way of achieving this with JavaServer faces? This wholemanaged mean is making my old methods of working a little difficult.Thanks in advance,Robert. --Mathias * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *This email with attachments is solely for the use of the individual orentity to whom it is addressed. Please also be aware that the DnB NOR Groupcannot accept any payment orders or other legally binding correspondence withcustomers as a part of an email. This email message has been virus checked by the virus programs usedin the DnB NOR Group.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
sandbox schedule.jsp problem
I'm trying to run the October 25, 2005 nightly build's sandbox.war for the Schedule component. Unfortunately, Tomcat 5.0.28 (JDK 1.5) is kicking out the following errors, preventing me from playing with it. Any suggestions? I tried to find Jurgen's original web page but the link I had (http://mandril.ugent.be:7780/calfaces/simple/planner.jsf) is no longer available. Regards, David =-=-=- Start Errors from my Tomcat 5.0.28 / JDK 1.5.0_05 =-=-=-=-=- WARNING: PanelGrid forceIdForm:_id0 has not enough children. Child count should be a multiple of the columns attribute. Oct 27, 2005 11:08:35 PM org.apache.myfaces.taglib.UIComponentBodyTagBase doEndTag WARNING: Component with id '_id0:_id1' (org.apache.myfaces.taglib.html.HtmlPanelGridTag tag) and path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /schedule.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id0][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id1]}renders it's children, but has embedded JSP or HTML code. Use the f:verbatim tag for nested HTML. For comments use %/* */% style JSP comments instead of !-- -- style HTML comments. BodyContent: x:inputCalendar id=scheduleNavigator monthYearRowClass=yearMonthHeader weekRowClass=weekHeader currentDayCellClass=currentDayCell value=#{scheduleBean.date} valueChangeListener=#{scheduleBean.calendar ValueChanged} binding=#{scheduleBean.dateInput}/ Oct 27, 2005 11:08:36 PM org.apache.myfaces.taglib.UIComponentBodyTagBase doEndTag WARNING: Component with id '_id0:_id6' (org.apache.myfaces.taglib.html.HtmlPanelGridTag tag) and path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /schedule.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id0][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id6]}renders it's children, but has embedded JSP or HTML code. Use the f:verbatim tag for nested HTML. For comments use %/* */% style JSP comments instead of !-- -- style HTML comments. BodyContent: x:inputDate id=appStart value=#{appointmentBean.appointmentStart} type=both/ x:inputDate id=appEnd value=#{appointmentBean.appointmentEnd} type=both/ Oct 27, 2005 11:08:36 PM org.apache.myfaces.renderkit.html.HtmlLabelRenderer encodeBegin WARNING: Unable to find component 'appStart' (calling findComponent on component '_id0:_id7') Oct 27, 2005 11:08:36 PM org.apache.myfaces.renderkit.html.HtmlLabelRenderer encodeBegin WARNING: Unable to find component 'appEnd' (calling findComponent on component '_id0:_id8') Oct 27, 2005 11:08:36 PM org.apache.myfaces.renderkit.html.HtmlGridRendererBase renderChildren WARNING: PanelGrid _id0:_id6 has not enough children. Child count should be a multiple of the columns attribute. Oct 27, 2005 11:08:36 PM org.apache.myfaces.taglib.UIComponentBodyTagBase doEndTag WARNING: Component with id '_id0:_id16' (org.apache.myfaces.taglib.html.HtmlPanelGridTag tag) and path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /schedule.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id0][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id16]}renders it's children, but has embedded JSP or HTML code. Use the f:verbatim tag for nested HTML. For comments use %/* */% style JSP comments instead of !-- -- style HTML comments. BodyContent: x:inputDate id=holidayDate value=#{appointmentBean.holidayDate} type=date/ Oct 27, 2005 11:08:36 PM org.apache.myfaces.renderkit.html.HtmlLabelRenderer encodeBegin WARNING: Unable to find component 'holidayDate' (calling findComponent on component '_id0:_id17') =-=-=- End Errors from my Tomcat 5.0.28 / JDK 1.5.0_05 =-=-=-=-=-
RE: How to use t:saveState ?
Juan, Is it inside the f:view or outside the view? Regards, David -Original Message- From: Juan Medín Piñeiro [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 10:28 AM To: users@myfaces.apache.org Subject: How to use t:saveState ? Hi, I've been trying to use t:saveState without success. As far as I can read in the wiki and in the examples, you just need to include a t:saveState value=xxx/ in the JSP and the information will travel to the client and back in the next request. So I created 3 pages, test1, test2 and test3, each with a t:saveState value=aRequestScopedObject/. In the backing bean I do something like: aRequestScopedObject = (ARequestScopedObject) getFacesContext() .getApplication() .createValueBinding(#{aRequestScopedObject}) .getValue(getFacesContext()); And then I set several properties on it. Well, when I reach the test2 page _all changes_ are lost. Reading the generated HTML I don't see anything at all related to the saveState info in the form (!?) Am I missing anything ? Any comment would be really welcome. It seems to be very simple to use, the only strange thing is that I'm using the Sun RI + Tomahawk. Thanks in advance, - Juancho
RE: How to use t:saveState ?
Juan, What is testState and shouldn't that be #{testState} ? Did you make it serializable so it can be saved? Regards, David -Original Message- From: Juan Medín Piñeiro [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 10:42 AM To: MyFaces Discussion Subject: Re: How to use t:saveState ? It's inside the view and outside the form. From the test code: f:view BODY t:saveState value=testState/ h:form styleClass=form id=form1 more markup code Regards, - Juan On 10/24/05, David G. Friedman [EMAIL PROTECTED] wrote: Juan, Is it inside the f:view or outside the view? Regards, David -Original Message- From: Juan Medín Piñeiro [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 10:28 AM To: users@myfaces.apache.org Subject: How to use t:saveState ? Hi, I've been trying to use t:saveState without success. As far as I can read in the wiki and in the examples, you just need to include a t:saveState value=xxx/ in the JSP and the information will travel to the client and back in the next request. So I created 3 pages, test1, test2 and test3, each with a t:saveState value=aRequestScopedObject/. In the backing bean I do something like: aRequestScopedObject = (ARequestScopedObject) getFacesContext() .getApplication() .createValueBinding(#{aRequestScopedObject}) .getValue(getFacesContext()); And then I set several properties on it. Well, when I reach the test2 page _all changes_ are lost. Reading the generated HTML I don't see anything at all related to the saveState info in the form (!?) Am I missing anything ? Any comment would be really welcome. It seems to be very simple to use, the only strange thing is that I'm using the Sun RI + Tomahawk. Thanks in advance, - Juancho
RE: Action called twice
Julian, How are you identifying this problem? Are you using any javascript submit() calls that might cause double submits? Regards, David -Original Message- From: Julián García [mailto:[EMAIL PROTECTED] Sent: Thursday, October 20, 2005 6:41 PM To: MyFaces Discussion Subject: Action called twice Although I have not discovered a pattern yet, some of my action methods are being called twice on invocation. Is this a known issue? I am strugling with this. Julian
RE: survey: what tool are you using for JSF ?
Eclipse + FacesIDE + EclipseHTMLEditor. -David -Original Message- From: Francesco Consumi [mailto:[EMAIL PROTECTED] Sent: Monday, October 17, 2005 1:38 PM To: users@myfaces.apache.org Subject: survey: what tool are you using for JSF ? Hi people, I'm asking what kind of IDE/Tool are you using for developing your JSF Web apps. We're using NetBeans 5.0, but I'm beginning to think it isn't too fast. -- Francesco Consumi
RE: Where to find source code of sandbox?
Stefan, You can pull it from the SVN repository: https://svn.apache.org/repos/asf/myfaces/sandbox/ Regards, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 04, 2005 11:32 AM To: users@myfaces.apache.org Subject: Where to find source code of sandbox? attachment: winmail.dat
RE: Using Javascript to submit a form doesn't work [Problem Solved]
Saul, onsubmit() isn't a _javascript_ method so it wouldn't be generated by JSF. It is a form object method internal to the browser. I don't know offhand the technical term but it is probably part of the DOM (Document Object Model). Regards, David -Original Message-From: Saul Qunming Yuan [mailto:[EMAIL PROTECTED]Sent: Tuesday, September 27, 2005 9:24 PMTo: Matt BlumCc: MyFaces DiscussionSubject: Re: Using _javascript_ to submit a form doesn't work [Problem Solved] Matt, Based on your onsubmit suggestion, I changed my code to submit the form from: document.forms['body:theForm'].submit(); to if(document.forms['body:theForm'].onsubmit) {if(document.forms['body:theForm'].onsubmit()) document.forms['body:theForm'].submit();} else {document.forms['body:theForm'].submit();} Now it works! the parent page refreshes with the populated value retained. One strange thing though, I don't see JSFrendering a onsubmit() function inside the form tag. Anyway, it's working. thanks a lot for thehelp,Matt whoever responed to the question Saul. - Original Message - From: Matt Blum To: [EMAIL PROTECTED] Cc: MyFaces Discussion Sent: Tuesday, September 27, 2005 12:46 PM Subject: Re: Using _javascript_ to submit a form doesn't work You can see for yourself what the _javascript_ code that's being generated is, just by running the page and using your browser's View Source functionality.If there's an onsubmit handler, the code you list will do exactly what needs to be done. It's possible, though, that there's an onchange handler on the input box (say, that populates a hidden field) that may not be called when the value changes programmatically.-Matt On 9/27/05, Saul Qunming Yuan [EMAIL PROTECTED] wrote: Yes, I do have two commandButton there in the parent window. I justpopulate one id value to the parent window and I see it showing up in theinput box before the parent window refreshes. Once the parent windowrefreshes though, it clears out the value populated in the input box. I'm sure JSF generate a bunch of _javascript_ code, may be I need to call theonsubmit before calling submit, something like this:parentWinForm.onsubmit();parentWinForm.submit();thanks. (accidentally just replied to the sender, so re-sending to the discussion group) Does the form in the parent window have a submit button? Zhong Li was right that you may need at least one submit button in order for it to work (there's no logical reason why you should, but sometimes the browser gets testy if you don't). If you don't have an onsubmit handler already, you don't need to create one. I just thought you might've had one that, due to the way you were submitting the form, was not being called. Are you sure the search got populated everywhere it needed to be? Is there any _javascript_ behind the scenes that isn't being invoked due to the fact that you're populating the search field via code instead of by typing in it? If you're not sure, look at the rendered HTML source for the page, and check for hidden fields and _javascript_ code that you didn't write (i.e., that must've been rendered by MyFaces). -Matt On 9/27/05, Saul Qunming Yuan [EMAIL PROTECTED] wrote: Thanks Matt, that's a very good point. But what do I need to do in the Onsubmit handler? I have already set the values to the input fields using _javascript_. Just to be clear, here is my use case: 1. The parent window has a "Search" button; 2. When the "Search" button is clicked, it opens a popup window; 3. The user does the search in the popup window, find a list of results; 4. The user clicks a link from the search result which calls a _javascript_ function to populate some value to the parent window; 5. The _javascript_ function then calls the parent window's form object to submit (like parentWinForm.submit()) the parent form; 6. Close the Popup window. The issue is: The search did got populated in the parent window, and the parent window did refresh, but the parent window didn't do a post using the populated value from the search. The backing bean's setter methods not called. Does the form have an onsubmit handler that needs to be called to set any of its values? Onsubmit handlers aren't called when you invoke the submit method on the form object, so you will need to call whatever function it is explicitly before the invocation. If that's not what it is, then I don't know what to suggest. -Matt On 9/26/05, Saul Qunming Yuan
RE: [newbie] Navigation does not work
Why do you have the *.jsf in your navigation-case? Shouldn't you be using *.jsp or are you not mapping to *.jsf as is common? Regards, David -Original Message- From: Matthias Klein [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 7:11 AM To: 'MyFaces Discussion'; [EMAIL PROTECTED] Subject: RE: [newbie] Navigation does not work Actually, I did both but it did not change anything. Here the more complete excerpts from faces-config: navigation-rule from-view-id/LODetails.jsf/from-view-id navigation-case from-outcomeviewuserratings/from-outcome to-view-id/LORatings.jsf/to-view-id /navigation-case /navigation-rule managed-bean descriptionBacking-Bean for LODetails./description managed-bean-nameLODetailsBackingBean/managed-bean-name managed-bean-classca.gc.nrc.iit.toml.frontend.LODetailsBackingBean/manage d-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean Something like that I did. But still - pressing the button does not do anything at all So I am wondering if I did something wrong or if that is a JSF/MyFaces-issue. Thanks Matt -Original Message- From: hicham abassi [mailto:[EMAIL PROTECTED] Sent: Dienstag, 13. September 2005 12:59 To: MyFaces Discussion Subject: Re: [newbie] Navigation does not work 1/ it seems that yo don't declared your bean LODetailsBackingBean into faces-config.xml 2/ you don't declared a string outcome viewuserratings for view-id LODetails.jsf 2005/9/13, Matthias Klein [EMAIL PROTECTED]: I have started to create a simple MyFaces-App and encountered a problem with the navigation: Pressing a button does not do anything. Some code sniplets: - Page1: %@ page language=java % %@ taglib uri=http://java.sun.com/jsf/html; prefix=h % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % f:loadBundle basename=ca.gc.nrc.iit.toml.frontend.bundles.LODetails var=MessageBundle/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html body f:view h:form id=LODetailsForm table tbody [..] td h:commandButton id=viewuserratings action=#{LODetailsBackingBean.viewUserRatings} value=#{MessageBundle.viewratingsbuttonlabel} / /td [..] /h:form /f:view /body /html --- Excerpt from faces-config: navigation-rule from-view-id/LODetails.jsf/from-view-id navigation-case to-view-id/LORatings.jsf/to-view-id /navigation-case /navigation-rule - Part of LODetailsBackingBean.java: public String viewUserRatings() { return viewuserratings; } I deployed that on Tomcat 5.5.9 with J2SDK 1.5.0_04 through MyEclipse IDE 4. I see the page1 but when I press the button, nothing happens. Why? Thanks a lot Matt -- hicham ABASSI [EMAIL PROTECTED]
URL mapping question
I haven't done much with JSF so I was wondering if there was a way to map a URL pattern, say /articles/XXX.jsf, to one JSF that handles database requests for that path. Is this something I'd need to code myself, need Shale to perform for me, or is there some generic JSF mechanism I can use for mapping dynamic pages to one direct JSF using easily bookmarked URLS. Regards, David
Q about the Jenia JSF template library
Is anyone using the Jenia JSF template library? I'm interested in feedback on it as an alternative to using SiteMesh or Tiles with MyFaces. Regards, David
RE: Welcome James!
Is this the same Mr. Mitchell from Struts? Have you also been 'Shaled'? *grin* Welcome either way (W/w-out Shale). Regards, David Friedman / [EMAIL PROTECTED] -Original Message- From: Manfred Geiler [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 19, 2005 6:23 AM To: dev@myfaces.apache.org; users@myfaces.apache.org Subject: Welcome James! Ladies and Gentlemen, Please welcome our new MyFaces committer James Mitchell (jmitchell)! James, glad to have you on board and looking forward to working together. Kind regards, Manfred Geiler
RE: Replacing javascript without restart Tomcat
Doug, _javascript_ files would be static files and subject to your browser's CACHE settings. Do you mean how would you drop in new JSP files which Tomcat would compile into Java to execute? (Struts taglibs, scriptlets, etc.) Regards, David -Original Message-From: Doug Ly [mailto:[EMAIL PROTECTED]Sent: Tuesday, July 19, 2005 6:38 PMTo: users@myfaces.apache.orgSubject: Replacing _javascript_ without restart Tomcat Hi, Is there a way to replace _javascript_ files without restarting Tomcat servlet? Thanks --Doug The information contained in this email may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please contact the sender by reply email and destroy all copies of the original message. Thank you
RE: Dynamically adding form elements client-side
Richard, Are you talking about hiding/showing the fields (such as using a CSS style) or completely adding to the page without a resubmit? Regards, David -Original Message- From: Richard Wallace [mailto:[EMAIL PROTECTED] Sent: Saturday, June 18, 2005 11:04 PM To: MyFaces Discussion Subject: Dynamically adding form elements client-side Hello again, I'm trying to figure out how, if it's possible to add form elements, like text fields, when a user clicks an add button without having to have the page resubmit. I'm not even sure it's 100% possible unless the STATE_SAVING_METHOD is client. And then the javascript would have to manipulate that hidden field. Or do some kind of AJAX operation to modify the state when it's being stored server side. At this point, I think if anything prevents us from adopting JSF at work it would be dynamically adding form elements. Any suggestions? Thanks, Rich
RE: Dynamically adding form elements client-side
Richard, I am still learning about MyFaces so I can only give you the JavaScript/DOM portion of the solution. I can't yet give you information on how to name your fields to work with a map/list/set backed Managed bean. I'm hoping this will get you far enough along so your MyFaces skills can fill in the gaps past my own light DOM/JavaScript knowledge. A good reference link (for me) was: http://www.mozilla.org/docs/dom/technote/tn-dom-table/#quick My test file used an input button on my form with an onClick like so: javascript:addFieldPlusLineBr(this);return false; To invoke a JavaScript example method of my own making to add a text field and line break to the form: script language=javascript function addFieldPlusLineBr(input) { var form = input.form; alert(hello); var inputNode = document.createElement(input); form.appendChild(document.createElement(br)); inputNode.setAttribute(name,fred); inputNode.setAttribute(value,fredValue); form.appendChild(inputNode); } /script Your trick will be figuring out how to place it exactly WHERE you want it in your form. The link I mentioned should include various methods you could invoke to add it after the element, or elements, of your choice. Good luck! Regards, David -Original Message- From: Richard Wallace [mailto:[EMAIL PROTECTED] Sent: Saturday, June 18, 2005 11:10 PM To: MyFaces Discussion Subject: Re: Dynamically adding form elements client-side David G. Friedman wrote: Richard, Are you talking about hiding/showing the fields (such as using a CSS style) or completely adding to the page without a resubmit? Completely adding a new element to the form. Regards, David -Original Message- From: Richard Wallace [mailto:[EMAIL PROTECTED] Sent: Saturday, June 18, 2005 11:04 PM To: MyFaces Discussion Subject: Dynamically adding form elements client-side Hello again, I'm trying to figure out how, if it's possible to add form elements, like text fields, when a user clicks an add button without having to have the page resubmit. I'm not even sure it's 100% possible unless the STATE_SAVING_METHOD is client. And then the javascript would have to manipulate that hidden field. Or do some kind of AJAX operation to modify the state when it's being stored server side. At this point, I think if anything prevents us from adopting JSF at work it would be dynamically adding form elements. Any suggestions? Thanks, Rich
RE: contents of test.jsp file.
Brian, Shouldn't you have the f:root tag somewhere before you call one of the other JSF tags? I haven't used the extensions but I'm just thinking it's probably linked... Regards, David -Original Message- From: Brian Abbott [mailto:[EMAIL PROTECTED] Sent: Friday, May 13, 2005 3:10 PM To: users@myfaces.apache.org Subject: contents of test.jsp file. I'm sorry, I forgot to include the contents of my test.jsp file. It's pretty simple and straightforward. %@ page session=false contentType=text/html;charset=utf-8% %@ taglib uri=http://java.sun.com/jsf/html; prefix=h% %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib uri=http://myfaces.apache.org/extensions; prefix=x% body x:inputDate popupCalendar=true/ /body I've changed the x:inputDate several times. Initially it was f:view. To experiment with the error I walked down the list of tags trying differant ones. The error reported in the last email was the same in each one so I assume it's a config problem? Thanks, Brian __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail
RE: x:inputFileUpload - How to upload multiple files at once?
Heath, I'll debate that. I recall a Struts posting where someone made a custom class to detect and process multiple files in a SINGLE file upload field. But, we're not Struts, are we? LOL. Regards, David -Original Message- From: Heath Borders [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 6:33 PM To: MyFaces Discussion Subject: Re: x:inputFileUpload - How to upload multiple files at once? I don't think that the HTML element input type=file supports multiple files. I think you can only select a single file. On Tue, 29 Mar 2005 17:02:59 -0600, Jonathan Eric Miller [EMAIL PROTECTED] wrote: I'm guessing he's talking about doing it with a single component. I think in theory, it is possible to do this (assuming I was reading the commons-fileupload documentation correctly) using an input type=file/. However, if I remember correctly, the MyFaces component didn't look like it supported that. If I remember correctly, it looked like it assumed that one file was being uploaded. I never tested it with multiple files. Jon - Original Message - From: Heath Borders [EMAIL PROTECTED] To: MyFaces Discussion myfaces-user@incubator.apache.org; Victor Gomez [EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 4:19 PM Subject: Re: x:inputFileUpload - How to upload multiple files at once? Do you mean using more than one x:inputFileUpload / or using a single x:inputFileUpload /? On Tue, 29 Mar 2005 17:10:48 -0500, Victor Gomez [EMAIL PROTECTED] wrote: Is there a way to upload multiple files using the x:inputFileUpload component? Any directions/suggestions are welcomed. Thank you. -- -Heath Borders-Wing [EMAIL PROTECTED] -- -Heath Borders-Wing [EMAIL PROTECTED]
MyFaces and security (2 part question)
I'm still learning about JSF (Core Java Server Faces) and was wondering how to add two types of security. I've tried searching the list archives at marc.theaimsgroup.com, used search engines (i.e. Google), and even tried checking out the old and myfaces sites (wiki, javadoc, jira, etc.). I couldn't find what I was looking for so here are my 2 security related Faces questions: 1. How can I access my JSP files if I hide them under /WEB-INF? I am a current Struts developer (thinking of moving to MyFaces and Shale) and access my pages through Actions so I can keep my JSP's hidden from prying eyes in /WEB-INF/pages. I haven't figured out how to do that with MyFaces yet. 2. Does anyone have suggestions on how to do SSL switching like the Struts SSLExt package? I would like some links to be forced to go to a secure (HTTPS) URL [true], while others are HTTP only [false] and some are allowed to be both [any]. SSLExt(.sourceforge.net) has that for Struts but don't (yet?) see how to do that with MyFaces/JSF. Thank you for any constructive suggestions. Regards, David ([EMAIL PROTECTED])