Re: [T5] Tapestry + Maven make me crazy !!!
Hi Stephane, I have build a web app -maybe not as complex as yours- but I got a similar problem once... The solution I found is to force Eclipse to build all projects inside the same directory completly outside all projects. Exemple Project Structure : /Parent |_Module1 |_Module2 |_Module3 |_WebApp Then I build all build projects (I talk about the Eclipse builder NOT MAVEN) to a new directory called 'Project_Bin' at the same level as /Parent /Parent_Bin /Parent |_Module1 |_Module2 |_Module3 |_WebApp I use the "Linked Resources" feature to do that. In Eclipse : Windows > Proference > General > Workspace > Linked Resources Doing this I was able to use RunJettyRun plugin without any problem and with the reload possibilities. Hope this might help you :) Martin Stephane Decleire wrote: > > I've been working with tapestry 5 in eclipse for several months by now. > And i have built a "complex" hierarchy of projects to fullfil my needs : > 2 tapestry 5 applications both using several tapestry 5 libraries. In > maven, my 2 applications depends of some of the libraries which in turn > depends on other libraries ... And to be able to declare in one maven > place a lot of common informations, all of my tapestry projects are > children > of a parent pom project. > A few days ago, i decided to deploy a jar of my project on a server for > testing purposes. So i run the maven command "mvn install" from my maven > parent project in order to rebuild all the tapestry 5 libraries and > applications and to get the war packaged. > But since this operation, everything goes wrong : > 1. If i run my tap5 application from maven with "mvn jetty:run", the > application runs normally but i loose the tapestry reload possibilities. > 2. If i run my tap5 application inside eclipse using the jetty launcher > i've been using for several months, the application don't find my > libraries anymore. > > Any clue ? > Is my maven hierarchy eronous ? > What have the maven install command broken ? > > Thanks for any help ... I've been looking for a solution for several > days in google, tap mailing list, docs and wiki ... > > Wouldn't it be a precious information if a page would be dedicated to > maven in the tapestry documentation ? I think that i'm not the only > tapestry user without maven high skills ... > > Stephane > > -- View this message in context: http://www.nabble.com/-T5--Tapestry-%2B-Maven-make-me-crazy-%21%21%21-tp20886741p20890364.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tapestry-spring-security: how to set ASO on successful login?
Short answer: I don't know. I have, for various reasons, maintained a slightly modified version of the tapestry5-acegi project. I will likely do the same for tapestry-spring-security. If you look at the source for nu.localhost.tapestry5.springsecurity.services.SecurityModule you will see where the AnonymousAuthenticationProcessingFilter is hooked in. You could leave it out. You should also know that the HttpSessionContextIntegrationFilter is responsible for moving SecurityContext information back and forth to the HttpSession. I'm not sure under what circumstances you will cause a session to be created - probably anything that puts something in the SecurityContext. OTOH, that won't solve the issue of Tapestry creating the session to store the validation tracker for the Login form. There have been various conversations about session-less strategies on the list. Jonathan > -Original Message- > From: rs1050 [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 21:23 > To: users@tapestry.apache.org > Subject: RE: tapestry-spring-security: how to set ASO on successful login? > > > Off topic: is there a way of instructing spring-security not to create a > session before authentication (kind of 'no role at all' rather than > ROLE_ANONYMOUS)? I am thinking about a web site with big traffic - > creation > of too many sessions for public pages will really slow it down... > > > Jonathan Barker wrote: > > > > IIRC, the default configuration for tapestry-acegi resulted in > > ROLE_ANONYMOUS being given to unauthenticated users. That resulted in > the > > creation of the session. > > > > -- > View this message in context: http://www.nabble.com/tapestry-spring- > security%3A-how-to-set-ASO-on-successful-login--tp20865863p20888633.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > 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-spring-security: how to set ASO on successful login?
Off topic: is there a way of instructing spring-security not to create a session before authentication (kind of 'no role at all' rather than ROLE_ANONYMOUS)? I am thinking about a web site with big traffic - creation of too many sessions for public pages will really slow it down... Jonathan Barker wrote: > > IIRC, the default configuration for tapestry-acegi resulted in > ROLE_ANONYMOUS being given to unauthenticated users. That resulted in the > creation of the session. > -- View this message in context: http://www.nabble.com/tapestry-spring-security%3A-how-to-set-ASO-on-successful-login--tp20865863p20888633.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Tapestry + Maven make me crazy !!!
Not that I know of. Some things are covered under the Deployment Notes links from the Tapestry 5 main page. There are some Wiki entries that talk about different setups including: http://wiki.apache.org/tapestry/Tapestry5RunViaMain?highlight=(tapestry5) http://wiki.apache.org/tapestry/Tapestry5EclipseWTPWithMaven2?highlight=(tap estry5) http://wiki.apache.org/tapestry/Tapestry5_Run_Jetty_From_IDEA?highlight=(tap estry5) There are some issues here: http://wiki.apache.org/tapestry/Tapestry5Caveats?highlight=(tapestry5) > -Original Message- > From: Stephane Decleire [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 19:08 > To: Tapestry users > Subject: Re: [T5] Tapestry + Maven make me crazy !!! > > Thanks Jonathan, > > Happy to know i'm not alone ;-) > But it won't help a lot in getting a not disturbed environment for my > tap projects ... > Is there a list of the problems encountered by the tapestry users in > terms of development environments ? > > Stephane > > Jonathan Barker a écrit : > > Hmmm. I'll have to take another kick at that can. > > > > A new system is in my future so I've hesitated to disturb my dev > > environment. It took me two days to get productive again after I > upgraded > > to a somewhat-new m2eclipse. Don't misunderstand - I like the product - > > it's just that a lot of things broke and I've been hesitant to change > > anything. > > > > Development environment issues are pretty common on this list, and the > devil > > is in the details - or revisions as the case may be. > > > > Oh, and Stephane, if you think you are alone, Howard and Jesse (T4) have > > vented a few times on the Tapestry developers list about their > frustrations > > with Maven. I've been on the floor laughing a couple of times. > > > > > > Jonathan > > > > > > > >> -Original Message- > >> From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED] > >> Sent: Sunday, December 07, 2008 18:58 > >> To: Tapestry users > >> Subject: Re: [T5] Tapestry + Maven make me crazy !!! > >> > >> Em Sun, 07 Dec 2008 19:53:28 -0300, Jonathan Barker > >> <[EMAIL PROTECTED]> escreveu: > >> > >> > >>> Second, if you upgraded from the old, rather limited m2eclipse plugin > to > >>> the latest and greatest, it will break the old JettyLauncher plugin. > >>> Been > >>> there, broke that. > >>> > >> Sonatype's m2eclipse (the newer ones) works flawlessly with > JettyLauncher > >> here. > >> > >> -- > >> Thiago H. de Paula Figueiredo > >> Independent Java consultant, developer, and instructor > >> http://www.arsmachina.com.br/thiago > >> > >> - > >> 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: tapestry-spring-security: how to set ASO on successful login?
IIRC, the default configuration for tapestry-acegi resulted in ROLE_ANONYMOUS being given to unauthenticated users. That resulted in the creation of the session. Also, I hit issues in testing where I would go back to the login page and log in as a different user. Unfortunately, I still had page state left over from the original login, so now I invalidate the session to clear any user-specific state. Jonathan > -Original Message- > From: rs1050 [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 20:58 > To: users@tapestry.apache.org > Subject: RE: tapestry-spring-security: how to set ASO on successful login? > > > Why do you expect that the session already exists so that you have to > invalidate it? Does spring-security create it automatically? > > > Session s = _request.getSession(false); > > s.invalidate(); > > s = _request.getSession(true); > > -- > View this message in context: http://www.nabble.com/tapestry-spring- > security%3A-how-to-set-ASO-on-successful-login--tp20865863p20888463.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > 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: [T5] Tapestry + Maven make me crazy !!!
Do you have Build Automatically selected in Eclipse? > -Original Message- > From: Stephane Decleire [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 18:59 > To: Tapestry users > Subject: Re: [T5] Tapestry + Maven make me crazy !!! > > I've installed the last sonatype's m2eclipse and my app is launched > without dependencies errors but neither tml modifications nor java > modifications are automatically reloaded when i right click my project, > select "Debug as / Maven Build ..." and start jetty:run from there ... > > Thiago H. de Paula Figueiredo a écrit : > > Em Sun, 07 Dec 2008 19:53:28 -0300, Jonathan Barker > > <[EMAIL PROTECTED]> escreveu: > > > >> Second, if you upgraded from the old, rather limited m2eclipse plugin > >> to the latest and greatest, it will break the old JettyLauncher > >> plugin. Been > >> there, broke that. > > > > Sonatype's m2eclipse (the newer ones) works flawlessly with > > JettyLauncher here. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tapestry-spring-security: how to set ASO on successful login?
Why do you expect that the session already exists so that you have to invalidate it? Does spring-security create it automatically? > Session s = _request.getSession(false); > s.invalidate(); > s = _request.getSession(true); -- View this message in context: http://www.nabble.com/tapestry-spring-security%3A-how-to-set-ASO-on-successful-login--tp20865863p20888463.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What's the easiest way to implement two dependent select lists ?
I agree there must be a better way to do it with a Tapestry component, but I'd probably do it as you described (it would only be a trivial amount of JS). Again, I'm curious what the Tap experts would do. The zone solution has been suggested for recent versions but doesn't appear useful in this case. You might want to reignite these threads: http://www.nabble.com/Updating-a-zone-within-a-form---td18769907.html http://www.nabble.com/Updating-a-zone-within-a-form---td18769907.html http://www.nabble.com/-T5--AJAX-and-partial-updates-of-formsZone-AjaxFormLoop-FormInjector-FormFragment-and-the-like--td19664541.html http://www.nabble.com/-T5--AJAX-and-partial-updates-of-formsZone-AjaxFormLoop-FormInjector-FormFragment-and-the-like--td19664541.html HugoPalma wrote: > > I'm already using the OnEvent component. Still, because the model of the > select list i want to update is calculated server-side i need to pass it > in json to the client, parse it again in javascript and then update the > select input. This does work but i feel that there should be a simpler > way of doing this, maybe using zones. > > thermus wrote: >> I'm a Tapestry novice, but you may want to have a look at >> http://code.google.com/p/tapestry5-components/ t5components . It allows >> you >> to add a mixin to components to respond to an OnChange event with AJAX >> (see: >> http://87.193.218.134:8080/t5c-demo/oneventpage this and >> http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html >> this for details). You could then change the data model for the other >> select component with a tiny bit of JavaScript in the onCompleteCallback >> function. >> >> I'm curious how a Tapestry expert would handle it. >> >> >> HugoPalma wrote: >> >>> I have a very usual use where in a form i have two selects, and when the >>> user selects a value on one the values on the second should be filtered >>> accordingly. >>> As the Select component doesn't support ajax out-of.the-box i see myself >>> forced to implement a lot of plumbing and javascript stuff. >>> >>> Still, i feel that this kind of use case should be much easier to >>> implement. >>> Maybe i'm missing something. >>> I'd like to hear some ideas about how u would handle this. >>> >>> Thanks. >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-implement-two-dependent-select-lists---tp20859735p20888201.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Tapestry + Maven make me crazy !!!
Thanks Jonathan, Happy to know i'm not alone ;-) But it won't help a lot in getting a not disturbed environment for my tap projects ... Is there a list of the problems encountered by the tapestry users in terms of development environments ? Stephane Jonathan Barker a écrit : > Hmmm. I'll have to take another kick at that can. > > A new system is in my future so I've hesitated to disturb my dev > environment. It took me two days to get productive again after I upgraded > to a somewhat-new m2eclipse. Don't misunderstand - I like the product - > it's just that a lot of things broke and I've been hesitant to change > anything. > > Development environment issues are pretty common on this list, and the devil > is in the details - or revisions as the case may be. > > Oh, and Stephane, if you think you are alone, Howard and Jesse (T4) have > vented a few times on the Tapestry developers list about their frustrations > with Maven. I've been on the floor laughing a couple of times. > > > Jonathan > > > >> -Original Message- >> From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED] >> Sent: Sunday, December 07, 2008 18:58 >> To: Tapestry users >> Subject: Re: [T5] Tapestry + Maven make me crazy !!! >> >> Em Sun, 07 Dec 2008 19:53:28 -0300, Jonathan Barker >> <[EMAIL PROTECTED]> escreveu: >> >> >>> Second, if you upgraded from the old, rather limited m2eclipse plugin to >>> the latest and greatest, it will break the old JettyLauncher plugin. >>> Been >>> there, broke that. >>> >> Sonatype's m2eclipse (the newer ones) works flawlessly with JettyLauncher >> here. >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java consultant, developer, and instructor >> http://www.arsmachina.com.br/thiago >> >> - >> 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: [T5] Tapestry + Maven make me crazy !!!
I've installed the last sonatype's m2eclipse and my app is launched without dependencies errors but neither tml modifications nor java modifications are automatically reloaded when i right click my project, select "Debug as / Maven Build ..." and start jetty:run from there ... Thiago H. de Paula Figueiredo a écrit : > Em Sun, 07 Dec 2008 19:53:28 -0300, Jonathan Barker > <[EMAIL PROTECTED]> escreveu: > >> Second, if you upgraded from the old, rather limited m2eclipse plugin >> to the latest and greatest, it will break the old JettyLauncher >> plugin. Been >> there, broke that. > > Sonatype's m2eclipse (the newer ones) works flawlessly with > JettyLauncher here. >
RE: [T5] Tapestry + Maven make me crazy !!!
Hmmm. I'll have to take another kick at that can. A new system is in my future so I've hesitated to disturb my dev environment. It took me two days to get productive again after I upgraded to a somewhat-new m2eclipse. Don't misunderstand - I like the product - it's just that a lot of things broke and I've been hesitant to change anything. Development environment issues are pretty common on this list, and the devil is in the details - or revisions as the case may be. Oh, and Stephane, if you think you are alone, Howard and Jesse (T4) have vented a few times on the Tapestry developers list about their frustrations with Maven. I've been on the floor laughing a couple of times. Jonathan > -Original Message- > From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 18:58 > To: Tapestry users > Subject: Re: [T5] Tapestry + Maven make me crazy !!! > > Em Sun, 07 Dec 2008 19:53:28 -0300, Jonathan Barker > <[EMAIL PROTECTED]> escreveu: > > > Second, if you upgraded from the old, rather limited m2eclipse plugin to > > the latest and greatest, it will break the old JettyLauncher plugin. > > Been > > there, broke that. > > Sonatype's m2eclipse (the newer ones) works flawlessly with JettyLauncher > here. > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > - > 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: [T5] Tapestry + Maven make me crazy !!!
> > I think that i'm not the only > tapestry user without maven high skills ... If you're using the Tapestry binaries, there's no real reason you need to use Maven if if gives you so much troubles. When you lose days figuring out how to get your builds to work properly, it might be a good reason to switch to a build-system you are more familiar with. That's the first thing I did when I got started using Tapestry: setting up a project-structure using ANT. I don't know much about Maven and I've never had the motivation to learn, since it is just a build-system and ANT already does everything I need to do without the hassle. The projects I have downloaded that do require Maven for building also don't give me much motivation to use it. The first build usually takes up half an hour to download all dependencies from all over the place and then usually fail because one of the dependencies cannot be found. regards, Onno
Re: [T5] Tapestry + Maven make me crazy !!!
Em Sun, 07 Dec 2008 19:53:28 -0300, Jonathan Barker <[EMAIL PROTECTED]> escreveu: Second, if you upgraded from the old, rather limited m2eclipse plugin to the latest and greatest, it will break the old JettyLauncher plugin. Been there, broke that. Sonatype's m2eclipse (the newer ones) works flawlessly with JettyLauncher here. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Tapestry + Maven make me crazy !!!
Are you using Sonatype's m2eclipse plugin? (http://m2eclipse.sonatype.org/) If not, I strongly recommend it. If you have any issues with JettyLauncher not finding libraries, it's because they're not correctly added to your project classpath. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor Shttp://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Tapestry + Maven make me crazy !!!
I have a love-hate relationship with Maven and Eclipse plugins. First off, I hope you've done a "mvn clean" at some point. Second, if you upgraded from the old, rather limited m2eclipse plugin to the latest and greatest, it will break the old JettyLauncher plugin. Been there, broke that. The new Maven plugin for Eclipse is much smarter about setting the classpath so that execution from the command line and within Eclipse behave the same way. Unfortunately, that means that the classes within the JettyLauncher plugin vanish from the classpath. Other than that, remember, it's not what you DON'T KNOW that really gets you into trouble, it's what you KNOW that ISN"T TRUE. Good luck. Jonathan > -Original Message- > From: Stephane Decleire [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 17:26 > To: Tapestry users > Subject: [T5] Tapestry + Maven make me crazy !!! > > I've been working with tapestry 5 in eclipse for several months by now. > And i have built a "complex" hierarchy of projects to fullfil my needs : > 2 tapestry 5 applications both using several tapestry 5 libraries. In > maven, my 2 applications depends of some of the libraries which in turn > depends on other libraries ... And to be able to declare in one maven > place a lot of common informations, all of my tapestry projects are > children > of a parent pom project. > A few days ago, i decided to deploy a jar of my project on a server for > testing purposes. So i run the maven command "mvn install" from my maven > parent project in order to rebuild all the tapestry 5 libraries and > applications and to get the war packaged. > But since this operation, everything goes wrong : > 1. If i run my tap5 application from maven with "mvn jetty:run", the > application runs normally but i loose the tapestry reload possibilities. > 2. If i run my tap5 application inside eclipse using the jetty launcher > i've been using for several months, the application don't find my > libraries anymore. > > Any clue ? > Is my maven hierarchy eronous ? > What have the maven install command broken ? > > Thanks for any help ... I've been looking for a solution for several > days in google, tap mailing list, docs and wiki ... > > Wouldn't it be a precious information if a page would be dedicated to > maven in the tapestry documentation ? I think that i'm not the only > tapestry user without maven high skills ... > > Stephane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What's the easiest way to implement two dependent select lists ?
I'm already using the OnEvent component. Still, because the model of the select list i want to update is calculated server-side i need to pass it in json to the client, parse it again in javascript and then update the select input. This does work but i feel that there should be a simpler way of doing this, maybe using zones. thermus wrote: I'm a Tapestry novice, but you may want to have a look at http://code.google.com/p/tapestry5-components/ t5components . It allows you to add a mixin to components to respond to an OnChange event with AJAX (see: http://87.193.218.134:8080/t5c-demo/oneventpage this and http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html this for details). You could then change the data model for the other select component with a tiny bit of JavaScript in the onCompleteCallback function. I'm curious how a Tapestry expert would handle it. HugoPalma wrote: I have a very usual use where in a form i have two selects, and when the user selects a value on one the values on the second should be filtered accordingly. As the Select component doesn't support ajax out-of.the-box i see myself forced to implement a lot of plumbing and javascript stuff. Still, i feel that this kind of use case should be much easier to implement. Maybe i'm missing something. I'd like to hear some ideas about how u would handle this. Thanks.
RE: tapestry-spring-security: how to set ASO on successful login?
My 'loginform.url' points to "/login". I've also looked at the source for the new tapestry-spring-security and I don't see much for differences. I noticed a post by Martijn asking how you configured Spring Security. If you are using tapestry-spring-security, you don't need to do the usual Spring configuration so I could see you running into problems there if you did that. Yes, all un-authenticated requests go to my login page. I also use the SavedRequest from Acegi to continue on to the desired page with the correct parameters, if possible. Here's a chunk of my login page: public Object onSuccessFromLoginForm(){ UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(_username,_password); Authentication authResult; try { authResult = _authenticationManager.authenticate(authRequest); logger.info("successful login for: " + _username); } catch (BadCredentialsException failed) { _form.recordError(_passwordField, "Invalid username or password"); logger.info("bad password for: " + _username); return null; } catch (AuthenticationException failed) { _form.recordError(_passwordField, "Invalid username or password"); logger.info("failed login for: " + _username); return null; } // get the saved request before we trash the session SavedRequest savedRequest = (SavedRequest) _requestGlobals.getHTTPServletRequest().getSession().getAttribute(AbstractPr ocessingFilter.ACEGI_SAVED_REQUEST_KEY); // make sure the user state gets cleared // and problems with anonymous auth Session s = _request.getSession(false); s.invalidate(); s = _request.getSession(true); SecurityContextHolder.getContext().setAuthentication(authResult); if(savedRequest != null){ java.net.URL url = null; try { url = new URL(savedRequest.getRequestURL()); } catch (MalformedURLException e){ logger.error("malformed url:" + savedRequest.getRequestURI()); } return url; } return Summary.class; } > -Original Message- > From: rs1050 [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2008 15:14 > To: users@tapestry.apache.org > Subject: RE: tapestry-spring-security: how to set ASO on successful login? > > > Thank you Jonathan, > > My login page is 'user/login', and this is what i have in configuration of > spring-security: > > configuration.add("spring-security.loginform.url", "/user/login"); > configuration.add("spring-security.failure.url", > "/user/login/failed"); > > Then spring-security hijacks all submits from login page. I did not do any > custom filter creation in addition to that. In your application, what is > the > 'loginform.url'? Does it point to the actual tapestry login page? > > Assuming that in your case spring-security does *not* hijack the submits > from the login page, does it still redirects to login page if a user tries > to access some other secured page without being authenitcated? > > Thank you. > R. > -- > View this message in context: http://www.nabble.com/tapestry-spring- > security%3A-how-to-set-ASO-on-successful-login--tp20865863p20885230.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > 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]
[T5] Tapestry + Maven make me crazy !!!
I've been working with tapestry 5 in eclipse for several months by now. And i have built a "complex" hierarchy of projects to fullfil my needs : 2 tapestry 5 applications both using several tapestry 5 libraries. In maven, my 2 applications depends of some of the libraries which in turn depends on other libraries ... And to be able to declare in one maven place a lot of common informations, all of my tapestry projects are children of a parent pom project. A few days ago, i decided to deploy a jar of my project on a server for testing purposes. So i run the maven command "mvn install" from my maven parent project in order to rebuild all the tapestry 5 libraries and applications and to get the war packaged. But since this operation, everything goes wrong : 1. If i run my tap5 application from maven with "mvn jetty:run", the application runs normally but i loose the tapestry reload possibilities. 2. If i run my tap5 application inside eclipse using the jetty launcher i've been using for several months, the application don't find my libraries anymore. Any clue ? Is my maven hierarchy eronous ? What have the maven install command broken ? Thanks for any help ... I've been looking for a solution for several days in google, tap mailing list, docs and wiki ... Wouldn't it be a precious information if a page would be dedicated to maven in the tapestry documentation ? I think that i'm not the only tapestry user without maven high skills ... Stephane
Re: tapestry-spring-security: how to set ASO on successful login?
I was using tapestry-spring-security. -- View this message in context: http://www.nabble.com/tapestry-spring-security%3A-how-to-set-ASO-on-successful-login--tp20865863p20885666.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry-spring-security: how to set ASO on successful login?
Are you using Spring Security directly or are you using the tapestry5-acegi library? I use Sprint Security without using tapestry5-acegi and my Login page is a fully functional tapestry page (ie it allows you to set ASO's etc.). The trick is to disable Spring security filtering for the login page (in de spring config file). In my case: If you are using tapestry5-acegi you should somehow make the filter not filter you login page: Martijn Brinkers On Fri, 2008-12-05 at 17:58 -0800, rs1050 wrote: > Hi, > > I would like to create and set ASO on successful login. Without using > tapestry-spring-security my Login page looked like this: > > public class Login { > > Object onSuccess() { > boolean authResult = authenticate(); > if (authResult) { > // create and set ASO 'myState' > } > } > > @ApplicationState(create=false) > private MyState myState; > } > > after integrating with tapestry-spring-security, spring security intercepts > submits from the login form, and my Index java page in never called. I was > thinking about providing my own AuthenticationProcessingFilter and there > setting new instance of ASO in http session manually, but it is very ugly > because I will have to invoke this method from > SessionApplicationStatePersistenceStrategy (which is private, so I will need > to use reflection tricks to overcome, and you get the picture - it becomes > really ugly): > private String buildKey(Class asoClass) > { > return PREFIX + asoClass.getName(); > } > > Any help is appreciated. > R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tapestry-spring-security: how to set ASO on successful login?
Thank you Jonathan, My login page is 'user/login', and this is what i have in configuration of spring-security: configuration.add("spring-security.loginform.url", "/user/login"); configuration.add("spring-security.failure.url", "/user/login/failed"); Then spring-security hijacks all submits from login page. I did not do any custom filter creation in addition to that. In your application, what is the 'loginform.url'? Does it point to the actual tapestry login page? Assuming that in your case spring-security does *not* hijack the submits from the login page, does it still redirects to login page if a user tries to access some other secured page without being authenitcated? Thank you. R. -- View this message in context: http://www.nabble.com/tapestry-spring-security%3A-how-to-set-ASO-on-successful-login--tp20865863p20885230.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tapestry-spring-security: how to set ASO on successful login?
Responses inline > -Original Message- > From: rs1050 [mailto:[EMAIL PROTECTED] > Sent: Saturday, December 06, 2008 15:27 > To: users@tapestry.apache.org > Subject: RE: tapestry-spring-security: how to set ASO on successful login? > > > Thank you. > > "You could work with the ASO in the relevant onSuccess method." - i wish i > could - my onSuccess method for my Login page is *not* being called b/c > tapestry-spring-security filter hijacks the request to that url. Once > spring-security's filter (and it is not a Tapestry's filter) start > processing the request, i need to be able to do something with the ASO. I'm using tapestry5-acegi, but I don't think it's changed with the update to Spring Security. I AM using a Login page, and my onSuccess() method does get called. I haven't tried to configure any authentication processing filter which may explain why what I do works - I don't get hijacked. > > Currently I am planning to subclass > org.springframework.security.ui.webapp.AuthenticationProcessingFilter and > overwrite onSuccessfulAuthentication method to create ASO. In order to do > that I need reference to ApplicationStateManager. However, i can't figure > out a way of how to get it except for a very ugly one: > > 1. I create a TapestryExposer eager service, which on construction, > remembers ApplicationStateManager passed to the constructor and set itself > into a Spring-defined bean called 'TapestryExposerHolder' > 2. in my custom spring-security filter's (non-tapestry filter) > onSuccessfulAuthentication method I lookup TapestryExposerHolder, and from > it get TapestryExposer, and from that I get ApplicationStateManager. > ugr. > I suggest you follow the link I gave earlier: http://www.nabble.com/Accessing-ApplicationStateManager-from-within-a-Filter -td20274449.html#a20324607 My strategy was simple: You only get a page that uses the ASO if you have been authenticated. Therefore, on any page that asks for the ASO, you know that authentication will already have occurred. You can put all your ASO-building code in a contribution to the ApplicationStateManager, and get the authentication information from the SecurityContext. This also guarantees that any "accidental" ASO creation will create a properly constructed ASO, and allows things like the RememberMe service to be used (that would not be calling your onSuccess() method) yet still get a properly constructed ASO at the end. > I anyone can come up with a cleaner way of doing something with ASO after > successful authentication by spring security, it is really appreciated. > > R. > -- > View this message in context: http://www.nabble.com/tapestry-spring- > security%3A-how-to-set-ASO-on-successful-login--tp20865863p20874204.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
Cyclic relationships in Beaneditform
Would Beaneditform in combination with AppPropertyEditBlocks support cyclic relationships such as this one here: public class Category { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String name; private Category parent; ... } ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Beaneditform example with ManyToMany ManyToOne
Is there an example of using the Beaneditform for ManyToMany and ManyToOne associations? Is there a more simple solution with less code then what is described in "Adding New Property Editors" ? In theory there could be a Beaneditform that would automatically add all associated entities? Or what is the reason why associated objects are currently ignored? Thanks! Toby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry-spring-security: using custom AuthenticationProcessingFilter
Hi, I'm not 100% sure because I allways get a little bit confused by the details of injection. Maybe the improved documentation can help you ( http://tapestry.apache.org/tapestry5/tapestry-ioc/injection.html) As far as I understand I think this is a use case for the Alias service. You can find the documentation here: http://tapestry.apache.org/tapestry5/guide/alias.html Hope this helps. Olli 2008/12/7 rs1050 <[EMAIL PROTECTED]> > > I am trying to use my custom implementation of > org.springframework.security.ui.webapp.AuthenticationProcessingFilter with > tapestry-spring-security. > > By looking at the source of tapestry-spring-security i see this in > SecurityModule: > >public static void contributeHttpServletRequestHandler( >OrderedConfiguration configuration, >@InjectService("AuthenticationProcessingFilter") >HttpServletRequestFilter authenticationProcessingFilter, > ...) > > How can I tell tapestry-spring-security to use my own implementation of > AuthenticationProcessingFilter without modifying tapestry-spring-security > code? > > Thank you. > R. > > -- > View this message in context: > http://www.nabble.com/tapestry-spring-security%3A-using-custom-AuthenticationProcessingFilter-tp20877071p20877071.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- og