This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c:import question

 
John Gregory
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to import a gif/jpg file that's posted on a website,
similarly to the way HFJSP gets a horse.gif picture. The problem
is it's not the only thing on the web page. I got what looked
like the binary code that corresponds to the picture. Here's what
I typed on my jsp:

<c:import url="http://www.chicagoblackhawks.com/assets/team/mikita_chelios.jpg" />

Is there a way to just get the gif/jpeg without having to import the
WHOLE page?

Thanks,

john
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That technique will actually write the binary data comprising the image into the page - <c:import /> is really supposed to be used for including text data from another page (e.g. foreign page or a local JSP). You are seeing correct behaviour.

I'm not familiar with HFSJ's example, but if you want to include a rendered image a Web page, use HTML's <img src="..." /> tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic