Re: Where is the POSTED data on login redirect?

2007-10-29 Thread Peter Coppens

Thanks again for the quick replies.

It proved to be a getParameter in some logging code that messed up the
subsequent read. Weird the problem only shows up with a 'savedrequest' and
not with a normal request, but I guess the behaviour is to be expected. 

Peter


-- 
View this message in context: 
http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13478485
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where is the POSTED data on login redirect?

2007-10-28 Thread Peter Coppens

Hello,

When a user posts data to a servlet after the session has expired (timeout)
tomcat automatically redirects to my login page. After successful login,
tomcat will redirect to the original request.

I am looking for way to access the originally posted data when it 'arrives'
in the servlet (after tomcat has redirected after the login).

Any guidance or pointers would be most warmly welcomed!

Thanks,

Peter


-- 
View this message in context: 
http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13451670
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where is the POSTED data on login redirect?

2007-10-28 Thread david delbecq (jakarta)
They are automatically saved by form authentification system and
restored after form authentification. Your servlet won't be able to make
the difference between a direct hit and a hit with post restored after
form authentification.

Please note, however, that the size of post request saved by tomcat is
limited by default to 4K. If it's bigger, your servlet will get an empty
request. To increase that size, go to Http connector configuration of
tomcat, and change or set the maxSavePostSize.

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Regards,
Delbecq David

Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
Coppens:
 Hello,
 
 When a user posts data to a servlet after the session has expired (timeout)
 tomcat automatically redirects to my login page. After successful login,
 tomcat will redirect to the original request.
 
 I am looking for way to access the originally posted data when it 'arrives'
 in the servlet (after tomcat has redirected after the login).
 
 Any guidance or pointers would be most warmly welcomed!
 
 Thanks,
 
 Peter
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where is the POSTED data on login redirect?

2007-10-28 Thread Peter Coppens

Thanks David, that helps.

Something seem to go wrong for me though. I guess my question was not
sufficiently exact.

The data is posted as application/xml and the servlet consumes it using
request.getReader().read(...) The thing is that when the authentication
process completes and redirects the original post to the servlet, the
request.getReader().read(...) immediately returns -1. The data is in the
buffer alright, but the pointer into the buffer is not positioned at the
beginning. I have tried adding a reset but that does not seem to help.

Any thoughts?

Thanks!

Peter


David Delbecq-2 wrote:
 
 They are automatically saved by form authentification system and
 restored after form authentification. Your servlet won't be able to make
 the difference between a direct hit and a hit with post restored after
 form authentification.
 
 Please note, however, that the size of post request saved by tomcat is
 limited by default to 4K. If it's bigger, your servlet will get an empty
 request. To increase that size, go to Http connector configuration of
 tomcat, and change or set the maxSavePostSize.
 
 http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
 
 Regards,
 Delbecq David
 
 Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
 Coppens:
 Hello,
 
 When a user posts data to a servlet after the session has expired
 (timeout)
 tomcat automatically redirects to my login page. After successful login,
 tomcat will redirect to the original request.
 
 I am looking for way to access the originally posted data when it
 'arrives'
 in the servlet (after tomcat has redirected after the login).
 
 Any guidance or pointers would be most warmly welcomed!
 
 Thanks,
 
 Peter
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13456772
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where is the POSTED data on login redirect?

2007-10-28 Thread David Delbecq
Unfortunately for you, i see nothing in specs about keeping POST 
information during a form based login. So this feature may be tomcat 
specific only. It may be also that the tomcat connector keep POST datas 
only for application/x-www-form-urlencoded and makes it available 
using getParameter()... Also, if anything before Post saving do call 
getParameters(), the Reader is not available anymore because it has been 
consumed by call to getParameters() (used for Post content parsing).


So you should probably consider this impossible to do :) OOr ask the 
tomcat devs about this ^ ^


Peter Coppens schreef:

Thanks David, that helps.

Something seem to go wrong for me though. I guess my question was not
sufficiently exact.

The data is posted as application/xml and the servlet consumes it using
request.getReader().read(...) The thing is that when the authentication
process completes and redirects the original post to the servlet, the
request.getReader().read(...) immediately returns -1. The data is in the
buffer alright, but the pointer into the buffer is not positioned at the
beginning. I have tried adding a reset but that does not seem to help.

Any thoughts?

Thanks!

Peter


David Delbecq-2 wrote:
  

They are automatically saved by form authentification system and
restored after form authentification. Your servlet won't be able to make
the difference between a direct hit and a hit with post restored after
form authentification.

Please note, however, that the size of post request saved by tomcat is
limited by default to 4K. If it's bigger, your servlet will get an empty
request. To increase that size, go to Http connector configuration of
tomcat, and change or set the maxSavePostSize.

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Regards,
Delbecq David

Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
Coppens:


Hello,

When a user posts data to a servlet after the session has expired
(timeout)
tomcat automatically redirects to my login page. After successful login,
tomcat will redirect to the original request.

I am looking for way to access the originally posted data when it
'arrives'
in the servlet (after tomcat has redirected after the login).

Any guidance or pointers would be most warmly welcomed!

Thanks,

Peter


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where is the POSTED data on login redirect?

2007-10-28 Thread Bill Barker

Peter Coppens [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 Thanks David, that helps.

 Something seem to go wrong for me though. I guess my question was not
 sufficiently exact.

 The data is posted as application/xml and the servlet consumes it using
 request.getReader().read(...) The thing is that when the authentication
 process completes and redirects the original post to the servlet, the
 request.getReader().read(...) immediately returns -1. The data is in the
 buffer alright, but the pointer into the buffer is not positioned at the
 beginning. I have tried adding a reset but that does not seem to help.

 Any thoughts?


From a very quick look at the code, it looks like a Tomcat bug (Tomcat's not 
sending 100-continue soon enough to save the post body).  However, this 
isn't the way I would expect to happen.  It would help if you could sniff 
the request and response headers for this case, and post what you find.

 Thanks!

 Peter


 David Delbecq-2 wrote:

 They are automatically saved by form authentification system and
 restored after form authentification. Your servlet won't be able to make
 the difference between a direct hit and a hit with post restored after
 form authentification.

 Please note, however, that the size of post request saved by tomcat is
 limited by default to 4K. If it's bigger, your servlet will get an empty
 request. To increase that size, go to Http connector configuration of
 tomcat, and change or set the maxSavePostSize.

 http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

 Regards,
 Delbecq David

 Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
 Coppens:
 Hello,

 When a user posts data to a servlet after the session has expired
 (timeout)
 tomcat automatically redirects to my login page. After successful login,
 tomcat will redirect to the original request.

 I am looking for way to access the originally posted data when it
 'arrives'
 in the servlet (after tomcat has redirected after the login).

 Any guidance or pointers would be most warmly welcomed!

 Thanks,

 Peter




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -- 
 View this message in context: 
 http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13456772
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]