• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Standard Action Doubt?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers,

I have the followinf doubt on page 422 of the HFSJ,

They say that "In an HTML page with a rich, graphical layout, which JSP standard action can be used to import an image file into the JSP page?"

I'm not understanding the explanation they give. They say that "It is NOT possible to import the contents of any binary file into a jsp page, which generates an HTML response."

Can anyone justify this?

Thanks in advance!
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any response??
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone to comment on this please!
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

I posted this thread some time ago and I would now like to get answers for it. If anyone could, then please help me. Thanks!
 
Tarun Yadav
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The include directive is for text; JSP/ Servlet or HTML resources but not for binary data.

So while you can include a resource which will output an <img> tag and hence display the image, you CANNOT include the image itself. The image is binary data that is meant to be interpreted as a picture.

I'm not sure what will happen if you try to include it; if it does get past compilation ( proabaly will ) and if it runs w/o exception ( not sure ), you'll see garbage on your output, just as if you'd tried to open the image using a text editor.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic