Spring MVC - Response -


how can access response object bean? request object use following.

    servletrequestattributes attr = (servletrequestattributes)          requestcontextholder.currentrequestattributes(); 

is there similar above response object?

if in web application context (which looks are) can auto wire in httpservletrequest or httpservletresponse.

the request/response current request scope injected.

@component public class somecomponentinawebapplicationcontext {      @autowired     private httpservletrequest request;      @autowired     private httpservletresponse response;      ... } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -