reset password
Author Message
wsakura
Posts: 64
Posted 18:54 Feb 19, 2013 |

Professor Sun, I'm confused. What's the difference between these two and when should they be applied? Request vs. getServlet

Last edited by wsakura at 18:55 Feb 19, 2013.
cysun
Posts: 2935
Posted 19:15 Feb 19, 2013 |

I assume you mean request scope vs application scope, i.e. whether to use request.setAttribute() or getServletContext().setAttribute().

The answer is basically the same as the answer to the Scope question you asked before - it depends on how you want to use the data and how long you want to keep the data.

 

Last edited by cysun at 19:16 Feb 19, 2013.
wsakura
Posts: 64
Posted 00:22 Feb 20, 2013 |
cysun wrote:

I assume you mean request scope vs application scope, i.e. whether to use request.setAttribute() or getServletContext().setAttribute().

The answer is basically the same as the answer to the Scope question you asked before - it depends on how you want to use the data and how long you want to keep the data.

 


Ok. Thanks Professor.

From the Edit Comment. I get it now. Thank you.

Last edited by wsakura at 01:21 Feb 20, 2013.