Re: Tapestry & Spring
I am planning to use the following with Spring: *) Hibernate *) Web services *) Scheduling *) Jasper Reports I am familiar with Spring and have been using it for some time now. Cheers, Ben On 6/9/06, James Carman <[EMAIL PROTECTED]> wrote: What part of Spring are you looking for? -Original Message- From: Ben [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 11:21 PM To: Tapestry Subject: Tapestry & Spring Hi I am investigating Tapestry 4 for my next project and just wondering if anyone is using Tapestry with Tapestry-Spring in production environment? The thing that halts me back from using Tapestry is that there seems to be a lack of integration between the two frameworks unless using a hack. Cheers, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry & Spring
What part of Spring are you looking for? -Original Message- From: Ben [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 11:21 PM To: Tapestry Subject: Tapestry & Spring Hi I am investigating Tapestry 4 for my next project and just wondering if anyone is using Tapestry with Tapestry-Spring in production environment? The thing that halts me back from using Tapestry is that there seems to be a lack of integration between the two frameworks unless using a hack. Cheers, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry & Spring
Hi I am investigating Tapestry 4 for my next project and just wondering if anyone is using Tapestry with Tapestry-Spring in production environment? The thing that halts me back from using Tapestry is that there seems to be a lack of integration between the two frameworks unless using a hack. Cheers, Ben
Re: OOT : how to use Tap IDEA
only tapidea.jar , but inside the tapidea-0.4.1.zip there are many .jar do i have copy them all into plugins folder ??? [EMAIL PROTECTED] wrote: Copy tapidea jar into the plugins folder of idea, and restart >From Dwi Ardi Irawan <[EMAIL PROTECTED]>: i've already download the Tap IDEA and Demetra but how to install it (without via internet) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OOT : how to use Tap IDEA
Copy tapidea jar into the plugins folder of idea, and restart >From Dwi Ardi Irawan <[EMAIL PROTECTED]>: > i've already download the Tap IDEA and Demetra > but how to install it (without via internet) > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sending a http message to page
What about it sounds like it's not open source? It's a term describing a method of sending continuous data via hidden iframe sections in a document. No one owns it, but Alex Russell from dojotoolkit created the phrase: http://alex.dojotoolkit.org/?p=545 On 6/8/06, Peter Dawn <[EMAIL PROTECTED]> wrote: is comet not open source. it seems like its pretty new and not open source either. are there are tuts for it or any examples for that matter. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Sending a http message to page
is comet not open source. it seems like its pretty new and not open source either. are there are tuts for it or any examples for that matter. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sending a http message to page
yes, i thought of that too. there is no point in sending a message to the page saying, please refresh. if i can send the data in the first place. it will just display it. if it has changed it will display new info, otherwise just the old info. i will try and get this working and will then put it on the net for others. in the meantime, if anyone has any suggestion, do share. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OOT : how to use Tap IDEA
i've already download the Tap IDEA and Demetra but how to install it (without via internet) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sending a http message to page
You are asking for comet, which sounds reasonable but isn't something many are likely to have implemented yet. It's a pretty specialized field right now so asking "how" to do it is a bit much. What you want to do is not send a msg to the page that it needs to refresh, but just send the data that needs refreshing. I have plans for adding this into one of the tapestry 4.1 releases but don't have time for it yet. On 6/8/06, James Carman <[EMAIL PROTECTED]> wrote: Well, you could hand-code a JavaScript solution, but using a framework like the ones you mentioned would save you a tremendous amount of time. -Original Message- From: Peter Dawn [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 8:48 PM To: Tapestry users Subject: Re: Sending a http message to page i dont mind using the tool, if it actually does the job. now there are multiple of ways of doing the same thing, why not try diff approaches rather than using the usual approach. if it doesnt work, so be it. but if it does work, better for all of us. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Sending a http message to page
i agree. and i have been trying to do that all this time. i have zero-ed in on xtile for now and i am going to try and send and receive small messages back from the server and see if it works or not. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sending a http message to page
Well, you could hand-code a JavaScript solution, but using a framework like the ones you mentioned would save you a tremendous amount of time. -Original Message- From: Peter Dawn [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 8:48 PM To: Tapestry users Subject: Re: Sending a http message to page i dont mind using the tool, if it actually does the job. now there are multiple of ways of doing the same thing, why not try diff approaches rather than using the usual approach. if it doesnt work, so be it. but if it does work, better for all of us. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: the cycle of a component and de page in a submit
hello, some one can help me i haven't find the solution place help alvaro tovar --- a a <[EMAIL PROTECTED]> wrote: > > i have a componenet with a property selection, a > hidden with a listener, this component is in the > page > in a Form, > i am tinking that this is the cycle: > page begin render page rewind > seting propertys page > page begin render componenet rewind > render component rewind > seting propertys component > page begin render normal page > rendr component normal > page begin render normal component > is ok this? > > thanks > alvaro andres tovar > > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sending a http message to page
i dont mind using the tool, if it actually does the job. now there are multiple of ways of doing the same thing, why not try diff approaches rather than using the usual approach. if it doesnt work, so be it. but if it does work, better for all of us. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sending a http message to page
Why are you averse to using the right tool for the job? -Original Message- From: Peter Dawn [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 8:42 PM To: tapestry-user@jakarta.apache.org Subject: Sending a http message to page hi all, i am trying to implement a ajax like functionality within my web app. now what i want to do is, i want to send a *ping* to the page, saying please update now (which i will send only if some info changes) and then the page should refresh. now for this, i need to establish a async http connection with the web page and keep it open for ever. i have already read through tacos, dwr, xtile etc. there has to another way of doing something like this without using the above mentioned apps. has anybody done this within tapestry. can someone pls help me out in implementing this. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending a http message to page
hi all, i am trying to implement a ajax like functionality within my web app. now what i want to do is, i want to send a *ping* to the page, saying please update now (which i will send only if some info changes) and then the page should refresh. now for this, i need to establish a async http connection with the web page and keep it open for ever. i have already read through tacos, dwr, xtile etc. there has to another way of doing something like this without using the above mentioned apps. has anybody done this within tapestry. can someone pls help me out in implementing this. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry/Acegi Integration...
All, Now, Acegi secured methods are supported. So, if you have a listener method (taken from the tapernate example): @Secured("ROLE_EDIT") public void editMessage( Message message ) { // Blah blah } The tapernate-acegi module will perform a security check prior to executing the editMessage() method to make sure that the currently authenticated user has the role "ROLE_EDIT". As before, you can place a @Secured annotation on a page class and it will also be secured using a PageValidateListener which checks for the appropriate role. Enjoy! James -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 10:26 AM To: 'Tapestry users' Subject: RE: Tapestry/Acegi Integration... Oh, to login to the example application, you use tapernate/tapernate. -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 10:38 PM To: 'Tapestry users' Subject: Tapestry/Acegi Integration... All, I have taken a stab at Tapestry/Acegi integration. The Tapernate example application now uses Acegi to secure the CreateMessage page (using a @Secured("ROLE_USER") annotation). By no means is this the final version. I just wanted to get it in front of some folks to see what they thought. Enjoy! James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with @Bean annotation
Unfortunately that is not the case. On 6/7/06, spamsucks <[EMAIL PROTECTED]> wrote: While unlikely, another cause could be that you have the bean declared in your spec Andreas Bulling wrote: >On 07. Jun 2006 - 16:09:42, Travis Romney wrote: >| I'm trying to use the @Bean annotation. I have a very simple >| Bean with a no-arg constructor that I'm trying to create. >| >| @Bean >| public abstract InpoweredErrorDelegate getInpoweredErrorDelegate(); >| >| The page loads just fine on the first pass. >| If I try to reload the page, there after I get an exception. >| The error message states that my bean has already been declared. > >Do you have -Dorg.apache.tapestry.disable-caching=true? >I see a similar exception with caching disabled while trying >to load my page with different browsers simultaneously. > >The problem has also been mentioned on this list some weeks ago >but as I remember without any solution :-( > >Andreas > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo question
thanks guys, will that a try. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tacos installation problem
i think my ant file is not including all dojo files for compilation. does somebody know on how to include all the folders within dojo using one ant statement, instead of having an include statement for each folder (as i think ant does not allow you to include recursive folders). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hibernate and binding Exception - Unable to read OGNL expression ''
I'm a complete newbie when it comes to Tapestry. So forgive my inexperience here. I'm having a problem taking my Hello World Tapestry Application to do a simple Hibernate thing. A good chance I'm doing something way wrong so I hope a kind soul can point out where I am making my error. I Have a Home.html that looks like: This is a test Application Word = This text will be replaced by Tapesty Opportunity = 'This text will be replaced by Tapesty' Home.page: http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";> add a description Home.java: (This is the troublesome spot): package edu.asu.clas.TapestryHibernate; import org.apache.log4j.*; import org.apache.tapestry.html.BasePage; import org.hibernate.*; import org.hibernate.cfg.*; import edu.asu.clas.TapestryHibernate.Opportunity; import java.util.List; import java.util.ListIterator; public class Home extends BasePage { Session session = null; static SessionFactory sessionFactory = null; public String getWord() { Category.getInstance(Home.class).error("Returning Hubba"); return "hubba"; } public String getName() { initSessionFactory(); return "AA"; } private void initSessionFactory() { try { if (sessionFactory == null) { // This step will read hibernate.cfg.xml and prepare hibernate for use // sessionFactory = new Configuration().configure().buildSessionFactory(); Category.getInstance(Home.class).error("I'm ready to create a configuration"); Configuration cfg = new Configuration(); Category.getInstance(Home.class).error("I created a configuration"); Category.getInstance(Home.class).error("I'm ready to configure the configuration"); cfg.configure("hibernate.cfg.xml"); Category.getInstance(Home.class).error("I configured the configuration"); Category.getInstance(Home.class).error("I'm ready to build the sessionFactory"); sessionFactory = cfg.buildSessionFactory(); Category.getInstance(Home.class).error("I built the sessionFactory"); } } catch(Exception e) { Category.getInstance(Home.class).error("Transaction- " + e.getMessage()); } } } --- Here's the problem. In getName(), if I comment out the call to initSessionFactory() all runs as expected. If I make a call to initSessionFactory() from getName I get the error: org.apache.tapestry.BindingException Unable to read OGNL expression '' of [EMAIL PROTECTED]: name binding:ExpressionBinding[Home name] location: context:/WEB-INF/Home.page, line 16, column 44 11 12 13 14 15 16 17 18 19 With line 16 highlighted. I'm using log4j but not all of the error lines are logged. The log looks as follows: 14:41:01,927 INFO [TomcatDeployer] deploy, ctxPath=/TapestryHibernate, warUrl=.../tmp/deploy/tmp216TapestryHibernate.war/ 14:41:04,416 INFO [ApplicationServlet] Initialized application servlet 'TapestryHibernate': 791 millis to create HiveMind Registry, 2,337 millis overall. 14:41:17,204 ERROR [Home] Returning Hubba 14:41:17,291 ERROR [Home] I'm ready to create a configuration 14:41:17,293 ERROR [Home] I created a configuration 14:41:17,294 ERROR [Home] I'm ready to configure the configuration 14:41:17,295 INFO [Configuration] configuring from resource: hibernate.cfg.xml 14:41:17,296 INFO [Configuration] Configuration resource: hibernate.cfg.xml 14:41:17,319 INFO [Configuration] Reading mappings from resource: edu/asu/clas/TapestryHibernate/Opportunity.hbm.xml 14:41:17,412 INFO [HbmBinder] Mapping class: edu.asu.clas.TapestryHibernate.Opportunity -> opportunity 14:41:17,415 INFO [Configuration] Configured SessionFactory: researchopps 14:41:17,416 ERROR [Home] I configured the configuration 14:41:17,417 ERROR [Home] I'm ready to build the sessionFactory 14:41:17,418 INFO [Configuration] processing extends queue 14:41:17,419 INFO [Configuration] processing collection mappings 14:41:17,419 INFO [Configuration] processing association property references 14:41:17,420 INFO [Configuration] processing foreign key constraints 14:41:17,421 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!) 14:41:17,422 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20 14:41:17,423 INFO [DriverManagerConnectionProvider] autocommit mode: false 14:41:17,423 INFO [DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://server.la.asu.edu/researchopps 14:41:17,424 INFO [DriverManagerConnectionProvider] connection properties: {user=xxx, password=xxx} 14:41:17,474 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.18-log 14:41:17,475 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Drive
RE: How do you test your tapestry apps?
For user-testing (e.g. simulating user-clicks, typing in fields, etc.), I started with Canoo WebTest, but have since switched enthusiastically to Selenium (http://www.openqa.org/selenium/), along with the Selenium IDE and Xpather plugins for Firefox. It's black-box testing, but since my Tapestry listeners are generally just calling service-beans which have already been JUnit unit- and integration-tested, it's decent coverage. Jim -Original Message- From: Rob Dennett [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 3:50 PM To: Tapestry users Subject: How do you test your tapestry apps? How do you test your apps? How should I do it? What would Howard do (if he were using rather than developing Tapestry)? Thanks for your help, Rob -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.3/358 - Release Date: 6/7/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Test
Some really screwy things happened when I tried to subscribe. It said that the tapestry-users-subscribe mailbox didn't exist and bounced my request back. Yet, I am getting messages now. H. This is just a test to see if this gets through. > -Original Message- > From: Jim Steinberger [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 08, 2006 1:26 PM > To: users@tapestry.apache.org > Subject: Absolute filepath of a webapp > > Hello (terribly sorry if this comes twice; I believe I sent it to the > old mailing address earlier), > > Tapestry.getApplicationRootLocation(IRequestCycle) seems to have > disappeared in Tapestry 4. Does anyone know of a replacement? That is, > given an instance of IRequestCycle, does anyone know how to > programmatically determine the absolute filepath of a web application in > Tapestry 4? I've been swimming around the JavaDocs but haven't found > the link if one even exists. > > > If you're wondering, I'm trying to register the following extension in > my .application file: > > class="..."> > > And my ISpecificationResolverDelegate needs to know what the absolute > filepath of the webapp is, but without > Tapestry.getApplicationRootLocation(..), and since I can't inject the > ServletContext/WebContext object into this class because it's not a > component (am I missing something there? I see only that I can nest > tags inside tags, but that only seems to > support Java primitives and Strings ..), I can't seem to do this. > > > I did read in the configuration section of the docs that the ..> tag is deprecated in lieu of HiveMind, but it's not yet clear to me > how I would do this; I found the > tapestry.page.SpecificationResolverDelegate service-point in the > HiveMind registry, but I'm not yet sure how to extend it. > > Have spent way too much time on what can be done in one line of servlet > code (am nearly ready to make a startup-servlet that provides a > static-accessor to the absolute path, which is gross but apparently > hours-quicker); I'd appreciate any guidance. > > > Thanks a ton, > Jim > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Absolute filepath of a webapp
Hello (terribly sorry if this comes twice; I believe I sent it to the old mailing address earlier), Tapestry.getApplicationRootLocation(IRequestCycle) seems to have disappeared in Tapestry 4. Does anyone know of a replacement? That is, given an instance of IRequestCycle, does anyone know how to programmatically determine the absolute filepath of a web application in Tapestry 4? I've been swimming around the JavaDocs but haven't found the link if one even exists. If you're wondering, I'm trying to register the following extension in my .application file: And my ISpecificationResolverDelegate needs to know what the absolute filepath of the webapp is, but without Tapestry.getApplicationRootLocation(..), and since I can't inject the ServletContext/WebContext object into this class because it's not a component (am I missing something there? I see only that I can nest tags inside tags, but that only seems to support Java primitives and Strings ..), I can't seem to do this. I did read in the configuration section of the docs that the tag is deprecated in lieu of HiveMind, but it's not yet clear to me how I would do this; I found the tapestry.page.SpecificationResolverDelegate service-point in the HiveMind registry, but I'm not yet sure how to extend it. Have spent way too much time on what can be done in one line of servlet code (am nearly ready to make a startup-servlet that provides a static-accessor to the absolute path, which is gross but apparently hours-quicker); I'd appreciate any guidance. Thanks a ton, Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator foo
All, We are running into a problem with an over eager validator. We have a custom validator that is supposed to check a field for a properly formatted URL. However, we only want the validator to do the check if an associated checkbox is checked. And to make matters worse, we have an AnySubmit wrapped around the checkbox. So, if you leave the field blank and uncheck the box, then the submit happens and you get an error. So, what I wanted to do was to pass in a boolean to the validator that is the checkbox true/false value and only do the validation when the box is checked. BTW, this is 3.x. Thoughts? thanks, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Absolute filepath of a webapp
Hello, Tapestry.getApplicationRootLocation(IRequestCycle) seems to have disappeared in Tapestry 4. Does anyone know of a replacement? That is, given an instance of IRequestCycle, does anyone know how to programmatically determine the absolute filepath of a web application in Tapestry 4? I've been swimming around the JavaDocs but haven't found the link if one even exists. If you're wondering, I'm trying to register the following extension in my .application file: And my ISpecificationResolverDelegate needs to know what the absolute filepath of the webapp is, but without Tapestry.getApplicationRootLocation(..), and since I can't inject the ServletContext/WebContext object into this class because it's not a component (am I missing something there? I see only that I can nest tags inside tags, but that only seems to support Java primitives and Strings ..), I can't seem to do this. I did read in the configuration section of the docs that the tag is deprecated in lieu of HiveMind, but it's not yet clear to me how I would do this; I found the tapestry.page.SpecificationResolverDelegate service-point in the HiveMind registry, but I'm not yet sure how to extend it. Have spent way too much time on what can be done in one line of servlet code (am nearly ready to make a startup-servlet that provides a static-accessor to the absolute path, which is gross but apparently hours-quicker); I'd appreciate any guidance. Thanks a ton, Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] loading resources from the classpath in a static method
Please read this. http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property-p2.html > I have static method where i need to read a .properties file off of the > classpath. The same code that works when running under a tapestry > application in jetty does not work when run as a normal java program in > eclipse. It's a static method and we're getting the resource using: > > ThisClass.class.getClassLoader().getResourceAsStream("/path/to/resource.properties"); > > Any suggestions? > > -- > Dan Adams > Software Engineer > Interactive Factory > 617.235.5857 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do you test your tapestry apps?
How do you test your apps? How should I do it? What would Howard do (if he were using rather than developing Tapestry)? Thanks for your help, Rob -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.3/358 - Release Date: 6/7/2006
Re: [OT] loading resources from the classpath in a static method
You can also try checking off "Allow output folders for source folders" in your build config... To remove all doubt just look at the contents of whatever folder eclipse is compiling to. On 6/8/06, Henri Dupre <[EMAIL PROTECTED]> wrote: Check the "run" configuration of your app... Eventually try to delete it and create a new one. The "Run" configuration may not contain the same classpath. On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote: > > Well, that's the thing. The properties file *is* on the build path and > the same code works fine in the web app. But I never run normal java > apps within eclipse so i'm not sure if we're doin something wrong. I > made sure that the project is on the java app runner classpath as well > as the maven dependencies and even the actually classes folder. Guess > I'll have to fool with it or something. > > On Thu, 2006-06-08 at 14:58 -0400, Jesse Kuhnert wrote: > > Eclipse can be decieving. You have to be really sure the properties file > you > > are referencing really ~is~ on the classpath when you run it in eclipse. > My > > guess is that it is not. This usually isn't an issue if the resources > you > > are referencing are in the same tree as your java sources. > > > > Not to worry though.. If you go to Project->Java Build Path-> and add in > > whatever folder contains your .properties file as either a new source > folder > > or into the library path (as a class folder) it should pick it up. > (maybe > > ...you'll have to play with it) > > > > On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote: > > > > > > I have static method where i need to read a .properties file off of > the > > > classpath. The same code that works when running under a tapestry > > > application in jetty does not work when run as a normal java program > in > > > eclipse. It's a static method and we're getting the resource using: > > > > > > ThisClass.class.getClassLoader > > > ().getResourceAsStream("/path/to/resource.properties"); > > > > > > Any suggestions? > > > > > > -- > > > Dan Adams > > > Software Engineer > > > Interactive Factory > > > 617.235.5857 > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > -- > Dan Adams > Software Engineer > Interactive Factory > 617.235.5857 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks, Henri. -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: [OT] loading resources from the classpath in a static method
Check the "run" configuration of your app... Eventually try to delete it and create a new one. The "Run" configuration may not contain the same classpath. On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote: Well, that's the thing. The properties file *is* on the build path and the same code works fine in the web app. But I never run normal java apps within eclipse so i'm not sure if we're doin something wrong. I made sure that the project is on the java app runner classpath as well as the maven dependencies and even the actually classes folder. Guess I'll have to fool with it or something. On Thu, 2006-06-08 at 14:58 -0400, Jesse Kuhnert wrote: > Eclipse can be decieving. You have to be really sure the properties file you > are referencing really ~is~ on the classpath when you run it in eclipse. My > guess is that it is not. This usually isn't an issue if the resources you > are referencing are in the same tree as your java sources. > > Not to worry though.. If you go to Project->Java Build Path-> and add in > whatever folder contains your .properties file as either a new source folder > or into the library path (as a class folder) it should pick it up. (maybe > ...you'll have to play with it) > > On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote: > > > > I have static method where i need to read a .properties file off of the > > classpath. The same code that works when running under a tapestry > > application in jetty does not work when run as a normal java program in > > eclipse. It's a static method and we're getting the resource using: > > > > ThisClass.class.getClassLoader > > ().getResourceAsStream("/path/to/resource.properties"); > > > > Any suggestions? > > > > -- > > Dan Adams > > Software Engineer > > Interactive Factory > > 617.235.5857 > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Henri.
Re: [OT] loading resources from the classpath in a static method
Well, that's the thing. The properties file *is* on the build path and the same code works fine in the web app. But I never run normal java apps within eclipse so i'm not sure if we're doin something wrong. I made sure that the project is on the java app runner classpath as well as the maven dependencies and even the actually classes folder. Guess I'll have to fool with it or something. On Thu, 2006-06-08 at 14:58 -0400, Jesse Kuhnert wrote: > Eclipse can be decieving. You have to be really sure the properties file you > are referencing really ~is~ on the classpath when you run it in eclipse. My > guess is that it is not. This usually isn't an issue if the resources you > are referencing are in the same tree as your java sources. > > Not to worry though.. If you go to Project->Java Build Path-> and add in > whatever folder contains your .properties file as either a new source folder > or into the library path (as a class folder) it should pick it up. (maybe > ...you'll have to play with it) > > On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote: > > > > I have static method where i need to read a .properties file off of the > > classpath. The same code that works when running under a tapestry > > application in jetty does not work when run as a normal java program in > > eclipse. It's a static method and we're getting the resource using: > > > > ThisClass.class.getClassLoader > > ().getResourceAsStream("/path/to/resource.properties"); > > > > Any suggestions? > > > > -- > > Dan Adams > > Software Engineer > > Interactive Factory > > 617.235.5857 > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tacos examples
Of course, sorry :) Cheers, PS On 6/8/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: Yeah, I've been waiting for the next release and only just got the site up a few days ago.. On 6/8/06, Peter Svensson <[EMAIL PROTECTED]> wrote: > > Maybe someone could change the link on the main tacos site, for the > component examples. It would be great if people got there the easy way :) > > Cheers, > PS > > On 6/7/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > > > > On 06. Jun 2006 - 16:08:14, Jesse Kuhnert wrote: > > | It's been moved to the new site finally, but I still need to do some > > | subdomain fun to get it the way I'd like. > > | > > | This demo is current as of a few days ago, so it might be misleading > to > > say > > | it's "official" if there are any bugs/ whatever.. > > | > > | http://opencomponentry.com:8080/tacos > > > > Thanks for that :-) > > > > Andreas > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Tacos examples
Yeah, I've been waiting for the next release and only just got the site up a few days ago.. On 6/8/06, Peter Svensson <[EMAIL PROTECTED]> wrote: Maybe someone could change the link on the main tacos site, for the component examples. It would be great if people got there the easy way :) Cheers, PS On 6/7/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > > On 06. Jun 2006 - 16:08:14, Jesse Kuhnert wrote: > | It's been moved to the new site finally, but I still need to do some > | subdomain fun to get it the way I'd like. > | > | This demo is current as of a few days ago, so it might be misleading to > say > | it's "official" if there are any bugs/ whatever.. > | > | http://opencomponentry.com:8080/tacos > > Thanks for that :-) > > Andreas > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: [OT] loading resources from the classpath in a static method
Eclipse can be decieving. You have to be really sure the properties file you are referencing really ~is~ on the classpath when you run it in eclipse. My guess is that it is not. This usually isn't an issue if the resources you are referencing are in the same tree as your java sources. Not to worry though.. If you go to Project->Java Build Path-> and add in whatever folder contains your .properties file as either a new source folder or into the library path (as a class folder) it should pick it up. (maybe ...you'll have to play with it) On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote: I have static method where i need to read a .properties file off of the classpath. The same code that works when running under a tapestry application in jetty does not work when run as a normal java program in eclipse. It's a static method and we're getting the resource using: ThisClass.class.getClassLoader ().getResourceAsStream("/path/to/resource.properties"); Any suggestions? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Tacos examples
Maybe someone could change the link on the main tacos site, for the component examples. It would be great if people got there the easy way :) Cheers, PS On 6/7/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: On 06. Jun 2006 - 16:08:14, Jesse Kuhnert wrote: | It's been moved to the new site finally, but I still need to do some | subdomain fun to get it the way I'd like. | | This demo is current as of a few days ago, so it might be misleading to say | it's "official" if there are any bugs/ whatever.. | | http://opencomponentry.com:8080/tacos Thanks for that :-) Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] loading resources from the classpath in a static method
I have static method where i need to read a .properties file off of the classpath. The same code that works when running under a tapestry application in jetty does not work when run as a normal java program in eclipse. It's a static method and we're getting the resource using: ThisClass.class.getClassLoader().getResourceAsStream("/path/to/resource.properties"); Any suggestions? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Response is already committed!!! HELP!!!! NEWBIE
Maybe the page finishLoad(cycle, loader, specification) method? Jesse Kuhnert wrote: This is getting sewwious. (sorry, if you have kids you'll know ;)) pageBeginRender() is a method that means rendering content back to the browser has already started, at which point it is too late to set the content type of your response. You might try a listener method approach instead, or use a hivemind service to do it directly. On 6/8/06, yesidredondo <[EMAIL PROTECTED]> wrote: Hi, i've a problem that don't know how to fix. A "java.lang.IllegalStateException: Response is already committed!" exception is beeing thrown when i set the content type to ms-excel in the pagebeginrender method of a page: // This is the code i'm using to set the content type on the pageBeginRender HttpServletResponse responses = this.getPage().getRequestCycle().getRequestContext().getResponse(); try { responses.setContentType ("application/vnd.ms-excel"); responses.setHeader("Content-disposition", "inline; filename=report.xls"); responses.setContentType ("application/vnd.ms-excel"); responses.flushBuffer(); } catch (IOException e) { e.printStackTrace(); } and this is the full stacktrace: java.lang.IllegalStateException: Response is already committed! at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindHttpServletResponse.setContentType( EvermindHttpServletResponse.java:1049)at org.apache.tapestry.request.ResponseOutputStream.open( ResponseOutputStream.java:182)at org.apache.tapestry.request.ResponseOutputStream.write( ResponseOutputStream.java:270) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:427)at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160)at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)at java.io.BufferedWriter.close(BufferedWriter.java:244) at java.io.PrintWriter.close(PrintWriter.java:137) at org.apache.tapestry.AbstractMarkupWriter.close(AbstractMarkupWriter.java :492) at org.apache.tapestry.engine.AbstractEngine.renderResponse( AbstractEngine.java:764)at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage( AbstractEngine.java:476)at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java :931)at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java :198)at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke( ServletRequestDispatcher.java:765) any help would be really appreciated. Thanks. Hermann Yesid Redondo Eslava Ingeniería de Sistemas IT-GROUP LTDA. Bogotá D.C., Colombia. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ivano Pagano ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Response is already committed!!! HELP!!!! NEWBIE
This is getting sewwious. (sorry, if you have kids you'll know ;)) pageBeginRender() is a method that means rendering content back to the browser has already started, at which point it is too late to set the content type of your response. You might try a listener method approach instead, or use a hivemind service to do it directly. On 6/8/06, yesidredondo <[EMAIL PROTECTED]> wrote: Hi, i've a problem that don't know how to fix. A "java.lang.IllegalStateException: Response is already committed!" exception is beeing thrown when i set the content type to ms-excel in the pagebeginrender method of a page: // This is the code i'm using to set the content type on the pageBeginRender HttpServletResponse responses = this.getPage().getRequestCycle().getRequestContext().getResponse(); try { responses.setContentType ("application/vnd.ms-excel"); responses.setHeader("Content-disposition", "inline; filename=report.xls"); responses.setContentType ("application/vnd.ms-excel"); responses.flushBuffer(); } catch (IOException e) { e.printStackTrace(); } and this is the full stacktrace: java.lang.IllegalStateException: Response is already committed! at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindHttpServletResponse.setContentType( EvermindHttpServletResponse.java:1049)at org.apache.tapestry.request.ResponseOutputStream.open( ResponseOutputStream.java:182)at org.apache.tapestry.request.ResponseOutputStream.write( ResponseOutputStream.java:270) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:427)at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160)at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)at java.io.BufferedWriter.close(BufferedWriter.java:244) at java.io.PrintWriter.close(PrintWriter.java:137) at org.apache.tapestry.AbstractMarkupWriter.close(AbstractMarkupWriter.java :492) at org.apache.tapestry.engine.AbstractEngine.renderResponse( AbstractEngine.java:764)at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage( AbstractEngine.java:476)at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java :931)at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java :198)at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke( ServletRequestDispatcher.java:765) any help would be really appreciated. Thanks. Hermann Yesid Redondo Eslava Ingeniería de Sistemas IT-GROUP LTDA. Bogotá D.C., Colombia. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Response is already committed!!! HELP!!!! NEWBIE
Hi, i've a problem that don't know how to fix. A "java.lang.IllegalStateException: Response is already committed!" exception is beeing thrown when i set the content type to ms-excel in the pagebeginrender method of a page: // This is the code i'm using to set the content type on the pageBeginRender HttpServletResponse responses = this.getPage().getRequestCycle().getRequestContext().getResponse(); try { responses.setContentType("application/vnd.ms-excel"); responses.setHeader("Content-disposition", "inline; filename=report.xls"); responses.setContentType("application/vnd.ms-excel"); responses.flushBuffer(); } catch (IOException e) { e.printStackTrace(); } and this is the full stacktrace: java.lang.IllegalStateException: Response is already committed! at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindHttpServletResponse.setContentType(EvermindHttpServletResponse.java:1049)at org.apache.tapestry.request.ResponseOutputStream.open(ResponseOutputStream.java:182)at org.apache.tapestry.request.ResponseOutputStream.write(ResponseOutputStream.java:270) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:427)at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160)at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)at java.io.BufferedWriter.close(BufferedWriter.java:244) at java.io.PrintWriter.close(PrintWriter.java:137) at org.apache.tapestry.AbstractMarkupWriter.close(AbstractMarkupWriter.java:492) at org.apache.tapestry.engine.AbstractEngine.renderResponse(AbstractEngine.java:764)at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:476)at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:931)at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) any help would be really appreciated. Thanks. Hermann Yesid Redondo Eslava Ingeniería de Sistemas IT-GROUP LTDA. Bogotá D.C., Colombia. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry+Spring+Hibernate was ->RE: @For within a @contrib:Table
Or, use Tapernate! Other folks are using it and they seem to like it a lot. It does roughly the same thing as the Spring OpenSessionInViewFilter, but it also does a whole lot more. Check out the documentation at: www.carmanconsulting.com/tapernate James -Original Message- From: albartell [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 12:37 PM To: 'Tapestry users' Subject: Tapestry+Spring+Hibernate was ->RE: @For within a @contrib:Table Ok, I have looked into the Tapestry+Spring+Hibernate approach prescribed by Eric and have some questions. I am going to go into some code depth for the archives. Note that I have visited http://wiki.apache.org/tapestry/FrequentlyAskedQuestions/SpringHibernate and some other threads in this list but think that I still need some final clarification from someone who has lived it and can state that my following scenario will be addressed by the introduction of Spring into the mix. Currently I use myeclipseide.com to generate my DAO POJO's from MySQL tables. In the relationship of a Lead (parent) to Leadtag (child) it creates the following class (note the absence of any Hibernate related code)... public abstract class AbstractLead implements java.io.Serializable { private Set leadtags = new HashSet(0); ...code ommitted for brevity sake... public Set getLeadtags() { return this.leadtags; } public void setLeadtags(Set leadtags) { this.leadtags = leadtags; } } The above is "fronted" by the Lead.hbm.xml file which is as follows: ...code ommitted for brevity sake... My hibernate.cfg.xml file is configured as follows: java:comp/env/jdbc/rxscp org.hibernate.dialect.MySQLDialect true I configure the DBCP (specified above) in the /META-INF/context.xml file as follows: Here is where my problem comes. I traditionally have used a Servlet filter to initiate a single session per request as per the below DBConn.java code. When I need to make a call to the database I simply do a DBConn.sess().createQuery(...etc. The DBConn.sess() approach works great for when I want to manually do a specific query that isn't facilitated by the getters built by myeclipseide.com; but when I want to make use of getLeadtags() to produce a list it is not using DBConn.sess() but is instead invoking a new DB connection somehow someway (I have no idea how it does it, I just like the work I DON'T have to do:-) So I guess my question is this: Given the two methods of DB access I am doing (i.e. manual way using DBConn.sess(), and Hibernates zero code approach) will OpenSessionInViewFilter be able to appropriately intercept both and my lazy loading woes will be resolved? public class DBConn implements Filter { private static Logger logger = Logger.getLogger(DBConn.class.getName()) private static SessionFactory sessionFactory; private static ThreadLocal tl = new ThreadLocal(); static { try { sessionFactory = new Configuration().configure().buildSessionFactory(); } catch (HibernateException e) { System.err.println("Initial SessionFactory creation failed." + e); e.printStackTrace(); throw new ExceptionInInitializerError(e); } } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { chain.doFilter(request, response); } finally { Session s = (Session) tl.get(); if (s != null) { try { s.flush(); s.close(); } catch (HibernateException e) { e.printStackTrace(); } tl.set(null); } } } public static Session sess() { Session s = (Session) tl.get(); if (s == null || !s.isOpen()) { try { s = sessionFactory.openSession(); } catch (HibernateException e) { e.printStackTrace(); } tl.set(s); } return s; } public void init(FilterConfig filterConfig) throws ServletException { } public void destroy() { } } Aaron Bartell http://mowyourlawn.com/blog -Original Message- From: Eric Fesler [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 8:26 AM To: Tapestry users Subject: Re: @For within a @contrib:Table Hi, I already had this issue in the past. It was due to the fact that the leadtagtype (or equivalent) method was called on the leadtag bean after the hibernate session was closed. There are two ways to solve the issue. 1°) Do not use lazy loading for the leadtagtype association 2°) Use the OpenSessi
Tapestry+Spring+Hibernate was ->RE: @For within a @contrib:Table
Ok, I have looked into the Tapestry+Spring+Hibernate approach prescribed by Eric and have some questions. I am going to go into some code depth for the archives. Note that I have visited http://wiki.apache.org/tapestry/FrequentlyAskedQuestions/SpringHibernate and some other threads in this list but think that I still need some final clarification from someone who has lived it and can state that my following scenario will be addressed by the introduction of Spring into the mix. Currently I use myeclipseide.com to generate my DAO POJO's from MySQL tables. In the relationship of a Lead (parent) to Leadtag (child) it creates the following class (note the absence of any Hibernate related code)... public abstract class AbstractLead implements java.io.Serializable { private Set leadtags = new HashSet(0); ...code ommitted for brevity sake... public Set getLeadtags() { return this.leadtags; } public void setLeadtags(Set leadtags) { this.leadtags = leadtags; } } The above is "fronted" by the Lead.hbm.xml file which is as follows: ...code ommitted for brevity sake... My hibernate.cfg.xml file is configured as follows: java:comp/env/jdbc/rxscp org.hibernate.dialect.MySQLDialect true I configure the DBCP (specified above) in the /META-INF/context.xml file as follows: Here is where my problem comes. I traditionally have used a Servlet filter to initiate a single session per request as per the below DBConn.java code. When I need to make a call to the database I simply do a DBConn.sess().createQuery(...etc. The DBConn.sess() approach works great for when I want to manually do a specific query that isn't facilitated by the getters built by myeclipseide.com; but when I want to make use of getLeadtags() to produce a list it is not using DBConn.sess() but is instead invoking a new DB connection somehow someway (I have no idea how it does it, I just like the work I DON'T have to do:-) So I guess my question is this: Given the two methods of DB access I am doing (i.e. manual way using DBConn.sess(), and Hibernates zero code approach) will OpenSessionInViewFilter be able to appropriately intercept both and my lazy loading woes will be resolved? public class DBConn implements Filter { private static Logger logger = Logger.getLogger(DBConn.class.getName()) private static SessionFactory sessionFactory; private static ThreadLocal tl = new ThreadLocal(); static { try { sessionFactory = new Configuration().configure().buildSessionFactory(); } catch (HibernateException e) { System.err.println("Initial SessionFactory creation failed." + e); e.printStackTrace(); throw new ExceptionInInitializerError(e); } } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { chain.doFilter(request, response); } finally { Session s = (Session) tl.get(); if (s != null) { try { s.flush(); s.close(); } catch (HibernateException e) { e.printStackTrace(); } tl.set(null); } } } public static Session sess() { Session s = (Session) tl.get(); if (s == null || !s.isOpen()) { try { s = sessionFactory.openSession(); } catch (HibernateException e) { e.printStackTrace(); } tl.set(s); } return s; } public void init(FilterConfig filterConfig) throws ServletException { } public void destroy() { } } Aaron Bartell http://mowyourlawn.com/blog -Original Message- From: Eric Fesler [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 8:26 AM To: Tapestry users Subject: Re: @For within a @contrib:Table Hi, I already had this issue in the past. It was due to the fact that the leadtagtype (or equivalent) method was called on the leadtag bean after the hibernate session was closed. There are two ways to solve the issue. 1°) Do not use lazy loading for the leadtagtype association 2°) Use the OpenSessionInViewFilter of the Spring framework. This filter opens the session only once per request and close it at the end of the request. --ERic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry/Acegi Integration...
Oh, to login to the example application, you use tapernate/tapernate. -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 10:38 PM To: 'Tapestry users' Subject: Tapestry/Acegi Integration... All, I have taken a stab at Tapestry/Acegi integration. The Tapernate example application now uses Acegi to secure the CreateMessage page (using a @Secured("ROLE_USER") annotation). By no means is this the final version. I just wanted to get it in front of some folks to see what they thought. Enjoy! James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: @For within a @contrib:Table
Thanks Eric, that makes sense as to why it is occurring. I am going to shoot for option 2 below as right now I am doing my Hibernate open/close of the session through a servlet filter. Thanks again, Aaron Bartell -Original Message- From: Eric Fesler [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 8:26 AM To: Tapestry users Subject: Re: @For within a @contrib:Table Hi, I already had this issue in the past. It was due to the fact that the leadtagtype (or equivalent) method was called on the leadtag bean after the hibernate session was closed. There are two ways to solve the issue. 1°) Do not use lazy loading for the leadtagtype association 2°) Use the OpenSessionInViewFilter of the Spring framework. This filter opens the session only once per request and close it at the end of the request. --ERic On Wednesday 07 June 2006 19:43, albartell wrote: > I am having an odd issue. When the below executes it obtains > ognl:dataItems just fine, but when it gets to the internal @For loop an error is thrown: > > ognl.OgnlException... source is null for getProperty(null, > "leadtagtype") > > The problem seems to be that the contrib:Table isn't waiting for the > leadtagtype method to be called/loaded (which is lazy loaded by > Hibernate), because when I run it through debug leadtagtype DOES get > called, but not until after the page has rendered. Anybody else ever have this problem? > > > >columns="leadtag,leaduid,firstname,lastname,cmpyname,expirehigh,saleper >cent >, procgroup,serialnbr,model,action" > rowsClass="ognl:beans.evenOdd.next" > pageSize="12"> > > > > source="ognl:components.table.tableRow.leadtags" value="ognl:leadtag" > element="tr"> > >value="ognl:leadtag.leadtagtype.name"/> > > > > > > > Thanks in advance, > Aaron Bartell > http://mowyourlawn.com/blog -- Eric Fesler Technical Director --- Audaxis S.A. Tel: +32 (0)2 361.83.01 Fax: +32 (0)2 361.83.11 Mob: +32 (0)478 22.90.78 http://www.audaxis.com PGP Fingerprint : FECF 2841 48B7 47D8 C426 55A4 0A60 FB52 833B 1EF1 Public PGP key : available at server subkeys.pgp.net --- In the plot, people came to the land; the land loved them; they worked and struggled and had lots of children. There was a Frenchman who talked funny and a greenhorn from England who was a fancy-pants but when it came to the crunch he was all courage. Those novels would make you retch. -- Canadian novelist Robertson Davies, on the generic Canadian novel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @For within a @contrib:Table
Hi, I already had this issue in the past. It was due to the fact that the leadtagtype (or equivalent) method was called on the leadtag bean after the hibernate session was closed. There are two ways to solve the issue. 1°) Do not use lazy loading for the leadtagtype association 2°) Use the OpenSessionInViewFilter of the Spring framework. This filter opens the session only once per request and close it at the end of the request. --ERic On Wednesday 07 June 2006 19:43, albartell wrote: > I am having an odd issue. When the below executes it obtains ognl:dataItems > just fine, but when it gets to the internal @For loop an error is thrown: > > ognl.OgnlException... source is null for getProperty(null, "leadtagtype") > > The problem seems to be that the contrib:Table isn't waiting for the > leadtagtype method to be called/loaded (which is lazy loaded by Hibernate), > because when I run it through debug leadtagtype DOES get called, but not > until after the page has rendered. Anybody else ever have this problem? > > > columns="leadtag,leaduid,firstname,lastname,cmpyname,expirehigh,salepercent >, procgroup,serialnbr,model,action" > rowsClass="ognl:beans.evenOdd.next" > pageSize="12"> > > > > source="ognl:components.table.tableRow.leadtags" value="ognl:leadtag" > element="tr"> > >value="ognl:leadtag.leadtagtype.name"/> > > > > > > > Thanks in advance, > Aaron Bartell > http://mowyourlawn.com/blog -- Eric Fesler Technical Director --- Audaxis S.A. Tel: +32 (0)2 361.83.01 Fax: +32 (0)2 361.83.11 Mob: +32 (0)478 22.90.78 http://www.audaxis.com PGP Fingerprint : FECF 2841 48B7 47D8 C426 55A4 0A60 FB52 833B 1EF1 Public PGP key : available at server subkeys.pgp.net --- In the plot, people came to the land; the land loved them; they worked and struggled and had lots of children. There was a Frenchman who talked funny and a greenhorn from England who was a fancy-pants but when it came to the crunch he was all courage. Those novels would make you retch. -- Canadian novelist Robertson Davies, on the generic Canadian novel. pgp8vyEwX9qtz.pgp Description: PGP signature
Re: Problems with @Bean annotation
I filed a JIRA a while back about Annotations execeptions when in development mode. Maybe this can be addressed before 4.1? On 6/7/06, spamsucks <[EMAIL PROTECTED]> wrote: While unlikely, another cause could be that you have the bean declared in your spec Andreas Bulling wrote: >On 07. Jun 2006 - 16:09:42, Travis Romney wrote: >| I'm trying to use the @Bean annotation. I have a very simple >| Bean with a no-arg constructor that I'm trying to create. >| >| @Bean >| public abstract InpoweredErrorDelegate getInpoweredErrorDelegate(); >| >| The page loads just fine on the first pass. >| If I try to reload the page, there after I get an exception. >| The error message states that my bean has already been declared. > >Do you have -Dorg.apache.tapestry.disable-caching=true? >I see a similar exception with caching disabled while trying >to load my page with different browsers simultaneously. > >The problem has also been mentioned on this list some weeks ago >but as I remember without any solution :-( > >Andreas > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~chris
Re: strange problem losing session variables
We are getting null values so the values are being lost it's not sync problem. On 6/7/06, Henri Dupre <[EMAIL PROTECTED]> wrote: Maybe synchronization glitches can be the cause? nothing prevents a user from firing two concurrent requests that would both modify your session objects at the same time. On 6/7/06, John Menke <[EMAIL PROTECTED]> wrote: > > Peter it's definitely storing them... This problem is sporadic... we can't > reproduce - only we see the errors in the log > > On 6/5/06, Peter Dawn <[EMAIL PROTECTED]> wrote: > > > > perhaps your variable is not being stored in the first place. i used > > to get the same errors and then i realised that my original code was > > not storing the variables in the first place. make sure that your code > > is storing session variables in the first place. > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Thanks, Henri.
Re: Select first item of RadioGroup with n Radio Buttons
Hi! Am 08.06.2006 um 04:16 schrieb Nick Westgate: I've tried to use the pageBeginRender That should work. Perhaps time to post some code ... Well, not necessary any more... sometimes it's quite helpful to take a break and have a closer look at what you've done... Using pageBeginRender is definitely the right way to do it. Thanks anyway ;-) Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to go to a specific page on a table
Hi, If 'table' is a variable that points to your contrib:Table component, you could do: table.getTableModel().getPagingState().setCurrentPage(page); The page number is counted from 0. See the JavaDoc for the package org.apache.tapestry.contrib.table.model: http://jakarta.apache.org/tapestry/tapestry-contrib/apidocs/index.html Best regards, -mb -- View this message in context: http://www.nabble.com/How-to-go-to-a-specific-page-on-a-table-t1750348.html#a4768334 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo question
Have you tried something like ? Shing --- Peter Dawn <[EMAIL PROTECTED]> wrote: > hi guys, > sorry for asking an ant question. but i am trying to > implement dojo > and my ant file wouldnt include all my sub-folders. > i have tried *.*, > *. but to no luck. can you guys suggest something > which will fix this > problem. > thanks. > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Home page : http://uk.geocities.com/matmsh/index.html Send instant messages to your online friends http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo question
**/* cheers, Ron Peter Dawn wrote: hi guys, sorry for asking an ant question. but i am trying to implement dojo and my ant file wouldnt include all my sub-folders. i have tried *.*, *. but to no luck. can you guys suggest something which will fix this problem. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SEM and Tapestry apps
On 6/7/06, Henri Dupre <[EMAIL PROTECTED]> wrote: Hi Jerome, I'm not sure to understand the whole problem... For serving / instead of index.html that sounds to me more connected to your apache configuration. Unless this is part of your tapestry/tomcat application. Well, my whole website should be served by Tomcat (later on Resin) with an Apache front-end. I have /index.html being correctly served by Tomcat (because my page has the proper name). But now I want to use '/' instead of '/index.html' from everything: the url of the homepage, the links generated to this page, etc. Here is what I am trying to achieve for good SEO (Search Engine Optimization): I want a 301 redirect to http://www.kalixia.com for the domains kalixia.com, kalixia.fr and www.kalixia.fr (so far I've been able to do it with Apache virtual hosts and mod_rewrite). Now, for http://www.kalixia.com, I want to be able to have a 200 (content directly) instead of a 302 (default for a tapestry app with the redirect filter). So I "cheated" a bit and used mod_rewrite in order to rewrite http://www.kalixia.com to http://www.kalixia.com/index.html (but this is using a 301 -- a bit better for SEO than the 302 solution). My problem is that search engines do see a lot of 301 going on... And this is getting worse as most of the people linking to my website makes a link to "http://www.kalixia.com"; and not "http://www.kalixia.com/index.html"; (which is quite ugly). Then for generating "/" links, there are many possibilities around... it depends what kind of links do you want to generate "/". You could either just implement an AbstractLink component and supply your own ILink implementation. I am using a simple PageLink component (I do not need to do anything specific when the user click on the "goto home page" link). Your solution seems to be just fine for what I need. I'm wondering though if is better extending AbstractLink or PageLink. I guess I would override the whole "logic" of PageLink so AbstractLink is probably better... Or if you want "/" for the home service for instance, I would rather implement a ServiceEncoder. What is the advantage over the previous solution? I wrote several things like that for our website... I can send you some code for either one... I would definitely be interested in such things. That would probably be something useful in the wiki too :-) Nice to see other tapestry websites in France! Well in a few weeks, I'll be able to add one more success story for a HUGE client (I can't name it yet). The website is a learning website (unfortunately everything will be private -- I'll make some screenshots) which will have nearly 20 000 users with about 100 simultaneously (I'll probably need to tune things). Anyway thanks for your help Henri. Regards, Jérôme. On 6/7/06, Jérôme BERNARD <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to make my website (http://www.kalixia.com) working fine > for SEM (Search Engine Marketing). My current setup is an Apache > front-end talking to a Tomcat server (using mod_jk). > > What I would like to be able to do is to have my home page > (index.html) served by a request to '/' instead of '/index.html' (and > of course to have links generated to '/' instead of '/index.html'). I > can't figure out how to do it... > > Do I have to write my own kind of link component and link to the home > of the website using this custom link component? > > If it is not possible to do such a thing, how could I setup my website > so that I can avoid an HTTP 301 error (permanent redirection) to > '/index.html' when the visitor is requesting the content of '/'? > > > Regards, > Jérôme. > > > > -- > Jérôme BERNARD, > Kalixia, SARL. > http://weblog.kalixia.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks, Henri. www.actualis.com -- Jérôme BERNARD, Kalixia, SARL. http://weblog.kalixia.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] hivemind: external xml entities in a jar?
Hi all, is it possible to use external xml entities in a hivemind.xml which reference to a resource in the classpath ? The hivemodule.xml is inside a jar (/META_INF/) and the extranal entity is in the same jar. Thanx, Ron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tacos installation problem
It could be that you have misspelled or forgot to close some thing in the applicaiton spec. Could you post what in your application file? Cheers, PS On 6/8/06, Peter Dawn <[EMAIL PROTECTED]> wrote: hi all, i am trying to install tacos (which also requires dojo) but i am having some problems here. i have done as follows, 1. download the tacos jar file and put it in lib folder 2. put a reference to it within my application file 3. download dojo and inserted it within my javascript folder now my problem is that, after doing this, 1. most of my web-inf folder files have been flagged as, tapestry cant see this file at runtime. 2. when i run the web app i get an exception saying, javax.servlet.ServletException: Could not parse specification classpath:/net/sf/tacos/Tacos.library. org.apache.tapestry.engine.AbstractEngine.service( AbstractEngine.java:851) org.apache.tapestry.ApplicationServlet.doService( ApplicationServlet.java:198) org.apache.tapestry.ApplicationServlet.doGet( ApplicationServlet.java:159) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) any help guys. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]