*
The moose likes Portals and Portlets and the fly likes How to display images in a portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "How to display images in a portlet" Watch "How to display images in a portlet" New topic
Author

How to display images in a portlet

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
I am displaying HTML text in a prtlet and the text contains images and the text contains references to images like "". Everything works in a web application if I create rhe images directory in Web Pages. But that doesn´t work in aportlet.

Your help will be greatly apprciated,

Alejandro Barrero


Your help will be greatly appreciated,
Alejandro Barrero
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Gosh darnit! Here's a tutorial I put together called "Displaying Images in a Portlet." Enjoy!

Portlet Development Tutorial: Displaying Images

-Cameron McKenzie
Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
Thank you very much; it looks you are answering my two questions. It appears the solution in both case is to map the paths with renderResponse.ecodeURL and renderRequest.getContextPath. I am trying that, but unfortunately in thisw code:

I am getting the error "cannot find symbol" for each of renderResponse, encodeURL, renderRequest and getContextPath.
I don{t know what I am missing.
Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
For some reason <portlet:defineObjects /> is not working. I can get renderResponse and renderRequest from the request, but I don{t know what keys to use.
Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
I am using <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%> but still doesn´t work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display images in a portlet
 
Similar Threads
Folder Mapping in web application.
View MS word doc with images on website
preparing a jsp that has both image and text
Pushing images to jsp page?
Selecting a particular row in <table> tag used.