[jboss-user] [JBoss Portal] - Best practice for resource URLs

free1000 do-not-reply at jboss.com
Thu Jul 20 07:59:58 EDT 2006

I want to use images in the portlet I am creating, but can't find any examples of how best to form the URLs for this. 

I initially thought that URLs should just be relative to the web-app that wraps the portlet, but these don't appear to work as I have coded them. 
The web-app has the a folder called images and content image.jsp 

warfile structure 

  |         images 
  |               image.jsp 
  |         jsp 
  |               view.jsp 
  |         META-INF
  |         WEB-INF 
  |              classes 
  |                      ImagePortlet.class
  |              portlet.xml 
  |              portlet-instances.xml
  |              portlet-object.xml
  |              web.xml

In view.jsp I want to insert an image tag which displays images/image.jsp 

<image src="images/image.jpg" /> does not display. I expect that I need to do more work on the URL to achieve this. Can someone provide me with a sample, or point me to the docs where this is described because I can't locate this information. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959525#3959525

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959525

More information about the jboss-user mailing list