Re: Feedback on application status page

2009-06-26 Thread Jason Lotz
My desire for having it as a component rather than a page is that I want to
be able to see this info on every request.  I have the component display the
output below my footer and it works great.  I can always keep an eye on this
information without having to have a separate browser tab open.

Before I started using your implementation, I had created a quick and dirty
SessionDump component that I found works wonders for my understanding of
what is in the session at any given time.  If this data was on a separate
page, I wouldn't be as diligent about looking at it unless I had a reason
to.

Maybe the official Tapestry version should be both?  Implement it as a
component, but also provide a page that uses this component?  Just my 2
cents.

Jason

On Fri, Jun 26, 2009 at 4:53 AM, Hugo Palma  wrote:

> Hi Jason,
> thanks for your feedback.
>
> The version i uploaded here
> https://issues.apache.org/jira/browse/TAP5-570already checks for
> production mode.
> Regarding the page vs component, i implemented it as a page because that
> seems to be the Tapestry approach for this type of stuff. But if you prefer
> a component and have valid arguments for that feel free to comment on the
> above issue and we'll take the discussion from there.
>
> On Thu, Jun 25, 2009 at 23:45, Jason Lotz  wrote:
>
> > I implemented this code as a component that could be used on any page (or
> > in
> > my case, at the bottom of Layout.tml).  This component also checks the
> > Tapestry mode to determine whether or not to show itself.  The other
> > primary
> > change that I made is that I'm using in-line styles so that it is
> > completely
> > portable.
> >
> > While this wasn't rocket science, I'm always looking for a way to give
> back
> > to such a great community.  If anyone wants this version, fire off an
> email
> > and I'll send it your way.
> >
> > Obviously, all the credit goes to Hugo.  I simply modified it to fit my
> > needs.  Thanks!
> >
> > Jason
> >
> >
> >
> > On Thu, Jun 25, 2009 at 1:21 PM, Hugo Palma 
> > wrote:
> >
> > > Ok, i think i got it working.
> > > Check out the new screenshot and code on the blog
> > >
> >
> http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/
> > >
> > > On Thu, Jun 25, 2009 at 14:36, Hugo Palma 
> > wrote:
> > >
> > > > Hi Igor,
> > > > thanks for pointing that issue out.
> > > >
> > > > Indeed it would be cool if we could be view all session data
> organized
> > in
> > > > terms of ASOs and persistent fields.
> > > > I'll give it a go.
> > > >
> > > >
> > > > On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko <
> > igor.drobia...@gmail.com
> > > >wrote:
> > > >
> > > >> Nice!!!
> > > >>
> > > >> BTW see here: https://issues.apache.org/jira/browse/TAP5-570
> > > >>
> > > >>
> > > >> On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma <
> hugo.m.pa...@gmail.com>
> > > >> wrote:
> > > >>
> > > >> > I've created an application status page that it's very similar to
> > the
> > > >> > service status that is bunbled with the framework but instead of
> > > showing
> > > >> > information on services it shows information on the web
> application
> > > >> itself.
> > > >> >
> > > >> > You can check out the code for it and a screenshot here
> > > >> >
> > > >>
> > >
> >
> http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/
> > > >> >
> > > >> > I would also like to know if you guys think that such a page
> should
> > be
> > > >> > included in the framework itself. If so i'll gladly create the
> issue
> > > and
> > > >> > appropriate patch.
> > > >> >
> > > >> > Cheers,
> > > >> > Hugo
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Best regards,
> > > >>
> > > >> Igor Drobiazko
> > > >>
> > > >
> > > >
> > > >
> > >
> >
>


Re: Feedback on application status page

2009-06-25 Thread Jason Lotz
I implemented this code as a component that could be used on any page (or in
my case, at the bottom of Layout.tml).  This component also checks the
Tapestry mode to determine whether or not to show itself.  The other primary
change that I made is that I'm using in-line styles so that it is completely
portable.

While this wasn't rocket science, I'm always looking for a way to give back
to such a great community.  If anyone wants this version, fire off an email
and I'll send it your way.

Obviously, all the credit goes to Hugo.  I simply modified it to fit my
needs.  Thanks!

Jason



On Thu, Jun 25, 2009 at 1:21 PM, Hugo Palma  wrote:

> Ok, i think i got it working.
> Check out the new screenshot and code on the blog
> http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/
>
> On Thu, Jun 25, 2009 at 14:36, Hugo Palma  wrote:
>
> > Hi Igor,
> > thanks for pointing that issue out.
> >
> > Indeed it would be cool if we could be view all session data organized in
> > terms of ASOs and persistent fields.
> > I'll give it a go.
> >
> >
> > On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko  >wrote:
> >
> >> Nice!!!
> >>
> >> BTW see here: https://issues.apache.org/jira/browse/TAP5-570
> >>
> >>
> >> On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma 
> >> wrote:
> >>
> >> > I've created an application status page that it's very similar to the
> >> > service status that is bunbled with the framework but instead of
> showing
> >> > information on services it shows information on the web application
> >> itself.
> >> >
> >> > You can check out the code for it and a screenshot here
> >> >
> >>
> http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/
> >> >
> >> > I would also like to know if you guys think that such a page should be
> >> > included in the framework itself. If so i'll gladly create the issue
> and
> >> > appropriate patch.
> >> >
> >> > Cheers,
> >> > Hugo
> >> >
> >>
> >>
> >>
> >> --
> >> Best regards,
> >>
> >> Igor Drobiazko
> >>
> >
> >
> >
>


Re: SPRING_SECURITY_CONTEXT still in session even after server restart

2009-06-17 Thread Jason Lotz
Ah, interesting.  This sounds like the culprit.

Thanks!

Jason

On Wed, Jun 17, 2009 at 12:17 AM, Kalle Korhonen  wrote:

> By default, Tomcat tries to store sessions on disk. Other than the
> SPRING_SECURITY_CONTEXT object you didn't have serializable objects in
> your application. On Windows, saveOnRestart is turned off
> (http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html) or
> security prevents writing the data to a file. Just guessing of course.
>


SPRING_SECURITY_CONTEXT still in session even after server restart

2009-06-16 Thread Jason Lotz
Environment - Tomcat 5.5, Ubuntu 9.04, Tapestry 5.1, Spring Security
Framework 2.0.4

Note that this does not seem to happen under Windows deployments.

Everything in the application works fine under normal circumstances.  When a
user successfully logs in, the session has a few objects added to it,
including the expect SPRING_SECURITY_CONTEXT object as well as some things
we want to save there as well.  After the server is restarted, everything is
gone from the session (naturally) but the SPRING_SECURITY_CONTEXT object
remains alive and well in the session.

Can anyone explain this behavior?  Extra credit if you can explain why this
isn't happening in Windows.

Jason


Re: Hooks for code on every page request

2009-06-15 Thread Jason Lotz
Thanks, I think the request filter is what I was looking for.

Jason

On Sun, Jun 14, 2009 at 11:26 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Em Sun, 14 Jun 2009 02:12:34 -0300, Angelo Chen <
> angelochen...@yahoo.com.hk> escreveu:
>
>  maybe dispatcher? you can find a related articles in the wiki page for t5.
>>
>
> Or a request filter. A dispatcher is more suited for logic that needs page
> redirection. For example, I implemented an access logging package
> implemented as a request filter.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Hooks for code on every page request

2009-06-13 Thread Jason Lotz
Are there any standard hooks in the Tapestry framework that I should use if
I want to process some logic on each page request?  The quick-and-dirty
solution for my architecture would be to put this logic in the layout
component as it is called on each page request.  However, as this is my
first Tapestry project, I'd like to do things the right way as much as
possible.

If there is a more standard way of doing this, please let me know.  I am
using Tapestry 5.1.

Thanks in advance,
Jason


Clearing field values after form validation

2009-04-23 Thread Jason Lotz
I have a simple form that does some server-side validation in the
onValidate() method.  When the form is invalid, I have confirmed that it
correctly calls my onFailure() method which is defined as -

void onFailure()
{
// Clear the previous password and captcha fields.
password = null;
confirm = null;
captcha = null;
}

These 3 values are form fields that I expect to be blank when I see the
form, but the values are still there.  From what I have read, it seems like
this should be working as I expect.  Can anyone help?

Jason