Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 25th, 2006, 02:29 PM
Registered User
 
Join Date: Jul 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default image not visible

Hi I have header and menu.jsp.
Using tiles techonlogy.
Now when I access header.jsp.I can see the image present in page.But when i try to access header.jsp in another page.I am not able to see the image.any solutions

 
Old July 25th, 2006, 06:16 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you using relative or absolute URLs to point to the image? It's possible that in one instance the base URL for the request is in a different subfolder or nesting level, so that relative URLs to the image will actually hit the wrong place. What I recommend is generating URLs dynamically based on the content root. For example:

<img src="${pageContext.request.contextPath}/images/cdf_hd.gif" border="0" alt="<bean:message key='product-name.cdf.label' />" title="<bean:message key='product-name.cdf.label' />">

You can cut out the alt and title attributes if you'd prefer.

Jon Emerson
http://www.jonemerson.net/
 
Old July 27th, 2006, 02:25 PM
Registered User
 
Join Date: Jul 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi i was using img tag.which should have been html:img and also replace src attribute with page attribute
Quote:
quote:Originally posted by panacea
 Are you using relative or absolute URLs to point to the image? It's possible that in one instance the base URL for the request is in a different subfolder or nesting level, so that relative URLs to the image will actually hit the wrong place. What I recommend is generating URLs dynamically based on the content root. For example:

<img src="${pageContext.request.contextPath}/images/cdf_hd.gif" border="0" alt="<bean:message key='product-name.cdf.label' />" title="<bean:message key='product-name.cdf.label' />">

You can cut out the alt and title attributes if you'd prefer.

Jon Emerson
http://www.jonemerson.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visible GridView jezywrap ASP.NET 2.0 Basics 3 March 20th, 2007 01:07 PM
visible/invisible stealthdevil Access VBA 4 December 1st, 2006 05:40 PM
Panel.visible shai505 C# 1 April 25th, 2006 05:10 AM
visible vs. not visible on form akibaMaila VB.NET 2002/2003 Basics 2 August 15th, 2005 02:40 PM
DLL not visible.. leonidas General .NET 0 March 10th, 2004 12:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.