Re: SEO and duplicate content due to language prefix
I have solved most of this problem by adding a request filter [1] that sets the PersistentLocale on every request and thus adding the locale to every url throughout the application. Though /url and /en/url still have duplicate content, nothing in my app links to /url anymore so google won't index it. The only duplicate content left is on / and /en/start. But I'll solve that with a redirect I think, or maybe, make sure that all links in my app to the home page go to / in stead of /locale/Start Cheers, Joost [1] public RequestFilter buildLocaleFilter( @InjectService(PersistentLocale) final PersistentLocale persistantLocale, @InjectService(ThreadLocale) final ThreadLocale threadLocale) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { persistantLocale.set(threadLocale.getLocale()); return handler.service(request, response); } }; } Howard Lewis Ship wrote: Maybe my intention is that you would supply your own mechanism by rewriting URLs, but still ... On Tue, Jan 5, 2010 at 5:54 PM, Howard Lewis Ship hls...@gmail.com wrote: Seems like a bug to me that if you turn ENCODE_LOCALE_INTO_PATH off, it doesn't then substitute some other approach (like a cookie from 5.0, or a query parameter). On Tue, Jan 5, 2010 at 5:11 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Tue, 05 Jan 2010 16:33:46 -0200, Stephan Schwab s...@caimito.net escreveu: Thiago, Hi! I tried that but now I cannot switch languages any more. By switching I mean through a component that sets the PersistentLocale. I've never tested disabling the locale encoded into path myself. After setting SymbolConstants.ENCODE_LOCALE_INTO_PATH to false the locale doesn't get encoded in the path anymore and apparently that is some kind of a requirement for the PersistentLocale thing to work. Might that be a bug? I've created TAP5-972. I guess it isn't a bug because it's exactly how it works. I would try to override the PersistentLocale service with an implementation that uses cookies, just as it was before 5.1 -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: SEO and duplicate content due to language prefix
Hello Joost, Have you considered using the: link rel=canonical href=http://www.yourdomain.com/index.html;/link Mechanism? Google had a nice post on their webmaster central blog (http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html). We had quite similar problems with Tapestry, our CMS and Google - in a silghtly different setup - but using the canonical hint for the search engine solved most of the problems. Regards, Niclas On 06.01.10 09:02, Joost Schouten (ml) joost...@jsportal.com wrote: I have solved most of this problem by adding a request filter [1] that sets the PersistentLocale on every request and thus adding the locale to every url throughout the application. Though /url and /en/url still have duplicate content, nothing in my app links to /url anymore so google won't index it. The only duplicate content left is on / and /en/start. But I'll solve that with a redirect I think, or maybe, make sure that all links in my app to the home page go to / in stead of /locale/Start Cheers, Joost [1] public RequestFilter buildLocaleFilter( @InjectService(PersistentLocale) final PersistentLocale persistantLocale, @InjectService(ThreadLocale) final ThreadLocale threadLocale) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { persistantLocale.set(threadLocale.getLocale()); return handler.service(request, response); } }; } Howard Lewis Ship wrote: Maybe my intention is that you would supply your own mechanism by rewriting URLs, but still ... On Tue, Jan 5, 2010 at 5:54 PM, Howard Lewis Ship hls...@gmail.com wrote: Seems like a bug to me that if you turn ENCODE_LOCALE_INTO_PATH off, it doesn't then substitute some other approach (like a cookie from 5.0, or a query parameter). On Tue, Jan 5, 2010 at 5:11 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Tue, 05 Jan 2010 16:33:46 -0200, Stephan Schwab s...@caimito.net escreveu: Thiago, Hi! I tried that but now I cannot switch languages any more. By switching I mean through a component that sets the PersistentLocale. I've never tested disabling the locale encoded into path myself. After setting SymbolConstants.ENCODE_LOCALE_INTO_PATH to false the locale doesn't get encoded in the path anymore and apparently that is some kind of a requirement for the PersistentLocale thing to work. Might that be a bug? I've created TAP5-972. I guess it isn't a bug because it's exactly how it works. I would try to override the PersistentLocale service with an implementation that uses cookies, just as it was before 5.1 -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Niclas Meier Head of Client Development IT Development scoyo GmbH | Stresemannstr. 163 | 22769 Hamburg | Germany Phone: +49 (0)40 2294818-719 | Fax: +49 (0)40 2294818-11 niclas.me...@scoyo.com Sitz Hamburg | Amtsgericht Hamburg HRB 100969 Geschäftsführer: Dr. Ralf Schremper www.scoyo.de | http://blog.scoyo.de/ Follow scoyo on twitter: http://twitter.com/scoyo
Re: SEO and duplicate content due to language prefix
Thank you Niclas, Sounds a lot better than redirecting. Cheers, Joost niclas.me...@scoyo.com wrote: Hello Joost, Have you considered using the: link rel=canonical href=http://www.yourdomain.com/index.html;/link Mechanism? Google had a nice post on their webmaster central blog (http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html). We had quite similar problems with Tapestry, our CMS and Google - in a silghtly different setup - but using the canonical hint for the search engine solved most of the problems. Regards, Niclas On 06.01.10 09:02, Joost Schouten (ml) joost...@jsportal.com wrote: I have solved most of this problem by adding a request filter [1] that sets the PersistentLocale on every request and thus adding the locale to every url throughout the application. Though /url and /en/url still have duplicate content, nothing in my app links to /url anymore so google won't index it. The only duplicate content left is on / and /en/start. But I'll solve that with a redirect I think, or maybe, make sure that all links in my app to the home page go to / in stead of /locale/Start Cheers, Joost [1] public RequestFilter buildLocaleFilter( @InjectService(PersistentLocale) final PersistentLocale persistantLocale, @InjectService(ThreadLocale) final ThreadLocale threadLocale) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { persistantLocale.set(threadLocale.getLocale()); return handler.service(request, response); } }; } Howard Lewis Ship wrote: Maybe my intention is that you would supply your own mechanism by rewriting URLs, but still ... On Tue, Jan 5, 2010 at 5:54 PM, Howard Lewis Ship hls...@gmail.com wrote: Seems like a bug to me that if you turn ENCODE_LOCALE_INTO_PATH off, it doesn't then substitute some other approach (like a cookie from 5.0, or a query parameter). On Tue, Jan 5, 2010 at 5:11 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Tue, 05 Jan 2010 16:33:46 -0200, Stephan Schwab s...@caimito.net escreveu: Thiago, Hi! I tried that but now I cannot switch languages any more. By switching I mean through a component that sets the PersistentLocale. I've never tested disabling the locale encoded into path myself. After setting SymbolConstants.ENCODE_LOCALE_INTO_PATH to false the locale doesn't get encoded in the path anymore and apparently that is some kind of a requirement for the PersistentLocale thing to work. Might that be a bug? I've created TAP5-972. I guess it isn't a bug because it's exactly how it works. I would try to override the PersistentLocale service with an implementation that uses cookies, just as it was before 5.1 -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Niclas Meier Head of Client Development IT Development scoyo GmbH | Stresemannstr. 163 | 22769 Hamburg | Germany Phone: +49 (0)40 2294818-719 | Fax: +49 (0)40 2294818-11 niclas.me...@scoyo.com Sitz Hamburg | Amtsgericht Hamburg HRB 100969 Geschäftsführer: Dr. Ralf Schremper www.scoyo.de | http://blog.scoyo.de/ Follow scoyo on twitter: http://twitter.com/scoyo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Installing easyfckeditor
Hi, if you don't use maven you have to provide yourself also all the required dependencies. (See http://t5-easy-fckeditor.kenai.com/dependencies.html to view the list of dependencies.) The jar must be in the project libraries so that the jar is accessible to T5 during runtime, so adding it to only build path may not be enough. You really should use maven, follow this guide to setup your env: http://www.troymaxventures.com/2008/05/tapestry5-netbeans-quickstart.html but use the latest 6.8 instead of the 6.1 mentioned in the guide. This way maven takes care of all those dependencies etc. - Ville Ps. The project has moved to Kenai, so the 1.0.2 jar can be obtained from mvn repository, just go with your favorite browser to http://kenai.com/svn/t5-easy-fckeditor~maven-release-repository/com/orientimport/t5-easy-fckeditor to view the releases. oskar_a wrote: Hi, I'm really new in Tapestry and try to install the easyfckeditor component http://code.google.com/p/easyfckeditor/ (I don't used maven to create my project and also don't have the maven eclipse plugin.) I downloaded the jar-file (Tapestry5EasyFckEditor-1.0-Beta-2.jar) and added it to the build path. But when I try to use it with textarea t:type=easyfck/fckeditor value=value / tapestry means: Unable to resolve 'easyfck/fckeditor' to a component class name. Regards Oskar -- View this message in context: http://old.nabble.com/Installing-easyfckeditor-tp27020854p27026838.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry, Page Object State and Clustering
Hi there, Ive checked the archive and havent been able to find anything that answers this so here goes... Im just discovering T5 and have a query regarding the T5 page object and how it maintains state (without using the session) from render - through the user interacting with the browser - to submit. I cant see how its doing this in a manner which I can ignore when considering clustering.. Example of what I mean public class ManageDataRoles extends AbstractAuthenticatedPage { //Note this isnt persisted or added to session private ArrayListDataRole roles; SNIP void onSuccess() { System.out.println(MANAGEDR+roles.size()); } } So when I render the page the size is 3. When I submit the page and reference roles the size is 3. Where is this roles object being persisted while im happily messing around with the rendered page in firefox? Hopefully this makes sense. Aidan
Re: Tapestry, Page Object State and Clustering
Depends on where your list gets instantiated and populated. I can only guess, but you are probably filling it with some values in onActivate(), right? This happens every time that page is used to handle a specific request, be it a page render or a form submit. That's where your state comes from. HTH, Uli On 06.01.2010 13:09 schrieb aidan.oha...@bt.com: Hi there, Ive checked the archive and havent been able to find anything that answers this so here goes... Im just discovering T5 and have a query regarding the T5 page object and how it maintains state (without using the session) from render - through the user interacting with the browser - to submit. I cant see how its doing this in a manner which I can ignore when considering clustering.. Example of what I mean public class ManageDataRoles extends AbstractAuthenticatedPage { //Note this isnt persisted or added to session private ArrayListDataRole roles; SNIP void onSuccess() { System.out.println(MANAGEDR+roles.size()); } } So when I render the page the size is 3. When I submit the page and reference roles the size is 3. Where is this roles object being persisted while im happily messing around with the rendered page in firefox? Hopefully this makes sense. Aidan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Persisting state without HTTP Session
Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim.
RE: Accessing Tapestry Services from Spring Beans
Is anyone doing this? It's listed as a feature on the lead page at http://tapestry.apache.org/tapestry5/: ... Tapestry Services can now be injected into Spring Beans Any examples anywhere that could be pointed to? Muchos thanks. Regards, Jim. -Original Message- From: Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk] Sent: 05 January 2010 17:22 To: Tapestry users Subject: RE: Accessing Tapestry Services from Spring Beans If it's relevant I have the xfire service I'm targeting exposed on a path that is ignored by Tapestry (using IgnoredPathsFilter), so perhaps this is why Tapestry is not injecting the service into the Spring bean - the tapestry service I'm trying to inject is visible as DEFINED in the iocregistry. How to have Tapestry pay attention to injection while not treating the url the xfire service is exposed at as an invalid page and defaulting to the app start page ...? Really blocked on this - would love any steers ... Regards, Jim. -Original Message- From: Jim O'Callaghan [mailto:j...@peritussolutions.com] Sent: 05 January 2010 13:02 To: Tapestry users Subject: Accessing Tapestry Services from Spring Beans Is it possible to access Tapestry Services from Spring Beans? Having looked through the forum I've found posts mentioning injecting Tapestry Services inside Spring Beans using the annotations: @Inject @Autowired ... but am finding my referenced services are null rather than proxies for JIT creation. I'm using Tapestry 5.1.0.5 and don't have tapestry.use-external-spring-context set to true. Is there some other config required? I'm probably missing something obvious. Background is I'm trying to use XFire and Spring for some web services that are a bit verbose for the RESTful approach (though the t5 restful services works nicely out of the box), and I would rather not duplicate my hibernate / envers / custom interceptors config for Spring when it's there already for Tapestry. Would be grateful for any hints / pointers to resources / example, esp. ones where the injection / autowire / etc. is not in the pages / components area - this is a standalone service I'm trying to access the Tapestry service from. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
Cookies come to mind, would that be an option? On Wed, Jan 6, 2010 at 2:16 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
Use setters and the @InjectPage annotation. @InjectPage private MyPage resultpage; Object onActionFromSomeComponent() { resultpage.setSomething(something); return resultpage; } Uli On 06.01.2010 14:16 schrieb Jim O'Callaghan: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Lutz, Thanks for the response - Cookies would be a last resort - I don't want to be managing cookies and also feel it makes the app more breakable (fundamental state could be broken with browser security settings). What I'm after is something akin to PageActivationContext but that passes the relevant object(s) using Request parameters rather than the querystring / url - thanks. Regards, Jim. -Original Message- From: Lutz Hühnken [mailto:lh.tapestry.l...@googlemail.com] Sent: 06 January 2010 13:50 To: Tapestry users Subject: Re: Persisting state without HTTP Session Cookies come to mind, would that be an option? On Wed, Jan 6, 2010 at 2:16 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Thanks Ulrich. Do you think it is realistic to have an entire application use this approach as a method for sharing state between pages?, i.e. every page is injected, or is there a downside to this? Regards, Jim. -Original Message- From: Ulrich Stärk [mailto:u...@spielviel.de] Sent: 06 January 2010 13:58 To: Tapestry users Subject: Re: Persisting state without HTTP Session Use setters and the @InjectPage annotation. @InjectPage private MyPage resultpage; Object onActionFromSomeComponent() { resultpage.setSomething(something); return resultpage; } Uli On 06.01.2010 14:16 schrieb Jim O'Callaghan: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Accessing Tapestry Services from Spring Beans
Jim I have injected spring beans using: @Inject @Autowired private Service MyService; I had problems when i wanted to inject services using @InjectService for some reason the services were not injected. I had to use Annotation markers and then the injection worked. Be sure u r NOT using tapestry-spring in 5.0 Compatibility Mode. On Wed, Jan 6, 2010 at 8:20 AM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Is anyone doing this? It's listed as a feature on the lead page at http://tapestry.apache.org/tapestry5/: ... Tapestry Services can now be injected into Spring Beans Any examples anywhere that could be pointed to? Muchos thanks. Regards, Jim. -Original Message- From: Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk] Sent: 05 January 2010 17:22 To: Tapestry users Subject: RE: Accessing Tapestry Services from Spring Beans If it's relevant I have the xfire service I'm targeting exposed on a path that is ignored by Tapestry (using IgnoredPathsFilter), so perhaps this is why Tapestry is not injecting the service into the Spring bean - the tapestry service I'm trying to inject is visible as DEFINED in the iocregistry. How to have Tapestry pay attention to injection while not treating the url the xfire service is exposed at as an invalid page and defaulting to the app start page ...? Really blocked on this - would love any steers ... Regards, Jim. -Original Message- From: Jim O'Callaghan [mailto:j...@peritussolutions.com] Sent: 05 January 2010 13:02 To: Tapestry users Subject: Accessing Tapestry Services from Spring Beans Is it possible to access Tapestry Services from Spring Beans? Having looked through the forum I've found posts mentioning injecting Tapestry Services inside Spring Beans using the annotations: @Inject @Autowired ... but am finding my referenced services are null rather than proxies for JIT creation. I'm using Tapestry 5.1.0.5 and don't have tapestry.use-external-spring-context set to true. Is there some other config required? I'm probably missing something obvious. Background is I'm trying to use XFire and Spring for some web services that are a bit verbose for the RESTful approach (though the t5 restful services works nicely out of the box), and I would rather not duplicate my hibernate / envers / custom interceptors config for Spring when it's there already for Tapestry. Would be grateful for any hints / pointers to resources / example, esp. ones where the injection / autowire / etc. is not in the pages / components area - this is a standalone service I'm trying to access the Tapestry service from. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 and Play framework
Em Wed, 06 Jan 2010 12:13:04 -0200, Angelo Chen angelochen...@yahoo.com.hk escreveu: Hi, Hi! This might be a little off topic here, sorry. at Playframework(http://www.playframework.org/), it is simple, and fun to use as well. I've read the documentation and I haven't found a word about reuse, something that is very easy to do in Tapestry. Just build your own components and mixins. Play!, but just reading the docs. would be glad to know how other t5 users think about this new framework, is it worth a try? Asking about X in the Y mailing list whether Y is worth? :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
Em Wed, 06 Jan 2010 11:16:23 -0200, Jim O'Callaghan jc1000...@yahoo.co.uk escreveu: Hi, Hi! Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) You don't need to serialize the objects: just add ValueEncoders to tell Tapestry how it will get the id from a given object. This way, your URL only has IDs, not whole objects. Anyway, is implementing a completely session-less application viable? In any technology? Using POST is complicated because it only works for forms, not links. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
Em Wed, 06 Jan 2010 12:04:44 -0200, Jim O'Callaghan jc1000...@yahoo.co.uk escreveu: What I'm after is something akin to PageActivationContext but that passes the relevant object(s) using Request parameters rather than the querystring / url - thanks. Take a look at the LinkCreationListener interface. You can implement one and contribute it to the LinkCreationHub service. A RequestFilter could be used to get the parameters from the query string and set the appropriate properties. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
I forgot that in order to store the object until the result page is being rendered, you'll need to somehow persist it. That would happen in the session again. So this is not an option for you. By the way: why do you want to avoid using the session at all costs? Uli On 06.01.2010 15:07 schrieb Jim O'Callaghan: Thanks Ulrich. Do you think it is realistic to have an entire application use this approach as a method for sharing state between pages?, i.e. every page is injected, or is there a downside to this? Regards, Jim. -Original Message- From: Ulrich Stärk [mailto:u...@spielviel.de] Sent: 06 January 2010 13:58 To: Tapestry users Subject: Re: Persisting state without HTTP Session Use setters and the @InjectPage annotation. @InjectPage private MyPage resultpage; Object onActionFromSomeComponent() { resultpage.setSomething(something); return resultpage; } Uli On 06.01.2010 14:16 schrieb Jim O'Callaghan: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
I see. There wouldn't be much handling, though, one could probably implement a cookie persistence strategy, so that you could use the @Persist annotation. Doesn't that even exist already? The thing you are in favor of, using post.. there'll be some disadvantages. I assume you won't be using redirect-after-post much, if you don't want to keep state on the server side. You would have to disable that, as it is the default in Tapestry. I could imagine having a central dispatcher... every post goes to that central dispatcher, the page to be rendered would be one of the parameters. The other parameters would constitute the context for that page. That would be kept track of with hidden form fields. Might be possible, but not a nice solution. No bookmarks, possibly no navigation with browser back - forward buttons.. You could write your context into a database after request processing, and read it on the next request. Of course that would be exactly the same as using a session (in fact, you can configure most servers to store the session in a database). Only slower (than in-memory sessions). Well, now we know why people came up with the session concept. It is actually quite a good approach. What was the reason again you don't want to use it? On Wed, Jan 6, 2010 at 3:04 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Lutz, Thanks for the response - Cookies would be a last resort - I don't want to be managing cookies and also feel it makes the app more breakable (fundamental state could be broken with browser security settings). What I'm after is something akin to PageActivationContext but that passes the relevant object(s) using Request parameters rather than the querystring / url - thanks. Regards, Jim. -Original Message- From: Lutz Hühnken [mailto:lh.tapestry.l...@googlemail.com] Sent: 06 January 2010 13:50 To: Tapestry users Subject: Re: Persisting state without HTTP Session Cookies come to mind, would that be an option? On Wed, Jan 6, 2010 at 2:16 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Thanks for the responses Thiago. I'll have a look at the LinkCreationListener you suggested in your other email. Regarding the response below, does the approach not make an assumption that the objects I am trying to share between pages are persisted objects with a key(id)/value relationship? I'm using something at the moment that manages a menu stack in the user's session and some other data that is really just relevant to the user's session and not something I had thought of persisting. Your point regarding POST only working for forms and not links is relevant - I had not considered this. Regards, Jim. -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: 06 January 2010 14:40 To: Tapestry users Subject: Re: Persisting state without HTTP Session Em Wed, 06 Jan 2010 11:16:23 -0200, Jim O'Callaghan jc1000...@yahoo.co.uk escreveu: Hi, Hi! Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) You don't need to serialize the objects: just add ValueEncoders to tell Tapestry how it will get the id from a given object. This way, your URL only has IDs, not whole objects. Anyway, is implementing a completely session-less application viable? In any technology? Using POST is complicated because it only works for forms, not links. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Ulrich, This is informative thanks. Regarding avoiding using the session - it's not something I need to do at all costs - I am in the early stages of an application design and want to ensure the session usage is kept to a minimum as there may be a requirement to cluster at some stage - I had read that clustering applications that relied on session state had performance implications though perhaps if the amount of data retained in the session is small this is not going to cause too much of an overhead. Regards, Jim. -Original Message- From: Ulrich Stärk [mailto:u...@spielviel.de] Sent: 06 January 2010 15:06 To: Tapestry users Subject: Re: Persisting state without HTTP Session I forgot that in order to store the object until the result page is being rendered, you'll need to somehow persist it. That would happen in the session again. So this is not an option for you. By the way: why do you want to avoid using the session at all costs? Uli On 06.01.2010 15:07 schrieb Jim O'Callaghan: Thanks Ulrich. Do you think it is realistic to have an entire application use this approach as a method for sharing state between pages?, i.e. every page is injected, or is there a downside to this? Regards, Jim. -Original Message- From: Ulrich Stärk [mailto:u...@spielviel.de] Sent: 06 January 2010 13:58 To: Tapestry users Subject: Re: Persisting state without HTTP Session Use setters and the @InjectPage annotation. @InjectPage private MyPage resultpage; Object onActionFromSomeComponent() { resultpage.setSomething(something); return resultpage; } Uli On 06.01.2010 14:16 schrieb Jim O'Callaghan: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Lutz, You raise some very interesting points. I've replied to some of the other posters regarding the reasons I was trying to minimise session use, though taking their replies on board and your own email I think the best course of action is to proceed with using the session state and just minimising the amount of data held. Thanks for your contributions. Regards, Jim. -Original Message- From: Lutz Hühnken [mailto:lh.tapestry.l...@googlemail.com] Sent: 06 January 2010 15:26 To: Tapestry users Subject: Re: Persisting state without HTTP Session I see. There wouldn't be much handling, though, one could probably implement a cookie persistence strategy, so that you could use the @Persist annotation. Doesn't that even exist already? The thing you are in favor of, using post.. there'll be some disadvantages. I assume you won't be using redirect-after-post much, if you don't want to keep state on the server side. You would have to disable that, as it is the default in Tapestry. I could imagine having a central dispatcher... every post goes to that central dispatcher, the page to be rendered would be one of the parameters. The other parameters would constitute the context for that page. That would be kept track of with hidden form fields. Might be possible, but not a nice solution. No bookmarks, possibly no navigation with browser back - forward buttons.. You could write your context into a database after request processing, and read it on the next request. Of course that would be exactly the same as using a session (in fact, you can configure most servers to store the session in a database). Only slower (than in-memory sessions). Well, now we know why people came up with the session concept. It is actually quite a good approach. What was the reason again you don't want to use it? On Wed, Jan 6, 2010 at 3:04 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Lutz, Thanks for the response - Cookies would be a last resort - I don't want to be managing cookies and also feel it makes the app more breakable (fundamental state could be broken with browser security settings). What I'm after is something akin to PageActivationContext but that passes the relevant object(s) using Request parameters rather than the querystring / url - thanks. Regards, Jim. -Original Message- From: Lutz Hühnken [mailto:lh.tapestry.l...@googlemail.com] Sent: 06 January 2010 13:50 To: Tapestry users Subject: Re: Persisting state without HTTP Session Cookies come to mind, would that be an option? On Wed, Jan 6, 2010 at 2:16 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
You might want to have a look at the Clustering Issues section of [1]. Tapestry already has some mechanisms built-in to help you with deciding when your session attributes have changed and need to be propagated to the other cluster nodes. Of course, keeping the amount of information stored inside the session to a minimum is always a good practice. E.g. use keys instead of serialized objects, etc. Uli [1] http://tapestry.apache.org/tapestry5.1/guide/persist.html On 06.01.2010 16:36 schrieb Jim O'Callaghan: Ulrich, This is informative thanks. Regarding avoiding using the session - it's not something I need to do at all costs - I am in the early stages of an application design and want to ensure the session usage is kept to a minimum as there may be a requirement to cluster at some stage - I had read that clustering applications that relied on session state had performance implications though perhaps if the amount of data retained in the session is small this is not going to cause too much of an overhead. Regards, Jim. -Original Message- From: Ulrich Stärk [mailto:u...@spielviel.de] Sent: 06 January 2010 15:06 To: Tapestry users Subject: Re: Persisting state without HTTP Session I forgot that in order to store the object until the result page is being rendered, you'll need to somehow persist it. That would happen in the session again. So this is not an option for you. By the way: why do you want to avoid using the session at all costs? Uli On 06.01.2010 15:07 schrieb Jim O'Callaghan: Thanks Ulrich. Do you think it is realistic to have an entire application use this approach as a method for sharing state between pages?, i.e. every page is injected, or is there a downside to this? Regards, Jim. -Original Message- From: Ulrich Stärk [mailto:u...@spielviel.de] Sent: 06 January 2010 13:58 To: Tapestry users Subject: Re: Persisting state without HTTP Session Use setters and the @InjectPage annotation. @InjectPage private MyPage resultpage; Object onActionFromSomeComponent() { resultpage.setSomething(something); return resultpage; } Uli On 06.01.2010 14:16 schrieb Jim O'Callaghan: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persisting state without HTTP Session
Jim, You still have some different options to pursue in a cluster.. - sticky sessions, so that requests of the same user will go to the same server in the cluster. Good for load balancing, but if a server fails, the users of that server will loose their session. - session replication in the cluster - this seems to be the approach you are thinking of. Here I would indeed imagine that the amount of data you store in the session heavily influences performance. - persist the session. Could be in clustered rdbms, could be one of these distributed key-value stores that are all the rage these days, like Cassandra or HBase. Maybe you could let us know what you ended up doing, once you've finished your project. Good luck, Lutz On Wed, Jan 6, 2010 at 4:37 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Lutz, You raise some very interesting points. I've replied to some of the other posters regarding the reasons I was trying to minimise session use, though taking their replies on board and your own email I think the best course of action is to proceed with using the session state and just minimising the amount of data held. Thanks for your contributions. Regards, Jim. -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Problem using DateField
I have an issue using the datefield - a similar issue was reported by matt22 on Dec 15, 2009 . When a date is selected from the calendar, I get the following error: Communication with the server failed: null # Ajax failure: Status 400 Could this be caused by the url-pattern of security-constraint defined in my web-xml: security-constraint display-nameSecurityConstraint/display-name web-resource-collection web-resource-nameAppStuff/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameUSER/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint -- View this message in context: http://old.nabble.com/Problem-using-DateField-tp27026903p27026903.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Ulrich, Lutz, Thanks for the very informative replies. Hopefully they will be useful to others also. Regards, Jim. -Original Message- From: Lutz Hühnken [mailto:lh.tapestry.l...@googlemail.com] Sent: 06 January 2010 15:56 To: Tapestry users Subject: Re: Persisting state without HTTP Session Jim, You still have some different options to pursue in a cluster.. - sticky sessions, so that requests of the same user will go to the same server in the cluster. Good for load balancing, but if a server fails, the users of that server will loose their session. - session replication in the cluster - this seems to be the approach you are thinking of. Here I would indeed imagine that the amount of data you store in the session heavily influences performance. - persist the session. Could be in clustered rdbms, could be one of these distributed key-value stores that are all the rage these days, like Cassandra or HBase. Maybe you could let us know what you ended up doing, once you've finished your project. Good luck, Lutz On Wed, Jan 6, 2010 at 4:37 PM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Lutz, You raise some very interesting points. I've replied to some of the other posters regarding the reasons I was trying to minimise session use, though taking their replies on board and your own email I think the best course of action is to proceed with using the session state and just minimising the amount of data held. Thanks for your contributions. Regards, Jim. -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
FieldTranslatorSourceImpl
Hi, I am facing a problem related to the design of FieldTranslatorSourceImpl internal class design. I would like to adivse one of the method to pass my own modified instance of Translator, but actually the adivor does'nt work for this method because the public method (from the interface) is called from the inside... and the one invoced by the Tapestry other internals is not the one i wan't to decorate of course :) Is this a bug or a design principal to secure internal classes ? Best Regards, Christophe.
Re: FieldTranslatorSourceImpl
I don't know if this qualifies as a bug, I think not ... having a service call one of its own methods via its proxy is not unreasonable (and should be supported) BUT would not be the normal case and would need to see a use case for it (which is why I really like interfaces with just one method :-) What are you actually trying to accomplish, perhaps there is another way? On Wed, Jan 6, 2010 at 9:41 AM, cordenier christophe christophe.corden...@gmail.com wrote: Hi, I am facing a problem related to the design of FieldTranslatorSourceImpl internal class design. I would like to adivse one of the method to pass my own modified instance of Translator, but actually the adivor does'nt work for this method because the public method (from the interface) is called from the inside... and the one invoced by the Tapestry other internals is not the one i wan't to decorate of course :) Is this a bug or a design principal to secure internal classes ? Best Regards, Christophe. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Persisting state without HTTP Session
Thanks for the details Howard - I'll keep an eye on this one. Regards, Jim. -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: 06 January 2010 18:44 To: Tapestry users Subject: Re: Persisting state without HTTP Session Something I'm hoping to put together as either a new tapestry5 project, or as a tapx project: https://issues.apache.org/jira/browse/TAP5-53 On Wed, Jan 6, 2010 at 5:16 AM, Jim O'Callaghan jc1000...@yahoo.co.uk wrote: Hi, Can anyone advise on the preferred way of persisting state between pages without using HTTP Session? PageActivationContext using Object[] looks promising but I don't want long urls (from serialized objects) and there is more data to share than a defined number of keys - I'm looking for something that uses POST params ...? Thanks. Regards, Jim. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Overriding integer validation message?
You should add a prefix consisting of the field id (and optionally the form id). In your example you should try to provide a key: quantity-integer-format-exception. Let's say the id of your form is 'myform', then myform-quantity-integer-format-exception is also going to work. -- Best regards, Igor Drobiazko http://tapestry5.de/blog