This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The primary difference is that attributes in request scope will survive a transition to another page via a forward, while page attributes will not. Similarly, request attributes are available to included pages, while those in page scope are not. Both go out of scope when the response is sent to the client. hth, bear
So.. Lets go over an example... I'm in my servlet and put objectA into the request The page is then dispatched The user goes over the info in the page and then hits submit and the page is sent back to the servlet. The servlet gets the page. Looking in the session, I should still see objectA. Correct?? When I NOW dispatch my next page, that first request will die [the one that contained objectA]. Correct??? -Dale
Dale, no that's not quite right. HTTP is a stateless protocol, so once the response gets sent to the client, all request information is lost. In your example, objectA goes out of scope when the JSP page is sent to the user. If you want the lifetime of objectA to survive a single request/response cycle your servlet should put the object into session scope (not request scope). The whole purpose of the session is to allow object to persist in this way. hth, bear
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com