You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Allistair Crossley <Al...@QAS.com> on 2004/05/25 17:56:29 UTC

Test URL Tag?

Hi Guys,

Does anyone know of a tag where I can test for the existence of a URI and output the body if it exists? E.g

<tl:uriExists uri="http://www.domain.com/images/a.gif">
	<img src="http://www.domain.com/images/a.gif" />
</tl:uriExists>

This could use the HEAD http method just to ping the resource.

Cheers, AC.


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Test URL Tag?

Posted by Helios Alonso <ha...@atg.com.uy>.
Maybe <c:import url="..." varReader="myreader"/>

that creates a reader from that URL.  I don't know what happens if the url 
doesn't exists (myreader == null would by great ;-)

At 16:56 25/05/2004 +0100, you wrote:
>Hi Guys,
>
>Does anyone know of a tag where I can test for the existence of a URI and 
>output the body if it exists? E.g
>
><tl:uriExists uri="http://www.domain.com/images/a.gif">
>         <img src="http://www.domain.com/images/a.gif" />
></tl:uriExists>
>
>This could use the HEAD http method just to ping the resource.
>
>Cheers, AC.
>
>
><FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
>-------------------------------------------------------
>QAS Ltd.
>Developers of QuickAddress Software
><a href="http://www.qas.com">www.qas.com</a>
>Registered in England: No 2582055
>Registered in Australia: No 082 851 474
>-------------------------------------------------------
></FONT>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org