Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
|
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP 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 February 3rd, 2012, 08:02 AM
Authorized User
 
Join Date: Apr 2008
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default validating an image before display using c:import

I have to display an image(available on the server as a resource) in the webpage using jstl. In the code, I have the image url, but before displaying it in the page, I need to validate if the image is available on the server to display.

I tried to use <c:import> but not able to verify if the image exists there. Following is the code I used.
Code:
<c:import url="${logoUrl}" var="imageData" />
<c:if test = "${imageData!=null && not empty imageData}">
display image..${imageData}
</c:if>
When the image is not available on the server, it still enters the if condition but gives a message as "the requested resource is not available"

Please let me know where I am going wrong.

Thanks in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
display an image manojenjoys BOOK: Professional Android 2 Application Development 0 May 5th, 2010 03:27 PM
Display of image sanjay mishra .NET Web Services 4 September 15th, 2009 12:41 AM
help with image display dhillon555 ASP.NET 1.0 and 1.1 Basics 21 February 19th, 2007 03:32 PM
How to Display the image from the image field. mikeparams SQL Server 2000 1 October 29th, 2004 02:23 AM





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