Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)
Aha, sorry for the hardcoded part, I can see that the number 80 is only used to determine whether to include port in URL or not :) Will try to provide HOSTPORT instead. M. On Thu, Feb 5, 2015 at 4:53 PM, Martin Nagl mn...@mtbiker.sk wrote: I am using Tapestry 5.3.6. I have not overridden BaseURLSource or anything simmilar. I have not provided HOSTPORT or HOSTPORT_SECURE. Looking at the code in BaseURLSourceImpl, maybe my problem is that http communication goes on port 8080, not 80 as expected (hardcoded in BaseURLSourceImpl). I will try to experiment more with the settings above and figure out how to test it on my local machine. Regards Martin
Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)
I am using Tapestry 5.3.6. I have not overridden BaseURLSource or anything simmilar. I have not provided HOSTPORT or HOSTPORT_SECURE. Looking at the code in BaseURLSourceImpl, maybe my problem is that http communication goes on port 8080, not 80 as expected (hardcoded in BaseURLSourceImpl). I will try to experiment more with the settings above and figure out how to test it on my local machine. Regards Martin
Re: Override hibernate.cfg.xml with QaModule hibernate config
Use different execution modes for production and testing, then contribute a custom HibernateConfigurer that supplies hibernate configuration file with mode specific name, e.g. hibernate-production.cfg.xml or hibernate-test.cfg.xml. Kalle On Thu, Feb 5, 2015 at 11:09 AM, George Christman gchrist...@cardaddy.com wrote: Hi guys, I'm trying to setup an in memory database for selenium testing. I'm wondering if someone new how to override my hibernate.cfg.xml file with something like contributeHibernateEntityPackageManager without a conflict with the xml. Thanks in advance.
Re: Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs
Modules should end up in: classpath/META-INF/modules (classpath in your case being WEB-INF/classes ) You haven't shared anything about how you attempt to reference the files so its hard to help you. To include the module in: WEB-INF/classes/META-INF/modules/login/login.js You could do @Import( module = login/login ) in your page or in a component on the page. HTH -- Chris On Thu, Feb 5, 2015 at 9:52 AM, samt sonders kont...@samtundsonders.at wrote: hi, I'm trying to upgrade my project from 5.3.8 and running into problems using modules. For the source directory structure I have tried: src/main/resources/META-INF/modules/mymodule/mymodule.js AND src/main/modules/mymodule/mymodule.js and for the deployment directory structure I have tried this: WEB-INF/classes/META-INF/modules/login/login.js AND WEB-INF/classes/mymodule/mymodule.js In both cases I get: [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (login.js, line 0) [Error] RequireJS error: scripterror: Script error for: login http://requirejs.org/docs/errors.html#scripterror, modules login (anonymous function) (console.js, line 104) onError (console.js, line 133) onError (require.js, line 537) onScriptError (require.js, line 1681) Thanks for your help! Andreas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Override hibernate.cfg.xml with QaModule hibernate config
Hi guys, I'm trying to setup an in memory database for selenium testing. I'm wondering if someone new how to override my hibernate.cfg.xml file with something like contributeHibernateEntityPackageManager without a conflict with the xml. Thanks in advance.
Re: form requires dynamic radio button list
It seems like you are using the locality property for everything (selected value and loop variable) maybe that is the source of your problem? On Thu, Feb 5, 2015 at 6:40 AM, John Coleman qbyteconsult...@gmail.com wrote: Hi, The examples of using the tapestry radio button are all static. I need the radio buttons to build from a dynamic list (in this case of locations) presumably using a loop, something like this: t:form t:radiogroup value=locality t:loop t:source=localities t:value=locality t:radio t:value=locality t:label=prop:locality t:mixins=jquery/bind t:bind.event=venueChanged t:bind.eventType=change t:bind.zone=venueChooserZone/ /t:loop /t:radiogroup But this does not work!? Note that I also want to fire an event when the user selects a radio button to rerender the rest of the form in response to a change of location. Any ideas how to solve this please? John
Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs
hi, I'm trying to upgrade my project from 5.3.8 and running into problems using modules. For the source directory structure I have tried: src/main/resources/META-INF/modules/mymodule/mymodule.js AND src/main/modules/mymodule/mymodule.js and for the deployment directory structure I have tried this: WEB-INF/classes/META-INF/modules/login/login.js AND WEB-INF/classes/mymodule/mymodule.js In both cases I get: [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (login.js, line 0) [Error] RequireJS error: scripterror: Script error for: login http://requirejs.org/docs/errors.html#scripterror, modules login (anonymous function) (console.js, line 104) onError (console.js, line 133) onError (require.js, line 537) onScriptError (require.js, line 1681) Thanks for your help! Andreas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs
Or, as I prefer these days because in this style you can easily modify it to add parameters or invoke particular functions: void afterRender() { javaScriptSupport.require(login/login); } Geoff On 5 Feb 2015, at 8:01 pm, Chris Poulsen mailingl...@nesluop.dk wrote: Modules should end up in: classpath/META-INF/modules (classpath in your case being WEB-INF/classes ) You haven't shared anything about how you attempt to reference the files so its hard to help you. To include the module in: WEB-INF/classes/META-INF/modules/login/login.js You could do @Import( module = login/login ) in your page or in a component on the page. HTH -- Chris On Thu, Feb 5, 2015 at 9:52 AM, samt sonders kont...@samtundsonders.at wrote: hi, I'm trying to upgrade my project from 5.3.8 and running into problems using modules. For the source directory structure I have tried: src/main/resources/META-INF/modules/mymodule/mymodule.js AND src/main/modules/mymodule/mymodule.js and for the deployment directory structure I have tried this: WEB-INF/classes/META-INF/modules/login/login.js AND WEB-INF/classes/mymodule/mymodule.js In both cases I get: [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (login.js, line 0) [Error] RequireJS error: scripterror: Script error for: login http://requirejs.org/docs/errors.html#scripterror, modules login (anonymous function) (console.js, line 104) onError (console.js, line 133) onError (require.js, line 537) onScriptError (require.js, line 1681) Thanks for your help! Andreas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)
I've faced similar issues in the past (see TAP5-167), but these days I just access everything through https. It does sound like you were using @Secure on your login page, but nowhere else. I seem to recall that if you use @Secure on one page, then it will try to use http on pages NOT marked with @Secure. To get around that, you end up skipping the @Secure and sending passwords plaintext over your internal network - not a great practice. I am curious if anyone ever came up with a good way of doing what you are trying to do. A few questions that come to mind are: Which version of T5? Have you overridden anything like BaseURLSource? Have you provided any parameters like HOSTPORT or HOSTPORT_SECURE? On Thu, Feb 5, 2015 at 4:16 AM, Martin Nagl mn...@mtbiker.sk wrote: Hi all, we have a Tapesty5 application deployed on Tomcat + Apache httpd. In production environment at our customer, the application should be deployed / accessed like this: - Tomcat is running on a server in internal network on port 8080. - There is an Apache HTTP server with reverse proxy to Tomcat (AJP) accessible from the internet on port 80. - Internal users should access the application on Tomcat directly without https on http://servername.intranet.customer.sk:8080/appname/login - External users should access the application through Apache httpd, with https, on https://apps.customer.sk/appname/login 1. Initiallly, I had no @Secure annotations on my pages. The application worked correctly from internal network, but not from internet. From internet, I could access the login page through https, but after submit, I get somehow redirected to http which ends with server error: 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. 2. I have annotated all my pages with @Secure. The aplication now works correctly from internet, but not from internal network. From internal network, I can access http://servername.intranet.customer.sk:8080/appname/login but I get redirected to https at https://servername.intranet.customer.sk:8080/appname/login. - This is not desired, I would like the application to continue in http mode. Is this setup possible with a Tapestry5 application (a single deployed instance)? Is there some way to tell Tapestry If you're accessed through https, then serve all pages through https, else if you're accessed through http, then serve all pages through http? Thanks Regards Martin -- Jonathan Barker ITStrategic - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)
While not addressing your problem exactly, I have found issues with cookies doing things like this. You try to login via HTTPS. Your session is created as a secure cookie, and when you go back to regular HTTP after login, you have no session cookie. I created a new, non-secure cookie, but that’s definitely a hack and has some issues. I don’t use @Secure since I could never get anything working correctly, and so redirect myself. You could try using something like nginx to do SSL to plan old tomcat running in HTTP mode. Using the @Secure annotation will still cause problems, since it will want to use HTTPS to / from tomcat. This would likely work, but local users won’t benefit from HTTPS for login. However, you could potentially us nginx to handle that as well, forcing HTTPS for a specific URL. You may be able to use your own MetaDataLocator service to determine that client IP address and decide there. Obviously if you are doing a reverse proxy, the Http Request IP address won’t necessarily be the client’s IP address, but most proxies add a header you could use. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Feb 5, 2015, at 4:16 AM, Martin Nagl mn...@mtbiker.sk wrote: Hi all, we have a Tapesty5 application deployed on Tomcat + Apache httpd. In production environment at our customer, the application should be deployed / accessed like this: - Tomcat is running on a server in internal network on port 8080. - There is an Apache HTTP server with reverse proxy to Tomcat (AJP) accessible from the internet on port 80. - Internal users should access the application on Tomcat directly without https on http://servername.intranet.customer.sk:8080/appname/login - External users should access the application through Apache httpd, with https, on https://apps.customer.sk/appname/login 1. Initiallly, I had no @Secure annotations on my pages. The application worked correctly from internal network, but not from internet. From internet, I could access the login page through https, but after submit, I get somehow redirected to http which ends with server error: 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. 2. I have annotated all my pages with @Secure. The aplication now works correctly from internet, but not from internal network. From internal network, I can access http://servername.intranet.customer.sk:8080/appname/login but I get redirected to https at https://servername.intranet.customer.sk:8080/appname/login. - This is not desired, I would like the application to continue in http mode. Is this setup possible with a Tapestry5 application (a single deployed instance)? Is there some way to tell Tapestry If you're accessed through https, then serve all pages through https, else if you're accessed through http, then serve all pages through http? Thanks Regards Martin
Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)
Hi all, we have a Tapesty5 application deployed on Tomcat + Apache httpd. In production environment at our customer, the application should be deployed / accessed like this: - Tomcat is running on a server in internal network on port 8080. - There is an Apache HTTP server with reverse proxy to Tomcat (AJP) accessible from the internet on port 80. - Internal users should access the application on Tomcat directly without https on http://servername.intranet.customer.sk:8080/appname/login - External users should access the application through Apache httpd, with https, on https://apps.customer.sk/appname/login 1. Initiallly, I had no @Secure annotations on my pages. The application worked correctly from internal network, but not from internet. From internet, I could access the login page through https, but after submit, I get somehow redirected to http which ends with server error: 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. 2. I have annotated all my pages with @Secure. The aplication now works correctly from internet, but not from internal network. From internal network, I can access http://servername.intranet.customer.sk:8080/appname/login but I get redirected to https at https://servername.intranet.customer.sk:8080/appname/login. - This is not desired, I would like the application to continue in http mode. Is this setup possible with a Tapestry5 application (a single deployed instance)? Is there some way to tell Tapestry If you're accessed through https, then serve all pages through https, else if you're accessed through http, then serve all pages through http? Thanks Regards Martin
Re: Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs
Thanks Geoff and Chris for your quick response. Much appreciated! In fact I referenced it like this: javaScriptSupport.require(login) because I thought the module name is a reference to the folder. javaScriptSupport.require(login/login) works fine. Thank you so much! Andreas Geoff Callender mailto:geoff.callender.jumpst...@gmail.com 5 Feb 2015 16:07 Or, as I prefer these days because in this style you can easily modify it to add parameters or invoke particular functions: void afterRender() { javaScriptSupport.require(login/login); } Geoff Chris Poulsen mailto:mailingl...@nesluop.dk 5 Feb 2015 16:01 Modules should end up in: classpath/META-INF/modules (classpath in your case being WEB-INF/classes ) You haven't shared anything about how you attempt to reference the files so its hard to help you. To include the module in: WEB-INF/classes/META-INF/modules/login/login.js You could do @Import( module = login/login ) in your page or in a component on the page. HTH samt sonders mailto:kont...@samtundsonders.at 5 Feb 2015 15:52 hi, I'm trying to upgrade my project from 5.3.8 and running into problems using modules. For the source directory structure I have tried: src/main/resources/META-INF/modules/mymodule/mymodule.js AND src/main/modules/mymodule/mymodule.js and for the deployment directory structure I have tried this: WEB-INF/classes/META-INF/modules/login/login.js AND WEB-INF/classes/mymodule/mymodule.js In both cases I get: [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (login.js, line 0) [Error] RequireJS error: scripterror: Script error for: login http://requirejs.org/docs/errors.html#scripterror, modules login (anonymous function) (console.js, line 104) onError (console.js, line 133) onError (require.js, line 537) onScriptError (require.js, line 1681) Thanks for your help! Andreas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: form requires dynamic radio button list
On Thu, 05 Feb 2015 03:40:18 -0200, John Coleman qbyteconsult...@gmail.com wrote: Hi, Hi! But this does not work!? What do you mean by does not work? This is too vague for us to provide any useful answer. In addition, the Java code related to the template snippet is also needed to know what's happening. -- 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