添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

closed as off-topic by user207421 , Uwe Plonus , glts , Sunny Milenov , allprog Aug 28 '13 at 13:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for code must demonstrate a minimal understanding of the problem being solved . Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist " – user207421, Uwe Plonus, glts, Sunny Milenov, allprog
If this question can be reworded to fit the rules in the help center , please edit the question . This question should never have achieved such a high ranking on google, 4 years later. Adam Dec 18 '17 at 13:02

There is a method in that getHeader()

Note:Available only for servelt 3.0 ,If not you can't use this.

This method considers only response headers set or added via setHeader(java.lang.String, java.lang.String), addHeader(java.lang.String, java.lang.String), setDateHeader(java.lang.String, long), addDateHeader(java.lang.String, long), setIntHeader(java.lang.String, int), or addIntHeader(java.lang.String, int), respectively.

share improve this answer Thanks Suresh. I have added maven dependency javax.servlet Version 3.1 now I am able to resolve compilation error on JSP, but I am not able to get HttpServletResponse and HttpServletRequest object in controller. I am using Spring Spring MVC annotation based Krishna Kumar Chourasiya Aug 28 '13 at 11:07 @KrishnaKumar I am not much aware of Spring: You need make some changes in your method signature I guess see here : stackoverflow.com/questions/8504258/… Suresh Atta Aug 28 '13 at 12:01 share improve this answer share improve this answer share improve this answer Hi Philipp, getting compilation error when using <% response.getHeader("Author"); %> May this is because of I am using maven dependency javax.servlet - version 2.5 Krishna Kumar Chourasiya Aug 28 '13 at 11:03