Re: Neo4J 2.0 transactions on domain objects with T5.3.x
Thanks++; I kinda of had it working, but it was too much trouble to maintain which classes were getting advised. Also I had the issue of talking to multiple embedded Neo4J instances (something not many people do), and different transactional advice is needed depending on where the attached Node came from. (i.e. a Neo4J Node from database A needs transactional advise from database A). This worked as well using Markers but further complicated the issue, and it wouldn't scale well when we have several graph databases to talk to at once. Here's what I ended up doing in case people follow in my footsteps with embedded Neo4J and T5: In the end I just created detached domain POJOs, and adjusted my DAOs to return those instead. Now I explicitly save the detached by dao.update(myDetachedObj), and the DAO worries about the transaction, etc. It's very simple, seems that's the way nature intended. Hahaha In other exciting news, I received official word that the particular set of code I've been working on will be released as open source on Github. So I've got that going for me. :-) On Tue, Jan 14, 2014 at 6:49 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 13 Jan 2014 22:20:41 -0200, Daniel Jue teamp...@gmail.com wrote: Thanks Thiago! My pleasure! Now I want to apply it to all my pages and components in my web module using @Match(*). It causes a recursion error since it sees the services in the DAO module which are needed to create the transaction! Pages and components aren't services, so I don't think using @Match(*) will work for them. I guess you'll need to write a ComponentClassTransformWorker to advise page and component methods. See the source of CachedWorker for an example. One more thing: When I have one of these Neo4J-backed domain objects (let's say User.class), I might have something like this in a page: @Property private User theUser; In my template, if I do ${theUser.firstName}, will the transactional advise be applied to the automatically constructed getters and setters for that property? No. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
HTTPS enabled Application
Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: https://demo-ccbo.gecko.aw.atos.net/ [cid:image001.png@01CF120F.4230D660] My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.SECURE_ENABLED, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra
Re: HTTPS enabled Application
Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. “Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw.atos.net/ ” My application is secured, I have configured below in appmodule.java “configuration.add(SymbolConstants.*SECURE_ENABLED*, true)”; Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com
RE: HTTPS enabled Application
Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw.atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: HTTPS enabled Application
What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw.atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
[ANN] Tapestry CSRF Protection, 1.0.1.RELEASE and 1.1.0.RC1
I have been working on a fork of the original CSRF protection module, done in GSoC 2011 by Markus Jung. The original module did not fully work without patching Tapestry itself and it was a bit too complicated for our simple requirements. I took some code and ideas but ended up in rewriting most of it. So, I'm pleased to announce the first two releases: Release 1.0 with basic features: - Protects all component event handler (like event links, forms, etc.) against CSRF - Adds CSRF token to all event links and adds hidden field with CSRF token to all form POSTs - Tokens are generated on a per-session basis Release 1.1 (still a release candidate): - Better generation of CSRF token - Integration with Spring Security 3.2+ CSRF mechanism The project is hosted on GitHub: https://github.com/porscheinformatik/tapestry-csrf-protection Instructions are quite simple: Just add the JAR to your Tapestry project and it will be protected against CSRF attacks. In version 1.1 if you have Spring and Tapestry-Spring integration setup and the new Spring Security 3.2 CSRF mode enabled it uses Spring's services for generating and checking the tokens. I think it would be a good idea to integrate a CSRF protection in tapestry-core - maybe this could be a starting point. -- Chris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: HTTPS enabled Application
If you want to force https for ALL pages then the following is simpler then manually putting @Secure on each page. public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } This is all very well documented here: http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:12 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote: What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw.atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
RE: HTTPS enabled Application
Hi Dragan, Thanks for your reply. I have done the same thing. Below is the code from my appmodule.java file. public void contributeMetaDataLocator( MappedConfigurationString, String configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Still facing the same issue :( Regards, Mahendra -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:14 PM To: Tapestry users Subject: Re: HTTPS enabled Application If you want to force https for ALL pages then the following is simpler then manually putting @Secure on each page. public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } This is all very well documented here: http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:12 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote: What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw. atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: HTTPS enabled Application
Look for a spelling mistake or use the @Contribute annotation. I don't have ANY extra configuration for forcing ssl. @Contribute(MetaDataLocator.class) public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Assuming tapestry 5.3.7 but as far as i remember it was the same in 5.2. Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:49 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dragan, Thanks for your reply. I have done the same thing. Below is the code from my appmodule.java file. public void contributeMetaDataLocator( MappedConfigurationString, String configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Still facing the same issue :( Regards, Mahendra -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:14 PM To: Tapestry users Subject: Re: HTTPS enabled Application If you want to force https for ALL pages then the following is simpler then manually putting @Secure on each page. public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } This is all very well documented here: http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:12 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw. atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
RE: HTTPS enabled Application
I have checked the spelling, and it is fine. We are using Tapestry 5.1.0.5 version. Does it work in Tapestry 5.1.0.5 version?? -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:29 PM To: Tapestry users Subject: Re: HTTPS enabled Application Look for a spelling mistake or use the @Contribute annotation. I don't have ANY extra configuration for forcing ssl. @Contribute(MetaDataLocator.class) public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Assuming tapestry 5.3.7 but as far as i remember it was the same in 5.2. Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:49 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dragan, Thanks for your reply. I have done the same thing. Below is the code from my appmodule.java file. public void contributeMetaDataLocator( MappedConfigurationString, String configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Still facing the same issue :( Regards, Mahendra -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:14 PM To: Tapestry users Subject: Re: HTTPS enabled Application If you want to force https for ALL pages then the following is simpler then manually putting @Secure on each page. public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } This is all very well documented here: http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:12 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw. atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com -- -- - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: HTTPS enabled Application
Try putting this in web.xml to force the container to redirect to https. I have successfully used this couple of years ago but can't remember if I even knew then about the tapestry approach. security-constraint web-resource-collection web-resource-nameSecurity/web-resource-name url-pattern/*/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint http://stackoverflow.com/questions/7790141/security-constraint-configuration-inside-web-xml-for-tomcat Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 2:49 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: I have checked the spelling, and it is fine. We are using Tapestry 5.1.0.5 version. Does it work in Tapestry 5.1.0.5 version?? -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:29 PM To: Tapestry users Subject: Re: HTTPS enabled Application Look for a spelling mistake or use the @Contribute annotation. I don't have ANY extra configuration for forcing ssl. @Contribute(MetaDataLocator.class) public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Assuming tapestry 5.3.7 but as far as i remember it was the same in 5.2. Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:49 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dragan, Thanks for your reply. I have done the same thing. Below is the code from my appmodule.java file. public void contributeMetaDataLocator( MappedConfigurationString, String configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Still facing the same issue :( Regards, Mahendra -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:14 PM To: Tapestry users Subject: Re: HTTPS enabled Application If you want to force https for ALL pages then the following is simpler then manually putting @Secure on each page. public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } This is all very well documented here: http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:12 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw. atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is happening? Regards Mahendra -- Dmitry Gusev AnjLab Team http://anjlab.com -- -- - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: HTTPS enabled Application
I think the whole thing is not Tapestry related - I guess it's some misconfiguration in your load-balancer, Apache httpd or Tomcat. The browser is redirected to a HTTP-protocol URL on a HTTPS port (e.g. http://demo-ccbo.gecko.aw.atos.net:443/;). So somewhere in your config - i guess Tomcat servlet.xml - there has to be something like HTTP port is 443. Chris 2014/1/15 Dragan Sahpaski dragan.sahpa...@gmail.com: Try putting this in web.xml to force the container to redirect to https. I have successfully used this couple of years ago but can't remember if I even knew then about the tapestry approach. security-constraint web-resource-collection web-resource-nameSecurity/web-resource-name url-pattern/*/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint http://stackoverflow.com/questions/7790141/security-constraint-configuration-inside-web-xml-for-tomcat Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 2:49 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: I have checked the spelling, and it is fine. We are using Tapestry 5.1.0.5 version. Does it work in Tapestry 5.1.0.5 version?? -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:29 PM To: Tapestry users Subject: Re: HTTPS enabled Application Look for a spelling mistake or use the @Contribute annotation. I don't have ANY extra configuration for forcing ssl. @Contribute(MetaDataLocator.class) public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Assuming tapestry 5.3.7 but as far as i remember it was the same in 5.2. Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:49 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dragan, Thanks for your reply. I have done the same thing. Below is the code from my appmodule.java file. public void contributeMetaDataLocator( MappedConfigurationString, String configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } Still facing the same issue :( Regards, Mahendra -Original Message- From: dragan.sahpas...@gmail.com [mailto:dragan.sahpas...@gmail.com] On Behalf Of Dragan Sahpaski Sent: Wednesday, January 15, 2014 6:14 PM To: Tapestry users Subject: Re: HTTPS enabled Application If you want to force https for ALL pages then the following is simpler then manually putting @Secure on each page. public void contributeMetaDataLocator(MappedConfigurationString, Object configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, true); } This is all very well documented here: http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages Cheers, Dragan Sahpaski On Wed, Jan 15, 2014 at 1:12 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: What I suggest is to put @Secure annotation to your pages so that your links to that pages started with https:// Also if you open these pages with HTTP Tapestry will do automatic redirect to HTTPS On Wed, Jan 15, 2014 at 4:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi Dmirty, Thanks for your reply. I have already made the full application secure by adding configuration.add(SymbolConstants.*SECURE_ENABLED*, true) into appmodule.java. What you are suggesting is to make the one page secure. Regards, Mahendra -Original Message- From: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] Sent: Wednesday, January 15, 2014 5:20 PM To: Tapestry users Subject: Re: HTTPS enabled Application Try putting @org.apache.tapestry5.annotations.Secure annotations on your pages. On Wed, Jan 15, 2014 at 3:02 PM, Athneria, Mahendra mahendra.athne...@atos.net wrote: Hi, I am facing issue related to HTTPS in tapestry. My tomcat server is HTTPS enabled. When I try to access the login page of my tapestry application I got below message. Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: *https://demo-ccbo.gecko.aw.atos.net/*https://demo-ccbo.gecko.aw. atos .net/ My application is secured, I have configured below in appmodule.java configuration.add(SymbolConstants.*SECURE_ENABLED*, true); Still all the pageLinks and actionLinks generating http request. Any idea guys why it is
Re: Tapestry 5.4 require.js modules
I don't have input on the question of additional scope, but thanks for letting us know that the upgrade went pretty smoothly-- I'm eager to use 5.4 but I can't change right now. On Mon, Jan 13, 2014 at 3:25 PM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi all, why are tapestry's requirejs modules nested in an anonymous javascript function: (function() { define(['jquery'], function($) { }) }).call(this); isn't it enough to just write define(, function() {})? Is there a reason for this additional scope? cheers, Kris BTW, i just migrated an existing T5.3.7 application to T5.4-beta-2 with almost no hassle. i'm really impressed.
Re: Tapestry 5.4 require.js modules
The outer function is a hygenic wrapper created by the CoffeeScript compiler. Occasionally, it places a few things that should be local to the individual file inside the function and before the define(). I haven't checked yet whether the Google Closure compiler is smart enough to unwrap these, when they are not necessary. On Wed, Jan 15, 2014 at 9:54 AM, Daniel Jue teamp...@gmail.com wrote: I don't have input on the question of additional scope, but thanks for letting us know that the upgrade went pretty smoothly-- I'm eager to use 5.4 but I can't change right now. On Mon, Jan 13, 2014 at 3:25 PM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi all, why are tapestry's requirejs modules nested in an anonymous javascript function: (function() { define(['jquery'], function($) { }) }).call(this); isn't it enough to just write define(, function() {})? Is there a reason for this additional scope? cheers, Kris BTW, i just migrated an existing T5.3.7 application to T5.4-beta-2 with almost no hassle. i'm really impressed. -- 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
Configuration.addPackage(...)
Hi Folks, I am using hibernate and tapestry. Might anyone know what happened to the addPackage method ? Inside class Configuration ? I am searching thru the javadocs and cannot seem to find it. hibernate-version4.3.0.Final/hibernate-version Best regards and thanks... KEN
RE: Configuration.addPackage(...)
Sorry to pollute the board... It seems to be deprecated but there are no instructions as what to use in place of the deprecated method ? When I look at the class in eclipse... the method is not in the class. Best regards and thanks... KEN From: nhhockeypla...@hotmail.com To: users@tapestry.apache.org Subject: Configuration.addPackage(...) Date: Wed, 15 Jan 2014 23:51:38 -0500 Hi Folks, I am using hibernate and tapestry. Might anyone know what happened to the addPackage method ? Inside class Configuration ? I am searching thru the javadocs and cannot seem to find it. hibernate-version4.3.0.Final/hibernate-version Best regards and thanks... KEN
RE: Configuration.addPackage(...)
It seems there is frustration about hibernate ansd the deprecation of the addPackage method. And no immediate documented solution to adding a blanket package to a Configuration in order to iterate all the classes. Does anyone know how to do this ? I know this might be the wrong board. But the hibernate support in tapestry is relevent. Any help is appreciated. I need a workiarond for addPackage. Here is a code snippet. Thanks in advance Ken public void configure(Configuration configuration) { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); for (String packageName : packageManager.getPackageNames()) { configuration.addPackage(packageName); // *** refuses to compile...method undefined **// for (String className : classNameLocator.locateClassNames(packageName)) { try { Class entityClass = contextClassLoader.loadClass(className); configuration.addClass(entityClass); } catch (ClassNotFoundException ex) { throw new RuntimeException(ex); } } } }
Re: Configuration.addPackage(...)
Why don't you ask it on Hibernate mailing list? http://hibernate.org/community/ This isn't related to Tapestry at all. On Thu, Jan 16, 2014 at 9:21 AM, nhhockeyplayer nashua nhhockeypla...@hotmail.com wrote: It seems there is frustration about hibernate ansd the deprecation of the addPackage method. And no immediate documented solution to adding a blanket package to a Configuration in order to iterate all the classes. Does anyone know how to do this ? I know this might be the wrong board. But the hibernate support in tapestry is relevent. Any help is appreciated. I need a workiarond for addPackage. Here is a code snippet. Thanks in advance Ken public void configure(Configuration configuration) { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); for (String packageName : packageManager.getPackageNames()) { configuration.addPackage(packageName); // *** refuses to compile...method undefined **// for (String className : classNameLocator.locateClassNames(packageName)) { try { Class entityClass = contextClassLoader.loadClass(className); configuration.addClass(entityClass); } catch (ClassNotFoundException ex) { throw new RuntimeException(ex); } } } } -- Dmitry Gusev AnjLab Team http://anjlab.com
RE: Configuration.addPackage(...)
I reimplemented part of it to rreuse the deprecated api import org.hibernate.cfg.AnnotationConfiguration; public interface IHibernate4Configurer { /** * Passed the configuration so as to make changes. */ void configure(AnnotationConfiguration configuration); } public void configure(AnnotationConfiguration configuration) { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); for (String packageName : packageManager.getPackageNames()) { configuration.addPackage(packageName); for (String className : classNameLocator.locateClassNames(packageName)) { try { Class entityClass = contextClassLoader.loadClass(className); configuration.addClass(entityClass); } catch (ClassNotFoundException ex) { throw new RuntimeException(ex); } } } } Still caught up on logger.info(HibernateCoreMessages.startupTiming(configurationComplete - startTime, factoryCreated - startTime)); logger.info(HibernateCoreMessages.entityCatalog(sessionFactory.getAllClassMetadata().keySet())); not sure what to do with those... I assume deprecated too.
redirect from render phase
Hello! We are in need of redirect from render phase. Reasons are: we cannot fetch all required data in onActivate method of page, because onActivate is called for page even for component events inside page. So we load data in setupRender. But there can be problems like data not found, service unavailable etc. To solve this we've made our own RedirectException, and exception handler that catches it and performs redirect. The last problem we have is spam in logs, that goes from RenderQueueImpl class. Is there any correct way in tapestry to redirect during render? With best regards, Andrey.