• Post Reply Bookmark Topic Watch Topic
  • New Topic

Response of a io/Image stream

 
Ben Baker
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is the repose not working am I missing a declaration / how would I declare / use the response?

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks as if you are trying to use an HTTP response in a console Java application? (Except that HttpServletResponse doesn't have a setCompressionQuality() method).

What is it you are actually trying to do? If it's an HTTP response, then this needs to be written as a servlet web application and hosted by a container such as Tomcat or Glassfish.
 
Ben Baker
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to output a file stream of a jpeg image at a variable quality compression level using something similar to the code here: stackoverflow
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that code exists in a servlet environment. The response instance is provided by the servlet container when a request is made.

If your code is not intended to run as part of a servlet-powered web application, than that example may not be of much use to you. At least not the response art.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!