Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Response

 
Nit Kul
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am applying some filter on all response to the requests coming to my web server.
I need to apply this filter only on the responses of the type "text/html".

How can i check the content type to be text/html on the response object?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does none of the methods of the HttpServletResponse class suggest itself to find out the content type?
 
Nit Kul
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could not find any api methods for response object. i.e. response.getContentType().

Thanks for the reply.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check again--and remember, this is Java, and has inheritance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic