Re: [Resin-interest] Tapestry on resin...
Alex schrieb: web-app system-property javax .xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app But wouldn't that set the property for the entire JVM instead of for one particular webapp/ Not if you supply your own context aware instance of Properties using System.setProperties(Properties). That isolates the apps/hosts/cluster from each other and they can have their own sets of properties. What is a context-aware instance of Properties? How do I get one? Wouldn't I rather need a context-aware instance of System (which I don't know about)? I just tested this doing System.getProperty(milu.test) in a JSP in webapp xxx and then deployed webapp yyy whose ServletContextListener does System.setProperties(props) where props contains milu.test set to a different value. That affects not only webapp yyy, but also webapp xxx, which now shows the value set by xxx. How would I use System.setProperties(props) without affecting the entire JVM? -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
Michael Ludwig schrieb: I just tested this doing System.getProperty(milu.test) in a JSP in webapp xxx and then deployed webapp yyy whose ServletContextListener does System.setProperties(props) where props contains milu.test set to a different value. That affects not only webapp yyy, but also webapp xxx, which now shows the value set by xxx. The last clause should read: Which now shows the value set by yyy. -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
On Aug 28, 2009, at 3:14 AM, Michael Ludwig wrote: Alex schrieb: web-app system-property javax .xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app But wouldn't that set the property for the entire JVM instead of for one particular webapp/ Not if you supply your own context aware instance of Properties using System.setProperties(Properties). That isolates the apps/hosts/cluster from each other and they can have their own sets of properties. What is a context-aware instance of Properties? How do I get one? Wouldn't I rather need a context-aware instance of System (which I don't know about)? If you're using Resin, you already have one. Resin's system properties depend on the current context. -- Scott I just tested this doing System.getProperty(milu.test) in a JSP in webapp xxx and then deployed webapp yyy whose ServletContextListener does System.setProperties(props) where props contains milu.test set to a different value. That affects not only webapp yyy, but also webapp xxx, which now shows the value set by xxx. How would I use System.setProperties(props) without affecting the entire JVM? -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
Scott Ferguson schrieb: On Aug 28, 2009, at 3:14 AM, Michael Ludwig wrote: Alex schrieb: web-app system-property javax.xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app But wouldn't that set the property for the entire JVM instead of for one particular webapp/ Not if you supply your own context aware instance of Properties using System.setProperties(Properties). What is a context-aware instance of Properties? How do I get one? Wouldn't I rather need a context-aware instance of System (which I don't know about)? If you're using Resin, you already have one. Resin's system properties depend on the current context. I deployed one webapp doing System.setProperties(props) in contextInitialized(ServletContextEvent sce) to /yyy in Resin 4.0.0. I then changed the property value and redeployed to /yyy2. Now both /yyy and /yyy2 show the new property value. They do not seem to be isolated regarding System properties. I'm probably missing something obvious. -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
On Aug 28, 2009, at 9:59 AM, Michael Ludwig wrote: ? If you're using Resin, you already have one. Resin's system properties depend on the current context. I deployed one webapp doing System.setProperties(props) in You can't change the Properties object itself, or you'll override Resin's contextual properties. You need to set the properties using the existing object. -- Scott contextInitialized(ServletContextEvent sce) to /yyy in Resin 4.0.0. I then changed the property value and redeployed to /yyy2. Now both /yyy and /yyy2 show the new property value. They do not seem to be isolated regarding System properties. I'm probably missing something obvious. -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
Scott Ferguson schrieb: On Aug 28, 2009, at 9:59 AM, Michael Ludwig wrote: I deployed one webapp doing System.setProperties(props) in You can't change the Properties object itself, or you'll override Resin's contextual properties. You need to set the properties using the existing object. Thanks! That works fine on Resin :-) Not on Tomcat, though. But we knew that. As you guessed, I foolishly did: Properties props = new Properties(); props.setProperty(name, value); System.setProperties(props); Which, of course, went far beyond making one small change to the properties and caused a considerable general mess. I should have done: Properties props = System.getProperties(); props.setProperty(name, value); -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
Alex schrieb: java.lang.RuntimeException: Exception constructing service 'TemplateParser': Error invoking constructor org.apache.tapestry5.internal.services.TemplateParserImpl(Map, boolean) (at TemplateParserImpl.java:50) via org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder) (at InternalModule.java:65) (for service 'TemplateParser'): com.caucho.xml.stream.XMLInputFactoryImpl cannot be cast to org.codehaus.stax2.XMLInputFactory2 It seems that tapestry expects a particular parser implementation. You can force one by supplying a system property If they really want a particular implementation, they should not be using the JAXP mechanism at all, but directly instantiate their implementation class. web-app system-property javax.xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app But wouldn't that set the property for the entire JVM instead of for one particular webapp/context? The system-property tag could also go under resin, cluster or host tags. And likewise this? Which may create problems for other apps? Nabble - Tomcat - User - Problem with system property http://www.nabble.com/Problem-with-system-property-td24389677.html -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
web-app system-property javax .xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app But wouldn't that set the property for the entire JVM instead of for one particular webapp/ Not if you supply your own context aware instance of Properties using System.setProperties(Properties). That isolates the apps/hosts/cluster from each other and they can have their own sets of properties. --Alex The system-property tag could also go under resin, cluster or host tags. And likewise this? Which may create problems for other apps? Nabble - Tomcat - User - Problem with system property http://www.nabble.com/Problem-with-system-property-td24389677.html -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
Hi Alex and Michael I added the jar files to resin, and I set the the system-properties in the app-default.xml file. And it is working now!!! I think it is working, cause, I dont have a resin-web.xml file in my war file, rigth? Thanks a lots for your help. Fernando Avalos. Date: Fri, 14 Aug 2009 09:23:49 -0700 From: Alex a...@caucho.com Subject: Re: [Resin-interest] Tapestry on resin... To: General Discussion for the Resin application server resin-interest@caucho.com Message-ID: 63e63508-f7f6-4ac3-9b98-1f817332e...@caucho.com Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes web-app system-property javax .xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app But wouldn't that set the property for the entire JVM instead of for one particular webapp/ Not if you supply your own context aware instance of Properties using System.setProperties(Properties). That isolates the apps/hosts/cluster from each other and they can have their own sets of properties. --Alex The system-property tag could also go under resin, cluster or host tags. And likewise this? Which may create problems for other apps? Nabble - Tomcat - User - Problem with system property http://www.nabble.com/Problem-with-system-property-td24389677.html -- Michael Ludwig ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest _ Gracias Messenger por estos 10 años www.aniversariomessenger.com.mx___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] Tapestry on resin...
Hello, I need to work with tapestry on the resin application server, I am really new to Resin and I am getting this error. java.lang.RuntimeException: Exception constructing service 'TemplateParser': Error invoking constructor org.apache.tapestry5.internal.services.TemplateParserImpl(Map, boolean) (at TemplateParserImpl.java:50) via org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder) (at InternalModule.java:65) (for service 'TemplateParser'): com.caucho.xml.stream.XMLInputFactoryImpl cannot be cast to org.codehaus.stax2.XMLInputFactory2 at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:78) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57) at $TemplateParser_12315f2e17e.delegate($TemplateParser_12315f2e17e.java) at $TemplateParser_12315f2e17e.parseTemplate($TemplateParser_12315f2e17e.java) at org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.parseTemplate(ComponentTemplateSourceImpl.java:151) at org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.getTemplate(ComponentTemplateSourceImpl.java:135) at $ComponentTemplateSource_12315f2e17d.getTemplate($ComponentTemplateSource_12315f2e17d.java) Any suggestions? Thanks in advance. Favalos. _ Con Windows Live, puedes organizar, editar y compartir tus fotos. http://www.microsoft.com/mexico/windows/windowslive/products/photo-gallery-edit.aspx___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Tapestry on resin...
Fernando, It seems that tapestry expects a particular parser implementation. You can force one by supplying a system property web-app system-property javax.xml.stream.XMLInputFactory=org.codehaus.stax2.XMLInputFactory2/ /web-app The system-property tag could also go under resin, cluster or host tags. Regards, Alex org.codehaus.stax2.XMLInputFactory2 Hello, I need to work with tapestry on the resin application server, I am really new to Resin and I am getting this error. java.lang.RuntimeException: Exception constructing service 'TemplateParser': Error invoking constructor org.apache.tapestry5.internal.services.TemplateParserImpl(Map, boolean) (at TemplateParserImpl.java:50) via org .apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder) (at InternalModule.java:65) (for service 'TemplateParser'): com.caucho.xml.stream.XMLInputFactoryImpl cannot be cast to org.codehaus.stax2.XMLInputFactory2 at org .apache .tapestry5 .ioc .internal .services .JustInTimeObjectCreator .obtainObjectFromCreator(JustInTimeObjectCreator.java:78) at org .apache .tapestry5 .ioc .internal .services .JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57) at $TemplateParser_12315f2e17e.delegate($TemplateParser_12315f2e17e.java) at $ TemplateParser_12315f2e17e .parseTemplate($TemplateParser_12315f2e17e.java) at org .apache .tapestry5 .internal .services .ComponentTemplateSourceImpl .parseTemplate(ComponentTemplateSourceImpl.java:151) at org .apache .tapestry5 .internal .services .ComponentTemplateSourceImpl .getTemplate(ComponentTemplateSourceImpl.java:135) at $ ComponentTemplateSource_12315f2e17d .getTemplate($ComponentTemplateSource_12315f2e17d.java) Any suggestions? Thanks in advance. Favalos. Con Windows Live, puedes organizar, editar y compartir tus fotos. ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest