View Single Post
Old 09-06-2011, 02:41 PM   PM User | #1
djso1987
New to the CF scene

 
Join Date: Jun 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
djso1987 is an unknown quantity at this point
simple jsp image path

Please see what is wrong with this code.

I want to check if the image is available in the following location ${basePath}images/newcars/assets/75/${vehicle.trimId}.jpg . if the image is available the <img src=””> should be set to this path.
If the image is not available then the <img src=””> should be set to ${basePath}images/common/imagenotavailable70X48.jpg.




<c:choose><c:when test="${thumbpath != null}">
<c:set var="thumbpath" value="${basePath}images/newcars/assets/75/${vehicle.trimId}.jpg" />
</c:when>
<ctherwise>
<c:set var="thumbpath" value="${basePath}images/common/imagenotavailable70X48.jpg" />
</ctherwise></c:choose>

<img src="${thumbpath}" alt="${vehicle.make} ${vehicle.model}" title="${vehicle.make} ${vehicle.model}" width="64" height="48" />
djso1987 is offline   Reply With Quote