Jumpstart is down
We're noticing that the Jumpstart site is down. I know it is on Github so we could run it locally, but the official site also references it a lot. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Odd breaking exception in 5.4
I had to hack in some code so that it would actually log the error. I could probably find it and offer it back, but I don't know how often this would come up. I ran into Xerces problems. In this particular Tomcat instance I have a couple of CAS 3.x instances that need to be replaced, and a bunch of Tapestry 5.3 applications using CAS clients. All of them were including Xerces due to the CAS dependencies. This particular application was using public federated authentication as most people logging into it won't be at my institution. Thus it wasn't including a Xerces dependency. If one of those other applications loaded first, the Xerces lib would assert to the JVM that it was the SAX implementation to use. This application would come along, as the JVM for the implementation to use, and be told to use Xerces. It then blows up with a ClassDefNotFound error when Xerces isn't on the classpath. If the 5.4 / non-CAS application loaded first, it could find a SAX parser on the classpath. So my current solution is to just include Xerces in the new 5.4 application until such time as I can better deal with it. On 05/25/2018 01:03 PM, Carlos Montero Canabal wrote: I have this problem in some situations too. I have a tomcat instance with multiple Tapestry5 apps, some with 5.3 versions and anothers with 5.4 versions. To work fine, when I restart the tomcat, I have to start / load first the 5.3 apps, and then the 5.4, it’s the only way to run everyone in the same tomcat. I didn´t find any solution, I think I would have to install 5.3 apps on a dedicated tomcat and 5.4 into another one. I hope my experience helps you. Regards Carlos Montero El 24/5/2018, a las 1:07, Richard Frovarp escribió: I'm having some very odd problems with Tapestry 5.4.3. Most of my stuff is on 5.3, so I haven't been able to dig very deep on this, and I'm not quite sure what I'm missing. I'm running Tomcat 8.5.x. Now, it appears that might be from classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml. But something else must be generating the error. I've been able to make it go away with a restart of Tomcat, but not of just the app itself. I'm fairly confused. I think that the exception being reported isn't the actual root cause, but rather the exception that is reported due to an error with reporting the actual exception. 2018-05-23 17:57:10,697 [ERROR] ioc.Registry java.lang.NullPointerException 2018-05-23 17:57:10,698 [ERROR] ioc.Registry Operations trace: 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 1] Handling page render request for page Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 2] Constructing instance of page class edu.ndsu.eci.international_capstone_exchange.pages.Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 3] Creating ComponentAssembler for edu.ndsu.eci.international_capstone_exchange.pages.Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 4] Parsing component template classpath:edu/ndsu/eci/international_capstone_exchange/pages/Index.tml 2018-05-23 17:57:10,712 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: org.apache.tapestry5.ioc.internal.OperationException org.apache.tapestry5.ioc.internal.OperationException at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:186) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260) at org.apache.tapestry5.internal.services.TemplateParserImpl.parseTemplate(TemplateParserImpl.java:57) at $TemplateParser_95423bef7.parseTemplate(Unknown Source) at org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.parseTemplate(ComponentTemplateSourceImpl.java:190) at org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.getTemplate(ComponentTemplateSourceImpl.java:162) at $ComponentTemplateSource_95423bef6.getTemplate(Unknown Source) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:258) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:251) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260) snip Caused by: java.lang.NullPointerException at org.apache.tapestry5.internal.services.XMLTokenStream.getLocation(XMLTokenStream.java:487) at org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:181
Re: Odd breaking exception in 5.4
Yep, I've looked. There isn't any exception in there. On 05/24/2018 02:13 AM, Dmitry Gusev wrote: Hi, Richard! Have you checked tomcat logs? catalina.out namely. They can shed some light. On Thu, May 24, 2018 at 2:07 AM, Richard Frovarp <rfrov...@apache.org> wrote: I'm having some very odd problems with Tapestry 5.4.3. Most of my stuff is on 5.3, so I haven't been able to dig very deep on this, and I'm not quite sure what I'm missing. I'm running Tomcat 8.5.x. Now, it appears that might be from classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml. But something else must be generating the error. I've been able to make it go away with a restart of Tomcat, but not of just the app itself. I'm fairly confused. I think that the exception being reported isn't the actual root cause, but rather the exception that is reported due to an error with reporting the actual exception. 2018-05-23 17:57:10,697 [ERROR] ioc.Registry java.lang.NullPointerException 2018-05-23 17:57:10,698 [ERROR] ioc.Registry Operations trace: 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 1] Handling page render request for page Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 2] Constructing instance of page class edu.ndsu.eci.international_capstone_exchange.pages.Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 3] Creating ComponentAssembler for edu.ndsu.eci.international_cap stone_exchange.pages.Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 4] Parsing component template classpath:edu/ndsu/eci/international_capstone_exchange/ pages/Index.tml 2018-05-23 17:57:10,712 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: org.apache.tapestry5.ioc.internal.OperationException org.apache.tapestry5.ioc.internal.OperationException at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAn dRethrow(OperationTrackerImpl.java:186) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invok e(OperationTrackerImpl.java:90) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker. invoke(PerThreadOperationTracker.java:72) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(Regist ryImpl.java:1260) at org.apache.tapestry5.internal.services.TemplateParserImpl.pa rseTemplate(TemplateParserImpl.java:57) at $TemplateParser_95423bef7.parseTemplate(Unknown Source) at org.apache.tapestry5.internal.services.ComponentTemplateSour ceImpl.parseTemplate(ComponentTemplateSourceImpl.java:190) at org.apache.tapestry5.internal.services.ComponentTemplateSour ceImpl.getTemplate(ComponentTemplateSourceImpl.java:162) at $ComponentTemplateSource_95423bef6.getTemplate(Unknown Source) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invo ke(PageLoaderImpl.java:258) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invo ke(PageLoaderImpl.java:251) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invok e(OperationTrackerImpl.java:82) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker. invoke(PerThreadOperationTracker.java:72) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(Regist ryImpl.java:1260) snip Caused by: java.lang.NullPointerException at org.apache.tapestry5.internal.services.XMLTokenStream.getLoc ation(XMLTokenStream.java:487) at org.apache.tapestry5.internal.services.SaxTemplateParser.par se(SaxTemplateParser.java:181) at org.apache.tapestry5.internal.services.TemplateParserImpl$1. invoke(TemplateParserImpl.java:61) at org.apache.tapestry5.internal.services.TemplateParserImpl$1. invoke(TemplateParserImpl.java:58) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invok e(OperationTrackerImpl.java:82) ... 102 more 2018-05-23 17:57:10,804 [ERROR] ioc.Registry java.lang.NullPointerException 2018-05-23 17:57:10,804 [ERROR] ioc.Registry Operations trace: 2018-05-23 17:57:10,804 [ERROR] ioc.Registry [ 1] Constructing instance of page class org.apache.tapestry5.corelib.pages.ExceptionReport 2018-05-23 17:57:10,804 [ERROR] ioc.Registry [ 2] Creating ComponentAssembler for org.apache.tapestry5.corelib.pages.ExceptionReport 2018-05-23 17:57:10,804 [ERROR] ioc.Registry [ 3] Parsing component template classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml To add to the confusion, I've never had the error trigger when running on my workstation using Tomcat, just as installed on our server. Almost makes me think that it is trying to write somewhere that is causing problems. I just restarted Tomcat, and it now loads. How do I find root cause? I've turned logging all the way up, and then there is too much noise. Since I can't get it to trigger on my workstation, I can't get a debugger connected to figure it out from there. Thanks, Richard - To unsubscribe, e-mail:
Odd breaking exception in 5.4
I'm having some very odd problems with Tapestry 5.4.3. Most of my stuff is on 5.3, so I haven't been able to dig very deep on this, and I'm not quite sure what I'm missing. I'm running Tomcat 8.5.x. Now, it appears that might be from classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml. But something else must be generating the error. I've been able to make it go away with a restart of Tomcat, but not of just the app itself. I'm fairly confused. I think that the exception being reported isn't the actual root cause, but rather the exception that is reported due to an error with reporting the actual exception. 2018-05-23 17:57:10,697 [ERROR] ioc.Registry java.lang.NullPointerException 2018-05-23 17:57:10,698 [ERROR] ioc.Registry Operations trace: 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 1] Handling page render request for page Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 2] Constructing instance of page class edu.ndsu.eci.international_capstone_exchange.pages.Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 3] Creating ComponentAssembler for edu.ndsu.eci.international_capstone_exchange.pages.Index 2018-05-23 17:57:10,698 [ERROR] ioc.Registry [ 4] Parsing component template classpath:edu/ndsu/eci/international_capstone_exchange/pages/Index.tml 2018-05-23 17:57:10,712 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: org.apache.tapestry5.ioc.internal.OperationException org.apache.tapestry5.ioc.internal.OperationException at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:186) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260) at org.apache.tapestry5.internal.services.TemplateParserImpl.parseTemplate(TemplateParserImpl.java:57) at $TemplateParser_95423bef7.parseTemplate(Unknown Source) at org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.parseTemplate(ComponentTemplateSourceImpl.java:190) at org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.getTemplate(ComponentTemplateSourceImpl.java:162) at $ComponentTemplateSource_95423bef6.getTemplate(Unknown Source) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:258) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:251) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260) snip Caused by: java.lang.NullPointerException at org.apache.tapestry5.internal.services.XMLTokenStream.getLocation(XMLTokenStream.java:487) at org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:181) at org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:61) at org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:58) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82) ... 102 more 2018-05-23 17:57:10,804 [ERROR] ioc.Registry java.lang.NullPointerException 2018-05-23 17:57:10,804 [ERROR] ioc.Registry Operations trace: 2018-05-23 17:57:10,804 [ERROR] ioc.Registry [ 1] Constructing instance of page class org.apache.tapestry5.corelib.pages.ExceptionReport 2018-05-23 17:57:10,804 [ERROR] ioc.Registry [ 2] Creating ComponentAssembler for org.apache.tapestry5.corelib.pages.ExceptionReport 2018-05-23 17:57:10,804 [ERROR] ioc.Registry [ 3] Parsing component template classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml To add to the confusion, I've never had the error trigger when running on my workstation using Tomcat, just as installed on our server. Almost makes me think that it is trying to write somewhere that is causing problems. I just restarted Tomcat, and it now loads. How do I find root cause? I've turned logging all the way up, and then there is too much noise. Since I can't get it to trigger on my workstation, I can't get a debugger connected to figure it out from there. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
AJAX Zones with selects and validation
I'm missing something to make this all work correctly. JavaScript is definitely not my strong suit, and I haven't fully caught up with how to do things in 5.4. I am doing the AJAX Select option from the Jumpstart. http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1 First selection is country, with that then populating the list of institutions. An autocomplete would be better, but that comes slightly complicated with UTF characters and the different between the data source and what the user would use. So that isn't a simple option. However, this selection method is working fine. However, I need to validate other items on the page, and I'm doing that in Java. So it goes back to Java with onValidateFromForm. I perform validation. If the validation fails, it kicks back to the page with the country selected. However, the choice of institution is lost, and even worse, the select list for institutions is blank. To recover one must choose a different country, then go back to their country. That of course isn't user friendly. So I either need the institution select to have the right value after onValidateFromForm fails, or I need to pull off validation somehow. I see examples in Jumpstart, but I don't think those will work for what I need. I don't want to implement the validator in JS, as that makes it a lot more complicated. Right now my validating code is using Google's phone validator. There is a JS port, but I would rather not use both. Additionally, I think that the only way I have of making this easy is to read the country value, and if they don't get things right for US/Canada, is to insert a leading 1 country code so that the international validator from the library works. This is all easier if I use an embedded Solr or something that can do the folding to take care of autocomplete, I just don't know if that is more work than the fix for the above. Any ideas are appreciated and/or any pointers to the documentation that I appear to be unable to find. Thanks Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Securing Tynamo tapestry-resteasy with Shiro
I'm wondering if there is a straightforward way to secure tapestry-resteasy with Shiro. We're already using tapestry-security. I have a student doing some work to do this, and it doesn't seem like the two work together. We can protect the URL path from the AppModule using the Shiro code like we do everywhere else. However, we can't get annotations to work on the REST "pages" or methods. I would like to be able to do things like access level access control and permission based control based on the authenticated user through the same Shiro tools that we have been using. It feels like we're missing something. I can probably build my own integration, but if it is already solved and we are just missing it, I would rather do it the correct way. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Weird behaviour generating URLs for HTTPS pages
On 02/18/2015 10:20 AM, Ben Titmarsh wrote: Hey Guys, I've just got my web server set up for SSL and it's working, but am experiencing some odd behaviour from Tapestry. I've added the @Secure annotation to one of my pages but by default the link is generated thus: https://[DOMAIN]:80/login I tried adding: configuration.add(SymbolConstants.HOSTPORT_SECURE, 443); The link is now generated correctly like this (without a port): https://[DOMAIN]/login However when I hit that link, it gets caught in an infinite 302 redirect loop. I can quite happily hit any page without the @Secure annotation over https and it loads fine. Any pointers? Thanks, Ben. I think you might need configuration.add(MetaDataConstants.SECURE_PAGE, Boolean.TRUE.toString()); I know I have to add that to stop it from putting the port in. We're doing TLS to HTTPD, then AJP to Tomcat with the connector set to https for the scheme and secure set to true. That particular thing only seems to kick in when production mode is true. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Java 8 with Tapestry 5.3.x?
Is there an easy way to get Tapestry 5.3.7 to work with Java 8? Or is there a plan to release 5.3.8 that would be Java 8 compatible? The big reason I'm asking is that Java 7 goes EOL next April. I would love to start moving our applications over to libraries that support Java 8 starting now so hopefully we can be off of Java 7 when it goes EOL. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Odd exception from Alerts and JSONObject
I am see this exception in my logs. It appears to be from when a user clicks dismiss on an alert. It doesn't hurt anything, but it certainly pollutes the logs. We are running 5.3.7 and the latest Tapestry5-JQuery library. Not entirely sure where this is happening. ViewEvent:layout probably refers to our custom layout module. Line 45 of Layout.tml is t:alerts /. It looks like new JSONObject is being returned, which might serialize to {}. No idea why it's having trouble with that. 2014-07-29 00:43:47,988 [ERROR] ioc.Registry A component event handler method returned the value {}. Return type org.apache.tapestry5.json.JSONObject can not be handled. 2014-07-29 00:43:47,989 [ERROR] ioc.Registry Operations trace: 2014-07-29 00:43:47,989 [ERROR] ioc.Registry [ 1] Triggering event 'dismiss' on ViewEvent:layout.alerts 2014-07-29 00:43:47,989 [ERROR] ioc.Registry [ 2] Handling result from method org.apache.tapestry5.corelib.components.Alerts.onDismiss(java.lang.Long). 2014-07-29 00:43:47,989 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: A component event handler method returned the value {}. Return type org.apache.tapestry5.json.JSONObject can not be handled. org.apache.tapestry5.runtime.ComponentEventException: A component event handler method returned the value {}. Return type org.apache.tapestry5.json.JSONObject can not be handled. [at classpath:edu/ndsu/eci/tapestry/layout/components/Layout.tml, line 45] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1141) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1062) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1059) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1058) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:81) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_573159c6b7058f.handle(Unknown Source) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_573159c6b7058f.handle(Unknown Source) at org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75) at $ComponentEventRequestHandler_573159c6b7058f.handle(Unknown Source) at org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2476) at $ComponentEventRequestHandler_573159c6b7058f.handle(Unknown Source) at $ComponentEventRequestHandler_573159c6b702aa.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39) at $ComponentRequestHandler_573159c6b702ac.handleComponentEvent(Unknown Source) at org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:41) at $ComponentRequestFilter_573159c6b702a9.handleComponentEvent(Unknown Source) at $ComponentRequestHandler_573159c6b702ac.handleComponentEvent(Unknown Source) at $ComponentRequestHandler_573159c6b70279.handleComponentEvent(Unknown Source) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_573159c6b7027b.dispatch(Unknown Source) at $Dispatcher_573159c6b70270.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at com.googlecode.tapestry5cayenne.services.CayenneRequestFilter.service(CayenneRequestFilter.java:47) at $RequestFilter_573159c6b7026c.service(Unknown Source) at $RequestHandler_573159c6b70271.service(Unknown Source) at
Re: Java 8 with Tapestry 5.3.x?
On 08/05/2014 02:46 PM, Andreas Ernst wrote: Am 05.08.14 21:19, schrieb Richard Frovarp: Is there an easy way to get Tapestry 5.3.7 to work with Java 8? Or is there a plan to release 5.3.8 that would be Java 8 compatible? The big reason I'm asking is that Java 7 goes EOL next April. I would love to start moving our applications over to libraries that support Java 8 starting now so hopefully we can be off of Java 7 when it goes EOL. I use tux:~ # java -version java version 1.8.0_11 Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode) Opensuse 13.1, with GF 4 and T 5.4-beta-15 I don't exactly want to swap an EOL'd JVM for a beta framework version. I look forward to using 5.4 once it is out of beta and released. However, it's not going to be a direct drop in for us like a new 5.3 should be. And if I'm going to touch the code that much, I'd love to bring the older code out of Spring Security to the Shiro based tapestry-security, just adding to the work. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Regexp validation problem
This looks to be a bug, but I can't find any good documentation, so I thought I'd bring it here first. I through a really quick and simple regexp together to validate time entries. It's goal was to be quick, and to verify that the values entered look like 24 hour time. 35:99 would validate, 5:5 wouldn't, and neither would 5:15 AM. I'm going to rework to be a bit more elegant in value checks. I was just surprised when it didn't parse. The problem is using a range of values throws an exception. Looks like the code (5.3.7) is expecting a letter, and the 2nd value causes a parse error: Render queue error in BeginRender[manage/CreateEvent:textfield_3]: Failure reading parameter 'validate' of component manage/CreateEvent:textfield_3: Unexpected character '2' at position 23 of input string: required,regexp=^\d{1,2}:\d{2}$ Change the {1,2} to {2} or any other single value and it works. Stack trace: org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.parseError(FieldValidatorSourceImpl.java:423) org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.parse(FieldValidatorSourceImpl.java:315) org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.toValidatorSpecifications(FieldValidatorSourceImpl.java:200) org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.createValidators(FieldValidatorSourceImpl.java:183) org.apache.tapestry5.internal.bindings.ValidateBindingFactory$1.get(ValidateBindingFactory.java:64) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Class reloading
I'm trying to do some work around the class reloading that Tapestry does for pages, but am having a bit of difficulty. I'm placing annotations on my pages to build the menu. What happens is that I use the ComponentClassResolver to get the page names, and then use that to get the class name. I then use the standard class loader to load the class: Thread.currentThread().getContextClassLoader().loadClass(className); That class is then inspected to see if it has the appropriate annotation present This all works wonderfully in production. The problem is when the annotation changes (or is added) during a development session. I have to stop and then start the container to get the menu to update. The page class reloading works, I just can't get the new annotations. I've found the IvalidationListener, so I know when a page class has changed. I know my problem is that the class loader is caching the definition. Is there a Tapestry service to load the actual class for a page that handles the reloading? Is there a Tapestry service or class loader that would handle this for me? Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Class reloading
On 01/31/2014 12:38 PM, Thiago H de Paula Figueiredo wrote: On Fri, 31 Jan 2014 15:23:03 -0200, Richard Frovarp rfrov...@apache.org wrote: I'm placing annotations on my pages to build the menu. What happens is that I use the ComponentClassResolver to get the page names, and then use that to get the class name. I then use the standard class loader to load the class: Thread.currentThread().getContextClassLoader().loadClass(className); Have you tried to use ComponentSource.getPage() to get the page instance and use getClass() to get the class instance? The way you're doing it, you're getting the annotations from the non-transformed class. I have not tried to use that service before now (didn't know it existed?). It is exactly what I needed to use though. Thanks for the help. It might be useful to reference that service on the class reloading page: http://tapestry.apache.org/class-reloading.html - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry Security / page instance / invocation question
That would work. The trick is that I need to compute the permissions dynamically. I'll have to add in more code to handle those types of wildcard permissions. I was hoping for something much more similar to what I can use with the @RequiresPermissions check. But since I don't have an invocation, that looks like what I'll have to do. On 05/30/2013 11:34 AM, Dmitry Gusev wrote: You don't have invocation here, because you're rendering. And you should know what you're rendering, so you should be able to do this: t:security.hasPermission permission=${myPermission} and in Java: public String getMyPermission() { return some:permission: + instance.getId(); } will this work? On Thu, May 30, 2013 at 8:29 PM, Richard Frovarp rfrov...@apache.orgwrote: I'm using the Tynamo tapestry-security library to great success. I've been progressing through the instance level pieces and things are going well. I've ran into a bit of a problem however. I can do the instance level checks with @RequiresPermissions on functions just fine. That is populating the Environment service with the MethodInvocation. All is well. I can either get the method, or the instance, and proceed to do my security checks. The problem I'm running into is with the soft checks, in particular t:security.hasPermission permission=some:permission where I want to decide if a link should be shown or not. That will trigger the checks, however, that doesn't populate the Environment with the MethodInvocation. So I have no way of telling what is being checked. Is there a way to get the current invocation without going through the environment service? Or should I come up with my own annotation, turn the security annotation into if checks, and use the advise pieces to put the invocation into the environment? This section of Tapestry is still confusing to me, so I hope that my question makes sense. Thanks, Richard --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-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: Tapestry links not https
On 05/31/2013 02:45 PM, John wrote: My tapestry app doesn't work with SSL set up, the links have port 443 added but start http://. There must be some configuration missing? John You may also want to look at: MetaDatConstants.SECURE_PAGE. I know even with AJP proxying to Tomcat, we've ran into troubles. We just set that to true when in production, and that fixes our links. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry Security / page instance / invocation question
On 06/04/2013 11:03 AM, Dmitry Gusev wrote: Just a note that you always can write your own component like this if you want: t:hasPermission2 permission=some:permission instance=myInstance That's probably the better long term solution for my environment. On Tue, Jun 4, 2013 at 7:50 PM, Richard Frovarp rfrov...@apache.org wrote: That would work. The trick is that I need to compute the permissions dynamically. I'll have to add in more code to handle those types of wildcard permissions. I was hoping for something much more similar to what I can use with the @RequiresPermissions check. But since I don't have an invocation, that looks like what I'll have to do. I'm not sure I understand you, how would this differ from the case with MethodInvoication? Isn't the same AuthorizingRealm will check permissions for you? Just check if your permission has targets set and if it has - you can just peek instance from them. If not - try to get if from MethodInvoication. Anyway, if you need that invocation - you can create one - just call some method from your new component newPermission2 and intercept that call with @RequiresPermissions. But you can't declare dynamic permission in the annotation, you do understand this, right? By using the MethodInvocation (and perhaps actually getting the instance), I get the object to inspect directly, instead of having to get Cayenne to retrieve it for me via the object id. What I've done is to create a realm that uses reflection / introspection to find methods annotated with a special annotation. The string in that annotation matches exactly with the permission being checked. When permission checks come in, they are dispatched to the method marked as being responsible for that permission. So this: @RequiresPermissions(ILACAuth.SERVICE_MANAGE_VIEW_INSTANCE) public void onActivate(Service service) { ends up getting processed by this: @InstanceAccessMethod(ILACAuth.SERVICE_MANAGE_VIEW_INSTANCE) public boolean isPermittedViewService() { MethodInvocation methodInvocation = getInvocation(); if (methodInvocation == null) { return false; } Object instance = methodInvocation.getInstance(); ... } Where the permission is: servicemanager:view:instance. This idea works everywhere, except for template rendering. I do support passing in the permission being checked when dispatching the call. I just need to get around the exact string matching I'm doing. This will probably require a locally reserved word in the permission to make it work. So to handle the template scenario, I probably need to do something like: servicemanager:view:instance:key:265 and then know to chop :key on to dispatch to the correct check, and pass the permission in so it can have Cayenne retrieve the correct record if necessary. My method would have to change as well. It's not insurmountable, it just requires more work to set everything up. The key thing is I now understand that I can't get what I need via MethodInvocation when rendering, so I don't bang my head against that wall. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry Security / page instance / invocation question
I'm using the Tynamo tapestry-security library to great success. I've been progressing through the instance level pieces and things are going well. I've ran into a bit of a problem however. I can do the instance level checks with @RequiresPermissions on functions just fine. That is populating the Environment service with the MethodInvocation. All is well. I can either get the method, or the instance, and proceed to do my security checks. The problem I'm running into is with the soft checks, in particular t:security.hasPermission permission=some:permission where I want to decide if a link should be shown or not. That will trigger the checks, however, that doesn't populate the Environment with the MethodInvocation. So I have no way of telling what is being checked. Is there a way to get the current invocation without going through the environment service? Or should I come up with my own annotation, turn the security annotation into if checks, and use the advise pieces to put the invocation into the environment? This section of Tapestry is still confusing to me, so I hope that my question makes sense. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: anybody using tapestry-security ?
On 03/15/2013 11:35 PM, nhhockeyplayer nashua wrote: One of my issues as I understand this framework is defining access to the application. configuration.add(factory.createChain(/**).add(factory.authc()).build()); the above statement was imposing authentication on everything and actually blocking the rendering of assets I wish I could tear thru it faster. But it will come when it comes I dont understand the significance of having to specify these xpaths... if thats what they are /authc/** why would I want to specify something like that? You can think of them as subdirectories with I believe Ant style expansions. What you would expect to do is break the application paths up into similar behavior, that you can then apply coarse grain authentication and authorization to. So you might have a pages like /admin/edituser /admin/viewstats etc So then you might want /admin/** to indicate all pages under that path. That's your chain. You then add an authentication method to it. You can use something from the factory, or you can create your own. You'll need to create your own realms to store the authorization information, or you can use one of the existing directory based ones. From there you can use the annotations to do more fine grained authorization. In reality, you should be doing both the path based and annotation based security. Having an understanding of how Shiro works, helps a lot. Yes, there is a lot of abstract explanations, but the basics are important to understand. Stick with the simple wild card permissions to begin with. There is the ability to program your own permissions, or use instance level access. Those are easy to do once you get the basics. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Now hotness at SX vs 5.4
On 03/15/2013 08:20 AM, Thiago H de Paula Figueiredo wrote: On Fri, 15 Mar 2013 09:45:11 -0300, Joachim Van der Auwera joac...@progs.be wrote: On 03/15/2013 01:26 PM, trsvax wrote: Monitoring is something Tapestry lacks, Etsy's StatsD seems to be popular. Something quite similar (though not distributed) is easy using geomajas-project-profiling, see http://blog.progs.be/453/profiling-live-application. What about https://github.com/joshcanfield/tapestry-monitoring, from Josh Canfield? StatsD is nice and easy to work with. We're using it at work. I even have it running at home. From StatsD we dump into Graphite. There is no reason why a developer couldn't easily implement their own little chunks of code to send metrics to a service that would push them out to StatsD. You could easily rewrite the timing filter from the demo to write to StatsD instead of a logger. We also use collectd to perform JMX monitoring, and from there into Graphite. There are several other tools to pull from JMX and push to Graphite or elsewhere. Josh's monitoring module looks interesting. Since it's JMX, you can use any of the tools used to extract JMX, including collectd. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: CAS authentication and Form
On 12/03/2012 03:08 AM, rere16 wrote: Hello, I would like to secure a Spring application. For now, the authentication works perfectly with the CAS. However, I would add the ability to authenticate with a separate form. In the applicationContext file, I use a casAuthenticationProvider: bean id=casAuthenticationProvider class=org.springframework.security.cas.authentication.CasAuthenticationProvider property name=userDetailsServiceref bean=constantRoleUserService //property property name=ticketValidatorref bean=casProxyTicketValidator //property property name=servicePropertiesref bean=serviceProperties //property /bean I would like to know what is the proper method for using a authentication form and a database to access secure pages by CAS. thank you The pages aren't secured by CAS, they are secured by Spring Security, which is using a CAS provider. This is a Spring Security question, not a Tapestry one. From what I know, you'll need to provide multiple AuthenticationProviders, and configure them to do the type of chaining you want to do. From there, you'll have to create your custom login form, with the option to click on a link to be sent through the CAS path. From what I remember, with Spring Security, if the user doesn't have a session, they are redirected to the login page. With a CAS configuration, that is the CAS filter, which then sends them to CAS, and handles the returned token. You'll want to avoid that path by default most likely. Spring does have documentation on having multiple AuthenticationProviders: http://static.springsource.org/spring-security/site/docs/3.1.x/reference/core-services.html#core-services-authentication-manager - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry security Tynamo vs filter+service
On 11/08/2012 07:29 AM, John wrote: I've been looking at Tynamo tapestry-security and while it is feature rich, it seems complex and not documented or with detailed enough with full examples for me to follow. So I am trying to implement the RequiresLoginFilter code HLS provided. This requies implementing authService.isLoggedIn(). My login page will place a User object into session state. I assume I need to grab session state and pass that to my authService which will simply check for the session state != null? Any suggestions on how I obtain the session state in a service? Or otherwise a clear and complete Tynamo tapestry-security example I can browse? TIA Over the past week, I've been moving us from Spring Security to Tynamo's tapestry-security. After attending a Spring Security talk at No Fluff Just Stuff, I was interested in implementing method level security in my application, but discovered the the Spring Security module for Tapestry is out of date. So I decided to move us to Tynamo's tapestry-security, and have been quite happy with the change so far. tapestry-security is an integration module with Apache Shiro. Understanding Shiro is key to understanding tapestry-security in my very recent experience. I highly recommend reading Shiro's reference documentation, including the sections on Architecture, Authentication, Auhorizations, Realms, and of course the the Terminology section (start with that one). http://shiro.apache.org/reference.html You'll need to add to the chain the authc filter to take the username and password, which will then pass it onto a realm. The authc filter by default goes to this filter, which describes how it works: http://shiro.apache.org/static/current/apidocs/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.html That will then attempt to authenticate against one of your realms, so you'll need to configure one of those. From there Shiro will handle remembering the user. The authorization information is retrieved each time, unless you enable caching. From there you use the rest of Shiro / tapestry-security to perform your authorization. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Selects acting like eventlinks
I'm trying to create a Solr component in Tapestry. I'm trying to figure out the best method of displaying the facets, and allowing the user to select from the different facets. I was hoping to use something like a select, that upon selection the data is submitted. Obviously in advance I won't necessarily know how many different facets there will be. I've already got it working using multiple eventlinks, but would like to move to a select. I'm sure I'm missing something simple. Does anyone have any suggestions? Thanks, Richard
Re: Selects acting like eventlinks
On Fri, Oct 26, 2012 at 2:49 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Fri, 26 Oct 2012 16:15:37 -0200, Richard Frovarp rfrov...@apache.org wrote: I'm trying to create a Solr component in Tapestry. I'm trying to figure out the best method of displaying the facets, and allowing the user to select from the different facets. I was hoping to use something like a select, that upon selection the data is submitted. Obviously in advance I won't necessarily know how many different facets there will be. I've already got it working using multiple eventlinks, but would like to move to a select. I'm sure I'm missing something simple. Does anyone have any suggestions? Hi! Just use a Select inside a Form and write some JavaScript to submit the form when the value is changed. So is the best way to do a single form, which is then setup with a variable number of fields? Or is there an easier way to do multiple form fields? I've done forms with variable fields, but I'm not quite sure if that's the best way to do these sorts of things or not.
Re: Selects acting like eventlinks
On Fri, Oct 26, 2012 at 3:16 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Fri, 26 Oct 2012 18:14:38 -0200, Richard Frovarp rfrov...@apache.org wrote: So is the best way to do a single form, which is then setup with a variable number of fields? Or is there an easier way to do multiple form fields? I've done forms with variable fields, but I'm not quite sure if that's the best way to do these sorts of things or not. Please define 'variable fields'. I really don't know what you're talking about. That should have been variable number of fields. In one instance I might have 3 facets, in another there might be 5 facets. Each facet would be represented in different selects. The JavaScript is easy enough, it's the passing the data back so that Tapestry sees it that I'm a bit fuzzy on.
Re: [t5.3.4] Plugin blocks
On 08/26/2012 10:23 AM, Muhammad Gelbana wrote: After reading Taha's articlehttp://tawus.wordpress.com/2011/04/20/tapestry-magic-3-plugin-blocks/, I'm now trying to dissect my application to be able to distribute it to different clients. So it will be distributed as one slim web application with really nothing to offer. And to use one feature, a tapestry module (.jar) file will just be dropped in the classpath and it should be auto-loaded (using tapestry). I find Taha's article highly innovative but I'm trying to find out if anyone tackled the problem with a different approach that could be simpler or capable of handling what Taha's solution probably didn't. This might prove useful: http://blog.tapestry5.de/index.php/2010/01/19/tapestry-ioc-modularization-of-web-applications-without-osgi/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Question tapestry service
On 08/18/2012 05:36 PM, George Christman wrote: I have a few questions about the tapestry services. I'd like to be able to Inject services in these classes, however I'm a little confused. I understand if you want to be able to Inject a service, you must first bind the service in the app module. However, I'm not sure if I would need to first bind the class I'm trying to Inject the service into. I'm also uncertain how I would go about binding an abstract class like below, or is it inherited from the base class. Lastly is there away to setup an entire package to work with services like tapestry pages and components work without having to bind every class within the task. Perhaps my understanding isn't completely clear. A few classes and some sample code below to hopefully help clarify what I'm trying to do. Thanks. public class DMSImport { Parser parser = DMSFactory.getParser(value1, value2, value3); } public abstract class Parser { @Inject private VehicleDAO vehicleDAO; public Parser(String value1, String value2, String value3) { //Sets attributes vehicleDAO.setVehicle(value1); } protected abstract void parse(Reader dataReader, ParserCallback callback) throws IOException; } public class AutoMateParser extends Parser { public AutoMateParser (String value1, String value2, String value3) { super(value1, value3, value3); } protected void parse(Reader dataReader, ParserCallback callback) throws IOException { //some code } } public class DMSFactory { public static Parser getParser(String value1, String value2, String value3) { switch (dms) { case DatabaseConstants.INTEGRATION_IMPORTSYSTEM_AUTOMATE: return new AutoMateParser(value1, value2, value3); case //many other parsers that are setup identical to the AutoMateParser } } } You only need to bind services. You can inject those services into other classes with the @Inject or @InjectService annotation. I'm still working my way through how it all works. You don't bind abstract classes. You bind a class to the interface which it fully implements. You can use abstract classes between the interface and the class that is being bound with it, but in the end you can't bind abstract classes. Which pieces are you trying to turn into a service? It looks like the VehicleDAO is a service, but from what little I can tell, it shouldn't be. Services need to be thread safe, so typically all of the class variables are declared final. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Non-HTML Views
On 07/23/2012 04:07 PM, netdawg wrote: Is there a way now to render non-HTML views? Examples: 1. Have the grid component wrap Apache POI to dynamically generate spreadsheets? 2. Similar PDF engine to generate a pure PDF document (or convert the rendered HTML into PDF a la joomla, drupal CMS etc)? Much Thanks. You need to return a StreamResponse in onSubmit() or similar. http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF This idea works for anything you may want to return that isn't an HTML page. You still need the page class file, but you do not need a .tml file. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: FindBugs and the @Inject annotation on global fields
On 06/08/2012 10:32 AM, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? This doesn't appear to be possible, which makes FB useless in a T5 app, for the most part. It's not clear that any other static analysis tools provide such a filter either, though. Anyone had luck with anything else? Which version of FindBugs are you using? I'm using FindBugs 1.x via Sonar / Maven and I don't have any of those warnings being thrown. I've had to get rid of a few of the rules regarding Unread field and Unused field as @Property causes problems. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: FindBugs and the @Inject annotation on global fields
On 06/08/2012 11:39 AM, Thiago H de Paula Figueiredo wrote: On Fri, 08 Jun 2012 13:20:24 -0300, Richard Frovarp rfrov...@apache.org wrote: Which version of FindBugs are you using? I'm using FindBugs 1.x via Sonar / Maven and I don't have any of those warnings being thrown. I've had to get rid of a few of the rules regarding Unread field and Unused field as @Property causes problems. Isn't this the reason @SuppressWarnings(unused) exists? Doesn't FindBugs take this annotation into account? If not, I think it should. It can't. @SuppressWarnings has a RentionPolicy of SOURCE, so doesn't survive past the compiler. Since FindBugs looks at the byte code, it's gone by that point. FindBugs has their own annotation, but I don't want to use that. We're still finding such variables, but it's via PMD I think. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Variable number of text fields
I'm trying to figure out if there is a way to create a variable number of text fields in a form that are backed by normal strings. I've seen the AJAXFormLoop stuff, and it's close to what I think I'm after, but not quite there. The appears to require a mutable object returned fron onAddRow(). I just really want straight Strings. Is there an easy way to use Javascript to add a variable number of fields that doesn't require wrapping a String in some sort of mutable object, and that doesn't require a lot of manipulation of the form models? Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL writing problem with production mode true
On 04/09/2012 09:54 PM, Richard Frovarp wrote: I can verify with the 5.3 archetype, but it certainly seems to me that production mode of false lets the URLs be relative, but when you set it to true it starts to do extra work and looking to see if pages are marked as secured. I'm finding it in an odd way because everything on my application servers are behind HTTPS for every single request. mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org http://tapestry.apache.org/ mvn jetty:run Go to localhost. Look at URLs and they are relative. Change to production mode, restart jetty, look at URLs and they are relative. Proxy to Jetty from HTTPS using HTTP, URLs are relative in both modes. Create a war of the code, put it under Tomcat. Hit Tomcat directly at 8080 over HTTP and URLs are all relative in production mode true and false. Proxy to Tomcat using mod_proxy_ajp. Start up Tomcat, hit HTTPD with HTTPS and proxy via AJP to Tomcat the menu looks like this: div class=menu ul li class=current_page_item a href=http://myhost/url-test/;Index/a /li li a href=http://myhost/url-test/about;About/a /li li a href=http://myhost/url-test/contact;Contact/a /li /ul /div Add -Dtapestry.production-mode=false to JAVA_OPTS, restart Tomcat, refresh the page and the menus looks like this: divclass=menu ul liclass=current_page_item ahref=/url-test/ view-source:https://wings.cc.ndsu.nodak.edu/url-test/Index/a /li li ahref=/url-test/about view-source:https://wings.cc.ndsu.nodak.edu/url-test/aboutAbout/a /li li ahref=/url-test/contact view-source:https://wings.cc.ndsu.nodak.edu/url-test/contactContact/a /li /ul /div So this certainly looks like a bug. Production mode changes URLs to absolute under AJP proxying only. At this time I don't know it if is Tomcat only, or if I did AJP to another container one would see the same results.
URL writing problem with production mode true
I have a simple application in Tapestry 5.3.2. With production mode false, all of the URLs generated in the pages, including forms, are relative. This means HTTPS works just fine. With production mode true, all of the URLs are absolute with HTTP, which breaks things. I don't mind the full URLs, as they are at the correct host. The problem is the HTTP instead of HTTPS. Nothing in the documentation states that production mode will cause this change. I'm not sure if this is a bug or not. Additionally, how do I get it to use HTTPS only and all of the time? Looking at the documentation, it would seem that I should set tapestry.secure-page to true in my AppModule. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL writing problem with production mode true
Hey Bob, how's it been? On 04/09/2012 07:01 PM, Bob Harner wrote: http://tapestry.apache.org/https.html provides a pretty good description of these options, if you haven't seen it yet. I honestly did not see that page. Thanks for point it out. But you're right, this needs to be better documented. All of the effects of production mode should be listed or referenced at http://tapestry.apache.org/configuration.html#Configuration-tapestry.productionmode, and the FAQ should probably mention the HTTP - HTTPS switching behavior, which catches quite a few people. I'll make a note to improve the docs in these areas if somebody doesn't beat me to it. Is there any other place where you looked and didn't find this information? I spent all of my time looking at what production mode does and does not do. I knew that it limited error pages and some of the meta pages. Here are the places I looked. http://wiki.apache.org/tapestry/Tapestry5UsefulConfigurationsForDevelopment http://tapestry.apache.org/configuration.html#Configuration-tapestry.productionmode I do see further down on the configuration page it does state that production mode false disables the secured annotation. Listing everything under the production mode piece would be handy to know everything it affects. To be clear, it's not an HTTP/HTTPS problem I encountered, it was a relative/absolute URL problem. With it off, the URLs were relative and happy under HTTPS, with it on, the URLs were then set to absolute and used HTTP. I'm going to respond to Howard's email with some more details. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL writing problem with production mode true
On 04/09/2012 07:44 PM, Howard Lewis Ship wrote: I don't believe this is about production mode; this is more likely an artifact of how your app is configured behind your firewall, rather than how it runs on your workstation ... modulo that, by default in development mode, secure is disabled. When Tapestry detects that an incoming request is not secure but the pages referenced by the rendered page are secure, it forms a complete URL, to ensure the transition from HTTP to HTTPS. What I suspect is that you have marked your pages with @Secure, but that your firewall is handling the HTTPS, and forwarding an HTTP request into the servlet container hosting the application. When the firewall handles HTTPS, rather than the Tapestry application running inside the servlet container, then yes, your should not use @Secure and may want to deactivate it entirely. I'd appreciate some feedback about how well this matches your configuration before updating the documentation. I have the same webapp deployed on two RHEL 5 boxes running the RHEL version of HTTPD and a 7.0.x version of Tomcat. Both deployments of the webapp are identical with a different in Spring Security CAS URLs to go against. HTTPD is using mod_proxy_ajp to send requests to Tomcat. The AJP connectors on both Tomcats are configured exactly the same. Oh, and the proxy lines are identical. I am not using the normal Tapestry environment variable to set production mode. We had a Lift application installed first, so I'm using that value and setting production mode in AppModule. That is the only difference between the two installs. In addition, I'm displaying the values if production mode is false, so I know my logic is working. Where production mode is false I get URLs of /oss-info/secure/lookup. When production mode is true, I get URLs of http://apps.ndsu.edu/oss-info/secure/lookup. On both systems the AJP connector is configured as secure, and I am getting a secure session cookie. On the same production system, I have a couple of Tapestry 5.1 apps where production mode is false. They are all generating relative URLs. With production mode false I also get relative URLs under Jetty with Tapestry 5.3.2. I can verify with the 5.3 archetype, but it certainly seems to me that production mode of false lets the URLs be relative, but when you set it to true it starts to do extra work and looking to see if pages are marked as secured. I'm finding it in an odd way because everything on my application servers are behind HTTPS for every single request. Thanks, Richard - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Dynamic forms
On 02/22/2012 05:57 PM, Lenny Primak wrote: Something ate your exception (probably Nabble) its not in your post. No, that was my fault. I do see that it might not be a problem with the main Tapestry code, but instead the Cayenne integration. However, in general, does anyone have any good example code for actually doing dynamic forms? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Dynamic forms
On 02/23/2012 05:30 PM, Robert Zeigler wrote: Hey Richard, What version are you using of: the integration module Tapestry Cayenne ? Also, can you tell me what the actual exception was? Robert tapestry5-cayenne-core (and -server) 0.4 Tapestry 5.2.6 Line of code that threw the exception: model = beanModelSource.create(BaseObject.class, true, resources.getContainerMessages()); And the exception to where it hit my code: java.lang.NullPointerException org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304) org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.init(PropertyModelImpl.java:52) org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126) org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78) org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184) org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153) com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59) edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45) This isn't something I would want backed by Cayenne. I would probably stick it in JCR or something, but there would be pieces of the application I would want to use Cayenne. I have not had a chance to look at how to not use the Cayenne piece for parts of the application. Full stack trace: java.lang.NullPointerException org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304) org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.init(PropertyModelImpl.java:52) org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126) org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78) org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184) org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153) com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59) edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45) edu.ndsu.eci.research.form_generator.pages.Index.init(Index.java) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.init(InternalComponentResourcesImpl.java:146) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.init(ComponentPageElementImpl.java:593) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.init(ComponentPageElementImpl.java:609) org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:93) org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.access$000(ComponentAssemblerImpl.java:38) org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:82) org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:79) org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65) org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063) org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:77) org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:182) org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174) org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65) org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063) org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173) org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:81) org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:74) org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55) org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326) org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321) com.googlecode.tapestry5cayenne.services.CayenneRequestFilter.service(CayenneRequestFilter.java:47)
Dynamic forms
I'm trying to create dynamic forms that will be configured from an outside source. I know this question has been asked in the past, but I don't quite get the answers. I've tried to create my own BeanModel, but I'm getting exceptions when copying the code from here: http://tapestry.apache.org/beaneditform-guide.html * org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304) * org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.init(PropertyModelImpl.java:52) * org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126) * org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78) * org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184) * org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153) * com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59) * com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.createEditModel(CayenneBeanModelSource.java:47) * edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45) And yes, I put my own bean in there. Any suggestions, or better yet example code would be great. Thanks, Richard
Re: Tapestry 5.3.x binary release
You could download the binary jars from Maven Central through their web interface. You would have to find the dependencies through the poms, but it might be easier than your build scripts. On Dec 14, 2011 8:32 AM, Jose Luis Sanchez joseluis.sanc...@m-centric.com wrote: Hi everyone, This is a public petition for , mainly, Tapestry maintainers. As my company does not use nor maven nor gradle ( sigh :-( ), and we are still sticking with old ant scripts in an internal repo, i find it difficult to get T5 binaries to be deployed. Previous versions had ( 5.0.x , 5.1.x and 5.2.x) had the binaries downloadable via web, so i'm asking if you can release some 'official' binaries in the web, so it might be easier for non maven/gradle projects to get the binaries. Thanks a lot. P.S. Yes, i'm trying to move to gradle, but will take a long time :-( -- *Jose Luis Sanchez* Senior Developer *E-mail*: joseluis.sanc...@m-centric.com *Phone* : +34 91 277 03 16 mCentric mobilising imagination c/ Jose Echegaray, 8 Building 3 28230 Las Rozas (Madrid). SPAIN. This message may contain confidential information or privileged material, and is intended only for the individual(s) named. If you are not in the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: security
On 12/4/2011 3:01 AM, csckid wrote: Can I use spring security in my tapestry project? though there is Tynamo tapestry security What do you hope to accomplish? I'm using Spring Security to do protect URL paths with CAS. That was fairly easy to setup, my biggest problem is any documentation discussing CAS and Spring Security was quite old. If you're looking to simply protect paths, I could help. If you're looking for something more complex, I probably won't be of assistance. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Bootstrap
On 10/12/2011 05:06 PM, Howard Lewis Ship wrote: I think it's a good idea; what's the license? Looks like AL 2.0. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org