Re: Request scope question again...

2002-02-25 Thread theron . kousek


Hi Dave:

I am very sorry again to keep asking questions about this. I think I am
finally starting to understand...   But please pardon my ignorance.

If you have the following scenario where all is defined as request scope:

1.   The user hits the submit button on FORM A and FORM A's  action
forwards to FORM B (which has input fields and another submit button).
2.   The User hits FORM B's submit button which throws back a report (in
html)

Are we looking at 2 different requests in the above scenario (request 1
ending when FORM B comes upand request 2 ending when the report data
comes back?). If we are looking at 2 different requests, that could
explain the problem I am having.

Is the submit action per-se (which calls another action when the submit
button is hit) the end-all of each request?

thanks,
Theron



   
  
dderry 
  
[EMAIL PROTECTED]To: Struts Users Mailing List 
[EMAIL PROTECTED]  
rg  cc:   
  
 Subject: Re: Request scope question 
again...
02/24/02   
  
07:41 PM   
  
Please 
  
respond to 
  
Struts Users   
  
Mailing List   
  
   
  
   
  



Yes. As I understand it, as long as the Action classes are performing
forwards rather than redirects it will all be handled on the server side in
the same request. It is only when a response is returned to the browser
that
the request will be ended. On the other hand, if a redirect is performed,
that is done by sending a response to the browser which somehow tells tells
the browser to request a different page. I don't know how this works
exactly, could be a header, but I really don't know.

The thing to keep in mind though is that a 'request' consists of the
browser
requesting a resource from the server, and the server responding back to
the
browser. Whatever happens on the server, no matter how many resources or
Actions process that request, it is all the same request until the response
is returned to the browser.

Glad to be able to help.

Dave D
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 3:57 PM
Subject: Re: Request scope question again...



 Hi Dave:

 thanks so much.   This is helping.   I think I know the answer to this
 question but can you verify this with me:

 - Based on what you said:
  Request scope changes when the browser makes a request of the server.

 Does this mean that invoking an http request to bring up a JSP page or
 HTML page will start a brand new request?.   And if the entry point JSP
 page (say http://localhost:8080/test/login.jsp) calls actions (that can
 forward to other jsp pages) that call other actions (that can forward
to
 other jsp pages) that call other actions (that can forward to other jsp
 pages) and so forth, that all of those actions (regardless of how many
JSP
 pages were brought up in those actions ActionForward mappings) are all
a
 part of the same request (which could have been something like
 http://localhost:8080/test/login.jsp)

 thanks so much,
 Theron





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




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




RE: Request scope question again...

2002-02-25 Thread Jakkampudi, ChandraseKhar

Yes and no. In the scenario you outlined, there are two requests. TThe
original request ends when the response comes back to the browser not when
you press submit. Throughout all of your action, the request is still the
same.
A new request is started when you hit submit again on form B.

Hope that helps.

-JC

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 3:56 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: Request scope question again...



Hi Dave:

I am very sorry again to keep asking questions about this. I think I am
finally starting to understand...   But please pardon my ignorance.

If you have the following scenario where all is defined as request scope:

1.   The user hits the submit button on FORM A and FORM A's  action
forwards to FORM B (which has input fields and another submit button).
2.   The User hits FORM B's submit button which throws back a report (in
html)

Are we looking at 2 different requests in the above scenario (request 1
ending when FORM B comes upand request 2 ending when the report data
comes back?). If we are looking at 2 different requests, that could
explain the problem I am having.

Is the submit action per-se (which calls another action when the submit
button is hit) the end-all of each request?

thanks,
Theron



 

dderry

[EMAIL PROTECTED]To: Struts Users Mailing List
[EMAIL PROTECTED]  
rg  cc:

 Subject: Re: Request scope
question again...
02/24/02

07:41 PM

Please

respond to

Struts Users

Mailing List

 

 




Yes. As I understand it, as long as the Action classes are performing
forwards rather than redirects it will all be handled on the server side in
the same request. It is only when a response is returned to the browser
that
the request will be ended. On the other hand, if a redirect is performed,
that is done by sending a response to the browser which somehow tells tells
the browser to request a different page. I don't know how this works
exactly, could be a header, but I really don't know.

The thing to keep in mind though is that a 'request' consists of the
browser
requesting a resource from the server, and the server responding back to
the
browser. Whatever happens on the server, no matter how many resources or
Actions process that request, it is all the same request until the response
is returned to the browser.

Glad to be able to help.

Dave D
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 3:57 PM
Subject: Re: Request scope question again...



 Hi Dave:

 thanks so much.   This is helping.   I think I know the answer to this
 question but can you verify this with me:

 - Based on what you said:
  Request scope changes when the browser makes a request of the server.

 Does this mean that invoking an http request to bring up a JSP page or
 HTML page will start a brand new request?.   And if the entry point JSP
 page (say http://localhost:8080/test/login.jsp) calls actions (that can
 forward to other jsp pages) that call other actions (that can forward
to
 other jsp pages) that call other actions (that can forward to other jsp
 pages) and so forth, that all of those actions (regardless of how many
JSP
 pages were brought up in those actions ActionForward mappings) are all
a
 part of the same request (which could have been something like
 http://localhost:8080/test/login.jsp)

 thanks so much,
 Theron





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




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

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




Re: Request scope question again...

2002-02-24 Thread theron . kousek


Hi Dave:

thanks so much.   This is helping.   I think I know the answer to this
question but can you verify this with me:

- Based on what you said:
 Request scope changes when the browser makes a request of the server.

Does this mean that invoking an http request to bring up a JSP page or
HTML page will start a brand new request?.   And if the entry point JSP
page (say http://localhost:8080/test/login.jsp) calls actions (that can
forward to other jsp pages) that call other actions (that can forward to
other jsp pages) that call other actions (that can forward to other jsp
pages) and so forth, that all of those actions (regardless of how many JSP
pages were brought up in those actions ActionForward mappings) are all a
part of the same request (which could have been something like
http://localhost:8080/test/login.jsp)

thanks so much,
Theron



   
  
dderry 
  
[EMAIL PROTECTED]To: Struts Users Mailing List 
[EMAIL PROTECTED]  
rg  cc:   
  
 Subject: Re: Request scope question 
again...
02/22/02   
  
05:22 PM   
  
Please 
  
respond to 
  
Struts Users   
  
Mailing List   
  
   
  
   
  



Hey Theron,

Let me take a shot at this for you. I don't claim to be an expert (except
when applying for a job ;-) ), so hopefully an expert will correct any
mis-information.

Page scope is valid only for a single page. Typically this MAY be the same
as request scope. However, if your Action class performs a forward to a
different page (or action), page scope will change (because it is a new
page), but it is still the same request scope. Request scope changes when
the browser makes a request of the server. So a redirect (rather than a
forward) will terminate request scope because the browser has to make an
additional request to retrieve the desired page.

When the user his the back button, NO beans will be used. remember that
beans reside on the server (all JSP activities are server side). The beans
work with the JSP to generate an HTML document that is delivered to the
browser to render. Hitting the back button merely retrieves this previously
rendered HTML document from the browser cache; no request is made to the
server.

Hopes this helps to clarify things for you. And if I have misspoken, I hope
that someone will correct me.

Dave D


- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 6:40 PM
Subject: Request scope question again...



 Hi Folks:

 How can I determine when a bean/form in request scope has terminated?
 Will  hitting the back button on the browser and bringing up JSP pages
 that use beans in request scope  be using invalid beans in that case
 (since they have scope=request)?

 I'm still trying to figure out the difference between request scope and
 page scope.

 thanks,
 Theron



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




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




Re: Request scope question again...

2002-02-24 Thread dderry

Yes. As I understand it, as long as the Action classes are performing
forwards rather than redirects it will all be handled on the server side in
the same request. It is only when a response is returned to the browser that
the request will be ended. On the other hand, if a redirect is performed,
that is done by sending a response to the browser which somehow tells tells
the browser to request a different page. I don't know how this works
exactly, could be a header, but I really don't know.

The thing to keep in mind though is that a 'request' consists of the browser
requesting a resource from the server, and the server responding back to the
browser. Whatever happens on the server, no matter how many resources or
Actions process that request, it is all the same request until the response
is returned to the browser.

Glad to be able to help.

Dave D
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 3:57 PM
Subject: Re: Request scope question again...



 Hi Dave:

 thanks so much.   This is helping.   I think I know the answer to this
 question but can you verify this with me:

 - Based on what you said:
  Request scope changes when the browser makes a request of the server.

 Does this mean that invoking an http request to bring up a JSP page or
 HTML page will start a brand new request?.   And if the entry point JSP
 page (say http://localhost:8080/test/login.jsp) calls actions (that can
 forward to other jsp pages) that call other actions (that can forward
to
 other jsp pages) that call other actions (that can forward to other jsp
 pages) and so forth, that all of those actions (regardless of how many
JSP
 pages were brought up in those actions ActionForward mappings) are all a
 part of the same request (which could have been something like
 http://localhost:8080/test/login.jsp)

 thanks so much,
 Theron





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




Re: Request scope question again...

2002-02-22 Thread dderry

Hey Theron,

Let me take a shot at this for you. I don't claim to be an expert (except
when applying for a job ;-) ), so hopefully an expert will correct any
mis-information.

Page scope is valid only for a single page. Typically this MAY be the same
as request scope. However, if your Action class performs a forward to a
different page (or action), page scope will change (because it is a new
page), but it is still the same request scope. Request scope changes when
the browser makes a request of the server. So a redirect (rather than a
forward) will terminate request scope because the browser has to make an
additional request to retrieve the desired page.

When the user his the back button, NO beans will be used. remember that
beans reside on the server (all JSP activities are server side). The beans
work with the JSP to generate an HTML document that is delivered to the
browser to render. Hitting the back button merely retrieves this previously
rendered HTML document from the browser cache; no request is made to the
server.

Hopes this helps to clarify things for you. And if I have misspoken, I hope
that someone will correct me.

Dave D


- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 6:40 PM
Subject: Request scope question again...



 Hi Folks:

 How can I determine when a bean/form in request scope has terminated?
 Will  hitting the back button on the browser and bringing up JSP pages
 that use beans in request scope  be using invalid beans in that case
 (since they have scope=request)?

 I'm still trying to figure out the difference between request scope and
 page scope.

 thanks,
 Theron



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