RE: redirect and request´s attributes doubts

2004-03-12 Thread Ronald Wildenberg
   Hello dudes, i´m trying to set some attributes to a 
 request in my
 servlet, that´s pretty easy as you know, but after i must use 
 redirect to a
 JSP page and when i try to recall those attributes created before they
 doesn´t appear in JSP´s request object. Even thought i set a request´s
 attribute and use redirect i cannot get it again, can i?
 


The attributes you add to the request are added on the server. There
is a request object on the server that you add attributes to.

If you use sendRedirect, the client (browser) receives a redirect
response from the server (status code 3xx), with the location to
redirect to. The client then creates a _new_ request for the new url
and sends it to the server. The server creates a new HttpServletRequest
object for you that has nothing to do with the old object.


Regards, Ronald.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect and request´s attributes doubts

2004-03-11 Thread Edson Alves Pereira
Hello dudes, i´m trying to set some attributes to a request in my
servlet, that´s pretty easy as you know, but after i must use redirect to a
JSP page and when i try to recall those attributes created before they
doesn´t appear in JSP´s request object. Even thought i set a request´s
attribute and use redirect i cannot get it again, can i?

Regards,
Edson


RE: redirect and request´s attributes doubts

2004-03-11 Thread Ralph Einfeldt

A redirect creates a new request.

If you want to pass informations across a redirect
you can use url parameters in the redirect url.

Maybe it's is an option to you to forward to the jsp, 
then no new request is created.

 -Original Message-
 From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 2:15 PM
 To: 'Tomcat-User List'
 Subject: redirect and request´s attributes doubts
 
 
   Hello dudes, i´m trying to set some attributes to a 
 request in my
 servlet, that´s pretty easy as you know, but after i must use 
 redirect to a
 JSP page and when i try to recall those attributes created before they
 doesn´t appear in JSP´s request object. Even thought i set a request´s
 attribute and use redirect i cannot get it again, can i?
 
   Regards,
   Edson
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect and request´s attributes doubts

2004-03-11 Thread Edson Alves Pereira
Hello dudes, i´m trying to set some attributes to a request in my
servlet, that´s pretty easy as you know, but after i must use redirect to a
JSP page and when i try to recall those attributes created before they
doesn´t appear in JSP´s request object. Even thought i set a request´s
attribute and use redirect i cannot get it again, can i?

Regards,
Edson



RE: redirect and request´s attributes doubts

2004-03-11 Thread Ralph Einfeldt
That has been answered 40 Minutes ago:

A redirect creates a new request.

If you want to pass informations across a redirect
you can use url parameters in the redirect url.

Maybe it's is an option to you to forward to the jsp, 
then no new request is created.

 -Original Message-
 From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 3:00 PM
 To: 'Tomcat-User List'
 Subject: redirect and request´s attributes doubts
 
 
   Hello dudes, i´m trying to set some attributes to a 
 request in my
 servlet, that´s pretty easy as you know, but after i must use 
 redirect to a
 JSP page and when i try to recall those attributes created before they
 doesn´t appear in JSP´s request object. Even thought i set a request´s
 attribute and use redirect i cannot get it again, can i?
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect and request´s attributes doubts

2004-03-11 Thread Edson Alves Pereira
Hello dudes, i´m trying to set some attributes to a request in my
servlet, that´s pretty easy as you know, but after i must use redirect to a
JSP page and when i try to recall those attributes created before they
doesn´t appear in JSP´s request object. Even thought i set a request´s
attribute and use redirect i cannot get it again, can i?

Regards,
Edson