Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Presentation/Business logic  RSS feed

Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys?
I have an app that returns an image depending on the client's capabilities.
SO far the client sends its desired scale, and the Servlet forwards this scale to other objects which retrieve /generate the image and then change it to desired scale/encoding and returns it to the Servlet as a byte array that is sent back to the client.
Now, this functionality is presentation stuff, and I would like to take this step (image encoding/scaling) to the presentation layer. I have read that JSPs are better suited for text, and that would be nice if I had some text data and several JSPs to encode them for each kind of client, but in this case it is an image that has to be tailored to the client's preferences
Any ideas? Should there be code to change the image size inside the JSP (or even servlet)? Doesn't this make it confusing?
Any thoughts will be appreciated"!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!