Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Print Image using Jstl  RSS feed

 
ramesh poorella
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai..

how to get image from a folder using JSTL tags...

in html img tag is there... but using jstl tags how will get image into jsp?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL has no tags that create <IMG> tags; but you can write your own custom tags that do so.
 
ramesh poorella
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:JSTL has no tags that create <IMG> tags; but you can write your own custom tags that do so.




how we will write for our own tag for this?

please help me
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd start by learning how to write custom tags in general, so that you get a feeling for how they work. A book Like Head First Servlets & JSP can help with that, but there are lots of introductory articles out there on the web.

Note that a custom tags can help with generating the IMG tag in the web page, but the tag's SRC attribute still needs to point to an image (or a servlet that streams an image). JSPs can't be used to handle such binary content.
 
Elchin Asgarli
Ranch Hand
Posts: 222
Chrome Eclipse IDE Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just by outputting tag? Or you want to return the binary content of the pdf? Then you better use servlets, since JSP is not meant for binary content.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see no reason for any tag other than HTML's <img> tag.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!