Re: [T4.0.2] Conditions inside Foreach ends with Stale Session
@For works great, thanks. I see that @Foreach is deprecated in T4 anyway. Mahmut andyhot schrieb: Well, i've had a lot of conditions inside loops, so im not sure what the problem is here How about trying the @For component perhaps? http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/For.html Mahmut Izci wrote: Hi, It seems that conditions inside of Foreachs cause a "stale session": After submitting the form, this references always to the "Stale Session" page. Has anybody else experienced this behaviour? Thanks Mahmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4.0.2] Conditions inside Foreach ends with Stale Session
Hi, It seems that conditions inside of Foreachs cause a "stale session": After submitting the form, this references always to the "Stale Session" page. Has anybody else experienced this behaviour? Thanks Mahmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T 4.1.2] overriding default exception page
Hi, please use instead of Mahmut ccmail schrieb: Hi all, I've tried to override default Tapestry as described here (http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html). Unfortunately after adding to my hivemodule.xml file I am getting an exception like this: org.apache.hivemind.ApplicationRuntimeException: Error at context:/WEB-INF/hivemodule.xml, line 25, column 66: Infrastructure contribution for property 'exceptionPageName' (mode 'null') conflicts with a prior contribution (at jar:file:/T:/_data/id128.m2.repo/org/apache/tapestry/tapestry-framework/4.1.2/tapestry-framework-4.1.2.jar!/META-INF/tapestry.error.xml, line 110, column 59) and has been ignored. [context:/WEB-INF/hivemodule.xml, line 25, column 66] org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39) org.apache.hivemind.impl.ErrorLogImpl.error(ErrorLogImpl.java:40) org.apache.tapestry.services.impl.InfrastructureImpl.buildMapFromContributions(InfrastructureImpl.java:334) ... What am I doing wrong? Thanks in advance for any assistance. Wojtek --- Ten konkurs jest dla Ciebie ... Sprawd1/4 >> http://link.interia.pl/f1b27 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.0.2 - Friendly URLs
Hi all, friendly URLs are working well, as long as the page URLs are called directly. But how about activating a page after form submit? If I call "cycle.activate("NextPage"), it results in "http://localhost:8080/myapp/app"; and not "http://localhost:8080/myapp/NextPage.html";. Is there a way to activate the url? I can throw a redirect exception, but i'm sure, this is not the best solution. Thanks Mahmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?
Hi, how about using an InjectState annotation: @InjectState("MyApplicationObject") public abstract MyApplicationObject getMyApplicationObject(); Maybe this works. Regards Mahmut Tapestry User List schrieb: It doesn't work. Registry registry = (Registry)context.getAttribute("org.apache.tapestry.Registry:app"); returns null. D. 2007/1/4, James Carman <[EMAIL PROTECTED]>: I don't think that'll work. The ApplicationStateManager needs a reference to the current web request (eventually the session). On 1/4/07, Ben Dotte <[EMAIL PROTECTED]> wrote: > Hi, > > You could do something like this: > > ((ApplicationStateManager) ((Registry) > context.getAttribute("org.apache.tapestry.Registry:app")).getService(App > licationStateManager.class)).get("myStateObject"); > > Where "myStateObject" is the name of your ASO. > > HTH > > Ben > > -Original Message- > From: Tapestry User List [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 04, 2007 8:45 AM > To: tapestry-user@jakarta.apache.org > Subject: how to retrieve an Application State Object (ASO) with an > application scope from the ServletContext ? > > Hi, > > Happy new year > > I have created a class that implements ServletContextListener. > In the method public void contextDestroyed(ServletContextEvent event), > I need to retrieve an Application State Object (ASO) of tapestry 4 > with an application scope (not session). > > My question is how to retrieve an Application State Object (ASO) from > the ServletContext ? > > > public void contextDestroyed(ServletContextEvent event) { > ServletContext context = event.getServletContext(); > // retrieve myApplicationObject here > } > > In hivemodule.xml: > ... > > scope="application"> > class="ns.MyApplicationObject"/> > > > ... > > Thanks so much, > > D. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EventListener annotation
Ok, I got it working now. I didn't use the and components. Mahmut Mahmut Izci schrieb: Hi all, I'm just trying out the new EventListener annotation in tapestry 4.1.1 according to the explanation at "http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html"; and I can't get it working. Do I have to make any additional configurations? The EventListener method is not called. Thanks and happy new year Mahmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
EventListener annotation
Hi all, I'm just trying out the new EventListener annotation in tapestry 4.1.1 according to the explanation at "http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html"; and I can't get it working. Do I have to make any additional configurations? The EventListener method is not called. Thanks and happy new year Mahmut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to move tapestry project to the web root
Huang Gehua schrieb: Always our project is run under the path with a context path ,For example: http://someHost:8080/prjectName/app If i want use url like this [http://someHost:8080/app] to visit my app ,How to do? Tomcat always defines a default context named "ROOT" under webapps folder. Normally you can find the tomcat documentation in it. You can override this default context. i have try to build a Virtual host in my tomcat like this i can visit my app use ugly url like this http://someHost:8080/app?service=page&page=somePage But i cant visit page use friendly url How to resolve the problem??? Did you try "http://someHost:8080/somePage.html"; ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry making Java use 99% cpu?
Alex Kartashev: This is clearly a garbage collection in action. Happened to me many times on Tomcat in development. You're running out of Perm space. Try increasing the perm size to its max (256M - I believe with XX:MaxPermZize=256m). It will still happen but less often (every 10 reloads?), it is possible to get Tomcat to unload the WebappClassloader cleanly (I did it), but this is beyond the scope of one email. :-( Hi Alex, we have also problems with Tomcat and unloading the WebappClassloader. Maybe you can give us some advice. Sometimes Tomcat runs out of memory, if we deploy/undeploy too often or the applications do not work properly. Thanks Mahmut Alex Rui Pacheco wrote: Hi all I am developing a web application with Java 5, Tapestry 4.0.2, Commons DBCP 1.2.1, Tomcat 5.5.17 and MySQL 5.0.19. While I develop my application I noticed a strange behaviour: Java usage suddenly climbs up to 99.9% and never goes down. The server (RHLE) is fine and responsive, but Tomcat stops responding to requests. If I deploy a new war file, he won't uncompact it, if I try to access a web page, he won't serve it, if shut it down, the process will continue running. I have to kill -9 to get rid of it. I believe this problem is with Tapestry because it happens on all the servers I deploy the application. It happens on the development server and on my laptop running Ubuntu Dapper and Java 6. My laptop has no problem running other Java applications for as long as I need them, like JEdit and Aquadata Studio. The development server used to have a JSP based website that also worked withouth a problem, except for the common developer mistakes. Is there a way for me to diagnose whats happening? Any special flags to pass to the VM or some über-secret-hidden log you know about? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]