Re: Forms require that the request method be POST

2014-06-25 Thread Dmitry Gusev
That depends on if the page containing the form and/or form handlers
@RequiresAuthentication or @RequiresUser.


On Wed, Jun 25, 2014 at 10:49 PM, George Christman 
wrote:

> Okay cool, that works too. Now if I'm setting remember me to true, should I
> still be seeing this exception?
>
>
> On Wed, Jun 25, 2014 at 2:44 PM, Dmitry Gusev 
> wrote:
>
> > It won't continue form submission, user will be redirected to the page
> with
> > empty form.
> >
> >
> > On Wed, Jun 25, 2014 at 10:31 PM, George Christman <
> > gchrist...@cardaddy.com>
> > wrote:
> >
> > > Thanks Dmitry, I'm willing to give it a shot. What outcome should I
> > expect
> > > to see from your code? Will it just bring the user back to a blank
> form,
> > or
> > > will it continue with the form submission?
> > >
> > >
> > > On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
> > > wrote:
> > >
> > > > Hi George,
> > > >
> > > > See one possible solution here:
> > > >
> > >
> >
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
> > > >
> > > >
> > > > On Wed, Jun 25, 2014 at 7:36 PM, George Christman <
> > > gchrist...@cardaddy.com
> > > > >
> > > > wrote:
> > > >
> > > > > So I finally figured out how to reproduce this exception. I'm using
> > > > > Tapestry-Security and if the session times out and the user submits
> > the
> > > > > form, the page is redirected to the login page. When the user logs
> > in,
> > > it
> > > > > attempts to resubmit the form and ends with this exception. Does
> > > anybody
> > > > > know how to handle this?
> > > > >
> > > > >
> > > > > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > > > > gchrist...@cardaddy.com>
> > > > > wrote:
> > > > >
> > > > > > Thanks for the tips guys, I'll see if I can find the culprit now
> > > that I
> > > > > > know why it's happening.
> > > > > >
> > > > > >
> > > > > > On Mon, May 19, 2014 at 5:52 PM, Eugen 
> > wrote:
> > > > > >
> > > > > >> Hi, I have had this kind of exception then i tried to submit a
> > form
> > > > > >> programmatically from an Applet (HttpClient) without sending the
> > > > > >> formData field.
> > > > > >>
> > > > > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > > > > >> kristian.marinko...@gmail.com>:
> > > > > >> > Hi,
> > > > > >> >
> > > > > >> > check if it is the same client. i once had the same problem.
> > After
> > > > > >> several
> > > > > >> > hours of investigation it was a developer with a browser
> plugin
> > > (web
> > > > > >> > developer) which enabled converting form post requests to get
> > > > > requests.
> > > > > >> >
> > > > > >> > hope this helps.
> > > > > >> >
> > > > > >> > g,
> > > > > >> > Kris
> > > > > >> >
> > > > > >> >
> > > > > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > > > > >> > wrote:
> > > > > >> >
> > > > > >> >> Let me do some more homework now that I at least now how it's
> > > > thrown.
> > > > > >> >> Thanks Thiago.
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula
> Figueiredo
> > <
> > > > > >> >> thiag...@gmail.com> wrote:
> > > > > >> >>
> > > > > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > > > > >> >> > gchrist...@cardaddy.com> wrote:
> > > > > >> >> >
> > > > > >> >> >  In this particular case the application sits behind a
> > firewall
> > > > > with
> > > > > >> no
> > > > > >> >> >> public access so I don't believe this is bot activity.  Do
> > you
> > > > > have
> > > > > >> any
> > > > > >> >> >> other thoughts?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > Do you have any information on when this exception actually
> > > > > happens?
> > > > > >> >> > Otherwise, we can only guess. That exception usually
> happens
> > > > when a
> > > > > >> >> > Tapestry form URL is requested without the form fields,
> hence
> > > the
> > > > > bot
> > > > > >> >> > suspicion.
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > --
> > > > > >> >> > Thiago H. de Paula Figueiredo
> > > > > >> >> > Tapestry, Java and Hibernate consultant and developer
> > > > > >> >> > http://machina.com.br
> > > > > >> >> >
> > > > > >> >> >
> > > > >
> -
> > > > > >> >> > To unsubscribe, e-mail:
> > users-unsubscr...@tapestry.apache.org
> > > > > >> >> > For additional commands, e-mail:
> > > users-h...@tapestry.apache.org
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> --
> > > > > >> >> George Christman
> > > > > >> >> www.CarDaddy.com
> > > > > >> >> P.O. Box 735
> > > > > >> >> Johnstown, New York
> > > > > >> >>
> > > > > >>
> > > > > >>
> > > -
> > > > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > > > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > > > --
> > > > > > George Christman
> > > > > > www.CarDaddy.com
> > > > > > 

Re: Handling Ajax requests when decorating the RequestExceptionHandler

2014-06-25 Thread Thiago H de Paula Figueiredo

On Tue, 24 Jun 2014 09:39:42 -0300, Davide Vecchi  wrote:


Hi,


Hi!

I'm decorating the RequestExceptionHandler in order to handle exceptions  
and then redirecting to the previous page (the one I find in the  
"Referer" HTTP header).


This works fine for normal page requests but I would like to handle also  
the case of Ajax requests. The JavaDoc of  
RequestExceptionHandler.handleRequestException  
(http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html)  
says:


"The handler is also responsible for setting the response status and the  
X-Tapestry-ErrorMessage response header. These are very important in  
Ajax requests to allow the client-side logic to detect the error and  
present it to the user."


I couldn't find documentation to figure out to what values I should set  
the response status and the X-Tapestry-ErrorMessage response header.  
Does anyone have suggestions ?


If you're actually decorating, not overriding, and calling the  
handleRequestException() method from the object you're decorating, this is  
already being done. If not, here's the summary of what the default one  
does:


response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); // HTTP  
status code 500 (internal error)

response.setHeader("X-Tapestry-ErrorMessage", exception.getMessage());

where response is a org.apache.tapestry5.services.Response object.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Forms require that the request method be POST

2014-06-25 Thread George Christman
Okay cool, that works too. Now if I'm setting remember me to true, should I
still be seeing this exception?


On Wed, Jun 25, 2014 at 2:44 PM, Dmitry Gusev 
wrote:

> It won't continue form submission, user will be redirected to the page with
> empty form.
>
>
> On Wed, Jun 25, 2014 at 10:31 PM, George Christman <
> gchrist...@cardaddy.com>
> wrote:
>
> > Thanks Dmitry, I'm willing to give it a shot. What outcome should I
> expect
> > to see from your code? Will it just bring the user back to a blank form,
> or
> > will it continue with the form submission?
> >
> >
> > On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
> > wrote:
> >
> > > Hi George,
> > >
> > > See one possible solution here:
> > >
> >
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
> > >
> > >
> > > On Wed, Jun 25, 2014 at 7:36 PM, George Christman <
> > gchrist...@cardaddy.com
> > > >
> > > wrote:
> > >
> > > > So I finally figured out how to reproduce this exception. I'm using
> > > > Tapestry-Security and if the session times out and the user submits
> the
> > > > form, the page is redirected to the login page. When the user logs
> in,
> > it
> > > > attempts to resubmit the form and ends with this exception. Does
> > anybody
> > > > know how to handle this?
> > > >
> > > >
> > > > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > > > gchrist...@cardaddy.com>
> > > > wrote:
> > > >
> > > > > Thanks for the tips guys, I'll see if I can find the culprit now
> > that I
> > > > > know why it's happening.
> > > > >
> > > > >
> > > > > On Mon, May 19, 2014 at 5:52 PM, Eugen 
> wrote:
> > > > >
> > > > >> Hi, I have had this kind of exception then i tried to submit a
> form
> > > > >> programmatically from an Applet (HttpClient) without sending the
> > > > >> formData field.
> > > > >>
> > > > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > > > >> kristian.marinko...@gmail.com>:
> > > > >> > Hi,
> > > > >> >
> > > > >> > check if it is the same client. i once had the same problem.
> After
> > > > >> several
> > > > >> > hours of investigation it was a developer with a browser plugin
> > (web
> > > > >> > developer) which enabled converting form post requests to get
> > > > requests.
> > > > >> >
> > > > >> > hope this helps.
> > > > >> >
> > > > >> > g,
> > > > >> > Kris
> > > > >> >
> > > > >> >
> > > > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > > > >> > wrote:
> > > > >> >
> > > > >> >> Let me do some more homework now that I at least now how it's
> > > thrown.
> > > > >> >> Thanks Thiago.
> > > > >> >>
> > > > >> >>
> > > > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo
> <
> > > > >> >> thiag...@gmail.com> wrote:
> > > > >> >>
> > > > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > > > >> >> > gchrist...@cardaddy.com> wrote:
> > > > >> >> >
> > > > >> >> >  In this particular case the application sits behind a
> firewall
> > > > with
> > > > >> no
> > > > >> >> >> public access so I don't believe this is bot activity.  Do
> you
> > > > have
> > > > >> any
> > > > >> >> >> other thoughts?
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > Do you have any information on when this exception actually
> > > > happens?
> > > > >> >> > Otherwise, we can only guess. That exception usually happens
> > > when a
> > > > >> >> > Tapestry form URL is requested without the form fields, hence
> > the
> > > > bot
> > > > >> >> > suspicion.
> > > > >> >> >
> > > > >> >> >
> > > > >> >> > --
> > > > >> >> > Thiago H. de Paula Figueiredo
> > > > >> >> > Tapestry, Java and Hibernate consultant and developer
> > > > >> >> > http://machina.com.br
> > > > >> >> >
> > > > >> >> >
> > > > -
> > > > >> >> > To unsubscribe, e-mail:
> users-unsubscr...@tapestry.apache.org
> > > > >> >> > For additional commands, e-mail:
> > users-h...@tapestry.apache.org
> > > > >> >> >
> > > > >> >> >
> > > > >> >>
> > > > >> >>
> > > > >> >> --
> > > > >> >> George Christman
> > > > >> >> www.CarDaddy.com
> > > > >> >> P.O. Box 735
> > > > >> >> Johnstown, New York
> > > > >> >>
> > > > >>
> > > > >>
> > -
> > > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > George Christman
> > > > > www.CarDaddy.com
> > > > > P.O. Box 735
> > > > > Johnstown, New York
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > George Christman
> > > > www.CarDaddy.com
> > > > P.O. Box 735
> > > > Johnstown, New York
> > > >
> > >
> > >
> > >
> > > --
> > > Dmitry Gusev
> > >
> > > AnjLab Team
> > > http://anjlab.com
> > >
> >
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
George Christman
www

Re: Forms require that the request method be POST

2014-06-25 Thread Dmitry Gusev
It won't continue form submission, user will be redirected to the page with
empty form.


On Wed, Jun 25, 2014 at 10:31 PM, George Christman 
wrote:

> Thanks Dmitry, I'm willing to give it a shot. What outcome should I expect
> to see from your code? Will it just bring the user back to a blank form, or
> will it continue with the form submission?
>
>
> On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
> wrote:
>
> > Hi George,
> >
> > See one possible solution here:
> >
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
> >
> >
> > On Wed, Jun 25, 2014 at 7:36 PM, George Christman <
> gchrist...@cardaddy.com
> > >
> > wrote:
> >
> > > So I finally figured out how to reproduce this exception. I'm using
> > > Tapestry-Security and if the session times out and the user submits the
> > > form, the page is redirected to the login page. When the user logs in,
> it
> > > attempts to resubmit the form and ends with this exception. Does
> anybody
> > > know how to handle this?
> > >
> > >
> > > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > > gchrist...@cardaddy.com>
> > > wrote:
> > >
> > > > Thanks for the tips guys, I'll see if I can find the culprit now
> that I
> > > > know why it's happening.
> > > >
> > > >
> > > > On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
> > > >
> > > >> Hi, I have had this kind of exception then i tried to submit a form
> > > >> programmatically from an Applet (HttpClient) without sending the
> > > >> formData field.
> > > >>
> > > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > > >> kristian.marinko...@gmail.com>:
> > > >> > Hi,
> > > >> >
> > > >> > check if it is the same client. i once had the same problem. After
> > > >> several
> > > >> > hours of investigation it was a developer with a browser plugin
> (web
> > > >> > developer) which enabled converting form post requests to get
> > > requests.
> > > >> >
> > > >> > hope this helps.
> > > >> >
> > > >> > g,
> > > >> > Kris
> > > >> >
> > > >> >
> > > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > > >> > wrote:
> > > >> >
> > > >> >> Let me do some more homework now that I at least now how it's
> > thrown.
> > > >> >> Thanks Thiago.
> > > >> >>
> > > >> >>
> > > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> > > >> >> thiag...@gmail.com> wrote:
> > > >> >>
> > > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > > >> >> > gchrist...@cardaddy.com> wrote:
> > > >> >> >
> > > >> >> >  In this particular case the application sits behind a firewall
> > > with
> > > >> no
> > > >> >> >> public access so I don't believe this is bot activity.  Do you
> > > have
> > > >> any
> > > >> >> >> other thoughts?
> > > >> >> >>
> > > >> >> >
> > > >> >> > Do you have any information on when this exception actually
> > > happens?
> > > >> >> > Otherwise, we can only guess. That exception usually happens
> > when a
> > > >> >> > Tapestry form URL is requested without the form fields, hence
> the
> > > bot
> > > >> >> > suspicion.
> > > >> >> >
> > > >> >> >
> > > >> >> > --
> > > >> >> > Thiago H. de Paula Figueiredo
> > > >> >> > Tapestry, Java and Hibernate consultant and developer
> > > >> >> > http://machina.com.br
> > > >> >> >
> > > >> >> >
> > > -
> > > >> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > >> >> > For additional commands, e-mail:
> users-h...@tapestry.apache.org
> > > >> >> >
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> George Christman
> > > >> >> www.CarDaddy.com
> > > >> >> P.O. Box 735
> > > >> >> Johnstown, New York
> > > >> >>
> > > >>
> > > >>
> -
> > > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > George Christman
> > > > www.CarDaddy.com
> > > > P.O. Box 735
> > > > Johnstown, New York
> > > >
> > > >
> > >
> > >
> > > --
> > > George Christman
> > > www.CarDaddy.com
> > > P.O. Box 735
> > > Johnstown, New York
> > >
> >
> >
> >
> > --
> > Dmitry Gusev
> >
> > AnjLab Team
> > http://anjlab.com
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Forms require that the request method be POST

2014-06-25 Thread George Christman
Thanks Dmitry, I'm willing to give it a shot. What outcome should I expect
to see from your code? Will it just bring the user back to a blank form, or
will it continue with the form submission?


On Wed, Jun 25, 2014 at 1:56 PM, Dmitry Gusev 
wrote:

> Hi George,
>
> See one possible solution here:
> https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795
>
>
> On Wed, Jun 25, 2014 at 7:36 PM, George Christman  >
> wrote:
>
> > So I finally figured out how to reproduce this exception. I'm using
> > Tapestry-Security and if the session times out and the user submits the
> > form, the page is redirected to the login page. When the user logs in, it
> > attempts to resubmit the form and ends with this exception. Does anybody
> > know how to handle this?
> >
> >
> > On Mon, May 19, 2014 at 10:53 PM, George Christman <
> > gchrist...@cardaddy.com>
> > wrote:
> >
> > > Thanks for the tips guys, I'll see if I can find the culprit now that I
> > > know why it's happening.
> > >
> > >
> > > On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
> > >
> > >> Hi, I have had this kind of exception then i tried to submit a form
> > >> programmatically from an Applet (HttpClient) without sending the
> > >> formData field.
> > >>
> > >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> > >> kristian.marinko...@gmail.com>:
> > >> > Hi,
> > >> >
> > >> > check if it is the same client. i once had the same problem. After
> > >> several
> > >> > hours of investigation it was a developer with a browser plugin (web
> > >> > developer) which enabled converting form post requests to get
> > requests.
> > >> >
> > >> > hope this helps.
> > >> >
> > >> > g,
> > >> > Kris
> > >> >
> > >> >
> > >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> > >> > wrote:
> > >> >
> > >> >> Let me do some more homework now that I at least now how it's
> thrown.
> > >> >> Thanks Thiago.
> > >> >>
> > >> >>
> > >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> > >> >> thiag...@gmail.com> wrote:
> > >> >>
> > >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> > >> >> > gchrist...@cardaddy.com> wrote:
> > >> >> >
> > >> >> >  In this particular case the application sits behind a firewall
> > with
> > >> no
> > >> >> >> public access so I don't believe this is bot activity.  Do you
> > have
> > >> any
> > >> >> >> other thoughts?
> > >> >> >>
> > >> >> >
> > >> >> > Do you have any information on when this exception actually
> > happens?
> > >> >> > Otherwise, we can only guess. That exception usually happens
> when a
> > >> >> > Tapestry form URL is requested without the form fields, hence the
> > bot
> > >> >> > suspicion.
> > >> >> >
> > >> >> >
> > >> >> > --
> > >> >> > Thiago H. de Paula Figueiredo
> > >> >> > Tapestry, Java and Hibernate consultant and developer
> > >> >> > http://machina.com.br
> > >> >> >
> > >> >> >
> > -
> > >> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
> > >> >> --
> > >> >> George Christman
> > >> >> www.CarDaddy.com
> > >> >> P.O. Box 735
> > >> >> Johnstown, New York
> > >> >>
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > George Christman
> > > www.CarDaddy.com
> > > P.O. Box 735
> > > Johnstown, New York
> > >
> > >
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Forms require that the request method be POST

2014-06-25 Thread Dmitry Gusev
Hi George,

See one possible solution here:
https://github.com/tynamo/tapestry-security/issues/7#issuecomment-40301795


On Wed, Jun 25, 2014 at 7:36 PM, George Christman 
wrote:

> So I finally figured out how to reproduce this exception. I'm using
> Tapestry-Security and if the session times out and the user submits the
> form, the page is redirected to the login page. When the user logs in, it
> attempts to resubmit the form and ends with this exception. Does anybody
> know how to handle this?
>
>
> On Mon, May 19, 2014 at 10:53 PM, George Christman <
> gchrist...@cardaddy.com>
> wrote:
>
> > Thanks for the tips guys, I'll see if I can find the culprit now that I
> > know why it's happening.
> >
> >
> > On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
> >
> >> Hi, I have had this kind of exception then i tried to submit a form
> >> programmatically from an Applet (HttpClient) without sending the
> >> formData field.
> >>
> >> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
> >> kristian.marinko...@gmail.com>:
> >> > Hi,
> >> >
> >> > check if it is the same client. i once had the same problem. After
> >> several
> >> > hours of investigation it was a developer with a browser plugin (web
> >> > developer) which enabled converting form post requests to get
> requests.
> >> >
> >> > hope this helps.
> >> >
> >> > g,
> >> > Kris
> >> >
> >> >
> >> > On Mon, May 19, 2014 at 5:55 PM, George Christman
> >> > wrote:
> >> >
> >> >> Let me do some more homework now that I at least now how it's thrown.
> >> >> Thanks Thiago.
> >> >>
> >> >>
> >> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
> >> >> thiag...@gmail.com> wrote:
> >> >>
> >> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
> >> >> > gchrist...@cardaddy.com> wrote:
> >> >> >
> >> >> >  In this particular case the application sits behind a firewall
> with
> >> no
> >> >> >> public access so I don't believe this is bot activity.  Do you
> have
> >> any
> >> >> >> other thoughts?
> >> >> >>
> >> >> >
> >> >> > Do you have any information on when this exception actually
> happens?
> >> >> > Otherwise, we can only guess. That exception usually happens when a
> >> >> > Tapestry form URL is requested without the form fields, hence the
> bot
> >> >> > suspicion.
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Thiago H. de Paula Figueiredo
> >> >> > Tapestry, Java and Hibernate consultant and developer
> >> >> > http://machina.com.br
> >> >> >
> >> >> >
> -
> >> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> George Christman
> >> >> www.CarDaddy.com
> >> >> P.O. Box 735
> >> >> Johnstown, New York
> >> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
> >
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Forms require that the request method be POST

2014-06-25 Thread George Christman
So I finally figured out how to reproduce this exception. I'm using
Tapestry-Security and if the session times out and the user submits the
form, the page is redirected to the login page. When the user logs in, it
attempts to resubmit the form and ends with this exception. Does anybody
know how to handle this?


On Mon, May 19, 2014 at 10:53 PM, George Christman 
wrote:

> Thanks for the tips guys, I'll see if I can find the culprit now that I
> know why it's happening.
>
>
> On Mon, May 19, 2014 at 5:52 PM, Eugen  wrote:
>
>> Hi, I have had this kind of exception then i tried to submit a form
>> programmatically from an Applet (HttpClient) without sending the
>> formData field.
>>
>> 2014-05-19 22:31 GMT+02:00 Kristian Marinkovic <
>> kristian.marinko...@gmail.com>:
>> > Hi,
>> >
>> > check if it is the same client. i once had the same problem. After
>> several
>> > hours of investigation it was a developer with a browser plugin (web
>> > developer) which enabled converting form post requests to get requests.
>> >
>> > hope this helps.
>> >
>> > g,
>> > Kris
>> >
>> >
>> > On Mon, May 19, 2014 at 5:55 PM, George Christman
>> > wrote:
>> >
>> >> Let me do some more homework now that I at least now how it's thrown.
>> >> Thanks Thiago.
>> >>
>> >>
>> >> On Mon, May 19, 2014 at 10:54 AM, Thiago H de Paula Figueiredo <
>> >> thiag...@gmail.com> wrote:
>> >>
>> >> > On Mon, 19 May 2014 11:44:06 -0300, George Christman <
>> >> > gchrist...@cardaddy.com> wrote:
>> >> >
>> >> >  In this particular case the application sits behind a firewall with
>> no
>> >> >> public access so I don't believe this is bot activity.  Do you have
>> any
>> >> >> other thoughts?
>> >> >>
>> >> >
>> >> > Do you have any information on when this exception actually happens?
>> >> > Otherwise, we can only guess. That exception usually happens when a
>> >> > Tapestry form URL is requested without the form fields, hence the bot
>> >> > suspicion.
>> >> >
>> >> >
>> >> > --
>> >> > Thiago H. de Paula Figueiredo
>> >> > Tapestry, Java and Hibernate consultant and developer
>> >> > http://machina.com.br
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> George Christman
>> >> www.CarDaddy.com
>> >> P.O. Box 735
>> >> Johnstown, New York
>> >>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>


-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Peter Hvass
Hello all,

Thanks for your replies Thiago and Daniel!

Absolutely correct on Thiago's part though it isn't 5.3.x but 5.4-beta-3!
The culprit is Tynamo's tapestry-security in this case. I overlooked this
multiple times
while checking through my Maven Dependencies due to the 5.4-beta-13 and
5.4-beta-3 looking very similar down the list!

I've now excluded tapestry-security's explicit dependencies and everything
is ship shape.

Really a very big thank you for helping me suss out the problem here! Hope
you both have a great day!

Thanks,
Peter

On Wed, Jun 25, 2014 at 4:41 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 25 Jun 2014 09:00:23 -0300, Daniel Jue  wrote:
>
>  My intuition says the same thing.  Try forcing a mvn clean or the
>> equivalent.
>>
>
> My intuition says something a little different: some library has a
> dependency on Tapestry 5.3.x, so it ends up in the classpath.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Thiago H de Paula Figueiredo

On Wed, 25 Jun 2014 09:00:23 -0300, Daniel Jue  wrote:


My intuition says the same thing.  Try forcing a mvn clean or the
equivalent.


My intuition says something a little different: some library has a  
dependency on Tapestry 5.3.x, so it ends up in the classpath.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Preload All Pages On Startup

2014-06-25 Thread Daniel Jue
Just wanted to comment that I do the same thing at startup and look at
annotations attached to the pages, and construct menu items for the pages
which have the right kind of annotation.  The annotation I made also has a
parameter fir the type of page, so the menu items get a corresponding
icon.  :-)
On Jun 25, 2014 7:49 AM, "Thiago H de Paula Figueiredo" 
wrote:

> On Wed, 25 Jun 2014 05:58:36 -0300, Net Dawg 
> wrote:
>
>  On server startup, what is the best way to preload all *.tml under
>> [...]resources[...]pages?With all defaults - locale, etc.
>>
>
> Templates themselves are tightly tied to their class counterparts, so
> preloading just templates wouldn't make a difference. Dmitry's solution
> should work for preloading classes and templats.
>
>  In other words, how are tapestry (5.3.x) pages mapped to servlets so that
>> something like this may be attempted in web.xml?
>>
>
> Tapestry doesn't map pages to servlets. Tapestry isn't implemented as a
> servlet, but as a servlet filter, so every request passes through it, even
> when Tapestry itself doesn't generate the response.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Daniel Jue
My intuition says the same thing.  Try forcing a mvn clean or the
equivalent.
On Jun 25, 2014 7:57 AM, "Thiago H de Paula Figueiredo" 
wrote:

> On Wed, 25 Jun 2014 08:46:45 -0300, Peter Hvass  wrote:
>
>  Digging further I discovered RegistryBuilder and output during startup
>> looks like;
>>
>> [INFO] ioc.RegistryBuilder Adding module definition for class
>> org.apache.tapestry5.ioc.modules.TapestryIOCModule
>> [INFO] ioc.RegistryBuilder Adding module definition for class
>> org.apache.tapestry5.hibernate.modules.HibernateModule
>> [INFO] ioc.RegistryBuilder Adding module definition for class
>> org.apache.tapestry5.json.modules.JSONModule
>> [INFO] ioc.RegistryBuilder Adding module definition for class
>> org.apache.tapestry5.hibernate.modules.HibernateCoreModule
>> [INFO] ioc.RegistryBuilder Adding module definition for class
>> org.tynamo.security.services.SecurityModule
>> [INFO] ioc.RegistryBuilder Adding module definition for class
>> org.apache.tapestry5.modules.TapestryModule
>>
>
> Starting with Tapestry 5.4, some parts of TapestryModule were broken into
> other modules. Some of them are missing in the listing above, something
> which corroborates my guess that have more than one Tapestry version in
> your classpath.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Thiago H de Paula Figueiredo

On Wed, 25 Jun 2014 08:46:45 -0300, Peter Hvass  wrote:


Digging further I discovered RegistryBuilder and output during startup
looks like;

[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.ioc.modules.TapestryIOCModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.hibernate.modules.HibernateModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.json.modules.JSONModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.hibernate.modules.HibernateCoreModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.tynamo.security.services.SecurityModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.modules.TapestryModule


Starting with Tapestry 5.4, some parts of TapestryModule were broken into  
other modules. Some of them are missing in the listing above, something  
which corroborates my guess that have more than one Tapestry version in  
your classpath.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Thiago H de Paula Figueiredo

On Wed, 25 Jun 2014 08:21:15 -0300, Peter Hvass  wrote:


Hi guys,


Hi!


Whenever I try to run my projects now I'm getting errors from
HibernateModule saying it can't find x or y Tapestry internal services
(i.e.: PersistentFieldManager, DashboardManager,
ClasspathAssetAliasManager, TemplateParser, AssetObjectProvider).


Weird. Are you sure you don't have mixed versions of Tapestry in your  
classpath? Like Tapestry 5.3.x and tapestry-hibernate 5.4-beta-x?


I try binding these manually in my AppModule and the errors go away. So  
it looks like HibernateModule is executing before TapestryModule and I'm  
a

little bit stumped as to why.


Tapestry-IoC is built in such a way that the ordering in which modules are  
loaded is irrelevant, so I think you're basing your conclusions on a wrong  
assumption.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Preload All Pages On Startup

2014-06-25 Thread Thiago H de Paula Figueiredo
On Wed, 25 Jun 2014 05:58:36 -0300, Net Dawg   
wrote:


On server startup, what is the best way to preload all *.tml under  
[...]resources[...]pages?With all defaults - locale, etc.


Templates themselves are tightly tied to their class counterparts, so  
preloading just templates wouldn't make a difference. Dmitry's solution  
should work for preloading classes and templats.


In other words, how are tapestry (5.3.x) pages mapped to servlets so  
that something like this may be attempted in web.xml?


Tapestry doesn't map pages to servlets. Tapestry isn't implemented as a  
servlet, but as a servlet filter, so every request passes through it, even  
when Tapestry itself doesn't generate the response.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Peter Hvass
Digging further I discovered RegistryBuilder and output during startup
looks like;

[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.ioc.modules.TapestryIOCModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.hibernate.modules.HibernateModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.json.modules.JSONModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.hibernate.modules.HibernateCoreModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.tynamo.security.services.SecurityModule
[INFO] ioc.RegistryBuilder Adding module definition for class
org.apache.tapestry5.modules.TapestryModule

Strikes me that this is really kind of the wrong order...

Now digging to find where this order might be defined.

Thanks,
Peter

*Peter Anders Hvass* - *http://theru.in *


On Wed, Jun 25, 2014 at 2:21 PM, Peter Hvass  wrote:

> Hi guys,
>
> I've been away for a few months on a spelunking hiatus in the murky depths
> of PHP so this might just be a really silly question! Apologies if it is!
>
> I'm all set up running 5.4-beta-13 (tapestry-hibernate flavour) and
> tapestry-security or at least I was until some time this morning.
>
> Whenever I try to run my projects now I'm getting errors from
> HibernateModule saying it can't find x or y Tapestry internal services
> (i.e.: PersistentFieldManager, DashboardManager,
> ClasspathAssetAliasManager, TemplateParser, AssetObjectProvider).
>
> I try binding these manually in my AppModule and the errors go away. So it
> looks like HibernateModule is executing before TapestryModule and I'm a
> little bit stumped as to why.
>
> Anyone experienced this before? Happening on Java 6 and 7, Jetty 6, 7 and
> 8.
>
> Example of one of these error traces:
> 2014-06-25 14:16:13.727:WARN::Failed startup of context
> java.lang.IllegalArgumentException: Contribution
> org.apache.tapestry5.hibernate.modules.HibernateModule.provideHibernateDashboardTab(OrderedConfiguration)
> (at HibernateModule.java:194) is for service 'interface
> org.apache.tapestry5.services.dashboard.DashboardManager' qualified with
> marker annotations [], which does not exist.
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.validateContributeDefs(RegistryImpl.java:241)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.java:200)
>  at
> org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)
> at
> org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:199)
>  at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103)
> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>  at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
>  at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
>  at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
>  at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>  at org.mortbay.jetty.Server.doStart(Server.java:224)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>  at runjettyrun.Bootstrap.main(Bootstrap.java:97)
>
> Thanks!
> Peter Hvass
>


Modules Executing in the Wrong Order? Service Bindings Not Around When Expected?

2014-06-25 Thread Peter Hvass
Hi guys,

I've been away for a few months on a spelunking hiatus in the murky depths
of PHP so this might just be a really silly question! Apologies if it is!

I'm all set up running 5.4-beta-13 (tapestry-hibernate flavour) and
tapestry-security or at least I was until some time this morning.

Whenever I try to run my projects now I'm getting errors from
HibernateModule saying it can't find x or y Tapestry internal services
(i.e.: PersistentFieldManager, DashboardManager,
ClasspathAssetAliasManager, TemplateParser, AssetObjectProvider).

I try binding these manually in my AppModule and the errors go away. So it
looks like HibernateModule is executing before TapestryModule and I'm a
little bit stumped as to why.

Anyone experienced this before? Happening on Java 6 and 7, Jetty 6, 7 and 8.

Example of one of these error traces:
2014-06-25 14:16:13.727:WARN::Failed startup of context
java.lang.IllegalArgumentException: Contribution
org.apache.tapestry5.hibernate.modules.HibernateModule.provideHibernateDashboardTab(OrderedConfiguration)
(at HibernateModule.java:194) is for service 'interface
org.apache.tapestry5.services.dashboard.DashboardManager' qualified with
marker annotations [], which does not exist.
at
org.apache.tapestry5.ioc.internal.RegistryImpl.validateContributeDefs(RegistryImpl.java:241)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.java:200)
at org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)
at
org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:199)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)

Thanks!
Peter Hvass


Re: Preload All Pages On Startup

2014-06-25 Thread Dmitry Gusev
You can try this:

@Inject private ComponentClassResolver componentClassResolver;

@Inject private ComponentSource componentSource;


// then if your code:


List pageNames = componentClassResolver.getPageNames();

for (String pageName : pageNames)

{

componentSource.getPage(pageName);

}





On Wed, Jun 25, 2014 at 12:58 PM, Net Dawg 
wrote:

> On server startup, what is the best way to preload all *.tml under
> [...]resources[...]pages?With all defaults - locale, etc.
>
>
> In other words, how are tapestry (5.3.x) pages mapped to servlets so that
> something like this may be attempted in web.xml?
>
>
>
>  
>Employees
>Employees
>
> org.apache.tapestry.ApplicationServlet
>2
>  




-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Preload All Pages On Startup

2014-06-25 Thread Net Dawg
On server startup, what is the best way to preload all *.tml under 
[...]resources[...]pages?    With all defaults - locale, etc.  


In other words, how are tapestry (5.3.x) pages mapped to servlets so that 
something like this may be attempted in web.xml?



 
   Employees
   Employees
    org.apache.tapestry.ApplicationServlet 
   2