aspose file tools*
The moose likes Servlets and the fly likes attributes in response, why not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "attributes in response, why not?" Watch "attributes in response, why not?" New topic
Author

attributes in response, why not?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Why we don't have attributes in response?

In MVC, all request comes from view to controller, then controller forwards request as well as response to model (escaping action classes) and then model does some processing, write something in response (add something in request attribute if that something is not easily writable in response) and send back request and response to controller and then controller send both to view, view gets that something from request and write into response...

My doubt is (only if above is right, ofcorse), it seems bit illogical that what we want to respond, we are adding in request attribute...

Darren Edwards
Ranch Hand

Joined: Aug 17, 2005
Posts: 69
In MVC, when the servlet forwards the request to the JSP it is not responding, it is just adding to the request to enable the JSP to respond. The response is the final stage that goes to the client - if you think about it, what use would there be adding attributes to a response as the client can do nothing with them ...
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by Darren Edwards:
In MVC, when the servlet forwards the request to the JSP it is not responding, it is just adding to the request to enable the JSP to respond. The response is the final stage that goes to the client - if you think about it, what use would there be adding attributes to a response as the client can do nothing with them ...


I agree that, when model adds something in request attributes, it's not the process of responding. But, what we are adding in request attributes, is not the part of response (result of processing)???

:roll:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: attributes in response, why not?