• Post Reply Bookmark Topic Watch Topic
  • New Topic

handling image in jsp

 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
i have one query .
I have one jsp page where i can pass image file to another jsp file and that image i want to display .How to do that?

thanks in Advance.
Mohanasundaram.M
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP code creates HTML pages.

Think about how a typical HTML page imbeds a link to an image.

Never try to serve image data mixed with HTML text, image data must be served by a separate process, typically a servlet.

Bill
 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then any other way?


Regards,
Mohan.M
 
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
No. Images are served as the result of <img> tags or references within CSS. As William pointed out, you can't just mix image data with HTML data -- that's not the way HTML works.
[ August 11, 2008: Message edited by: Bear Bibeault ]
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mohanasundaram muthukannan:
then any other way?


Regards,
Mohan.M


Why do you need a JSP to pass an image from one place to another? Why can't you use the standard (static) HTML methods of displaying the image?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!