You can do this so long as the parameter expects an output stream of some sort. How that stream gets there is of no consequence, so long as whatever you use as the "src" etc. is sufficient to tell the server what to send back. You can give a standard server URL and trust in the server to provide what the client needs or you can use something like: GetResource.do?file_type=gif&file_name=some.gif with the appropriate class to get an output stream from the response object and return the data with the correct content type. I only return data this way, except with Applets, which are all screwed up. That way the organization of resources on the server is completely dark to the view, except for Applets, which are all screwed up. (Applets bifurcate the file and codebase names, making sensible organization impossible. Anyone interested in this solution is invited to ask for it from me.

At 07:25 AM 1/15/2004, Robert Nocera wrote:
I don't think Tomcat does, but your local browser will.  You are sending
your browser a link that tells it to load a file on your file system.  It
will work fine if you are only running locally, but it won't work if you try
to access that link from a browser on another machine unless that machine
also has the same file locally.

-Rob

-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 10:14 AM
To: Struts Users Mailing List
Subject: Re: accessing an image outside my webapp

by jingo. it only works!!

just src rather than href

I thought tomcat wouldn't have access to anything outside the webapp. On 15 Jan 2004, at 15:03, Richard Hightower wrote: > seems like an odd request... but here goes... > > > > html:img supports three attributes for specifyin the location of an > image > forward (referes to a global forward), page (relative to the current > web > context), and href (any valid URL). > > Rick Hightower > Developer > > Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm > > Struts/J2EE consulting -- > http://www.arc-mind.com/consulting.htm#StrutsMentoring > > -----Original Message----- > From: Alain Van Vyve [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 15, 2004 7:35 AM > To: [EMAIL PROTECTED] > Subject: accessing an image outside my webapp > > > > I have a JSP where I would like to show an image located outside my > webapp > (e.g. in a c:\photo directory) ... > > How to do that with the Struts tag ?? > > Thanks > > Alain > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to