You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by tutu <tu...@gmail.com> on 2009/07/20 17:08:51 UTC

Pb displaying image

Hi,

I have a pb while trying to display an image that is not in my application
but on the file system!!

I've tried to put this in my jsp:

file:///<%=request.getAttribute( /1.png"></img>

and that too:
<html:image src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
<html:img src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>

(imageLocation reference D:/images)

but nothing is displayed. Does anybody knows how to display an image that is
not in the web application?

thanks,

tugdual
-- 
View this message in context: http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Pb displaying image

Posted by Tugdual Huertas <tu...@gmail.com>.
Ok, thanks Nils,
i'll try first solution.

On Tue, Jul 21, 2009 at 9:53 AM, Nils-Helge Garli Hegvik
<ni...@gmail.com>wrote:

> 1. You put it in a directory that your webserver serve...
> or
> 2. Create a servlet that reads the data from the filesystem and sends
> back the data in the response.
>
> I'd certainly prefer option 1 if possible.
>
> Nils-H
>
> On Tue, Jul 21, 2009 at 9:31 AM, tutu<tu...@gmail.com> wrote:
> >
> > Thanks for response.
> > Just one question, how do you make the image visible on the webserver
> > without putting it in the web application?
> >
> >
> > Jim Kiley wrote:
> >>
> >> Make sure the image is visible to your webserver, and then use an
> >> http://url to access it, rather than a file:// url.
> >> jk
> >>
> >> On Mon, Jul 20, 2009 at 11:08 AM, tutu <tu...@gmail.com>
> wrote:
> >>
> >>>
> >>> Hi,
> >>>
> >>> I have a pb while trying to display an image that is not in my
> >>> application
> >>> but on the file system!!
> >>>
> >>> I've tried to put this in my jsp:
> >>>
> >>> file:///<%=request.getAttribute( /1.png"></img>
> >>>
> >>> and that too:
> >>> <html:image
> >>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
> >>> <html:img
> >>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
> >>>
> >>> (imageLocation reference D:/images)
> >>>
> >>> but nothing is displayed. Does anybody knows how to display an image
> that
> >>> is
> >>> not in the web application?
> >>>
> >>> thanks,
> >>>
> >>> tugdual
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
> >>> Sent from the Struts - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Jim Kiley
> >> Senior Technical Consultant | Summa
> >> [p] 412.258.3346
> >> http://www.summa-tech.com
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/Pb-displaying-image-tp24571593p24582908.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Pb displaying image

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
1. You put it in a directory that your webserver serve...
or
2. Create a servlet that reads the data from the filesystem and sends
back the data in the response.

I'd certainly prefer option 1 if possible.

Nils-H

On Tue, Jul 21, 2009 at 9:31 AM, tutu<tu...@gmail.com> wrote:
>
> Thanks for response.
> Just one question, how do you make the image visible on the webserver
> without putting it in the web application?
>
>
> Jim Kiley wrote:
>>
>> Make sure the image is visible to your webserver, and then use an
>> http://url to access it, rather than a file:// url.
>> jk
>>
>> On Mon, Jul 20, 2009 at 11:08 AM, tutu <tu...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> I have a pb while trying to display an image that is not in my
>>> application
>>> but on the file system!!
>>>
>>> I've tried to put this in my jsp:
>>>
>>> file:///<%=request.getAttribute( /1.png"></img>
>>>
>>> and that too:
>>> <html:image
>>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>>> <html:img
>>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>>>
>>> (imageLocation reference D:/images)
>>>
>>> but nothing is displayed. Does anybody knows how to display an image that
>>> is
>>> not in the web application?
>>>
>>> thanks,
>>>
>>> tugdual
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>> --
>> Jim Kiley
>> Senior Technical Consultant | Summa
>> [p] 412.258.3346
>> http://www.summa-tech.com
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Pb-displaying-image-tp24571593p24582908.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Pb displaying image

Posted by Tugdual Huertas <tu...@gmail.com>.
Yes, that's what i thought.
Is there a way to display images that are on the file system but not in the
web application? If not, how can you configure an external folder for images
if you can't see them in a web application?

2009/7/21 Paweł Wielgus <po...@gmail.com>

> Hi tutu,
> You can't.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2009/7/21 tutu <tu...@gmail.com>:
> >
> > Thanks for response.
> > Just one question, how do you make the image visible on the webserver
> > without putting it in the web application?
> >
> >
> > Jim Kiley wrote:
> >>
> >> Make sure the image is visible to your webserver, and then use an
> >> http://url to access it, rather than a file:// url.
> >> jk
> >>
> >> On Mon, Jul 20, 2009 at 11:08 AM, tutu <tu...@gmail.com>
> wrote:
> >>
> >>>
> >>> Hi,
> >>>
> >>> I have a pb while trying to display an image that is not in my
> >>> application
> >>> but on the file system!!
> >>>
> >>> I've tried to put this in my jsp:
> >>>
> >>> file:///<%=request.getAttribute( /1.png"></img>
> >>>
> >>> and that too:
> >>> <html:image
> >>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
> >>> <html:img
> >>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
> >>>
> >>> (imageLocation reference D:/images)
> >>>
> >>> but nothing is displayed. Does anybody knows how to display an image
> that
> >>> is
> >>> not in the web application?
> >>>
> >>> thanks,
> >>>
> >>> tugdual
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
> >>> Sent from the Struts - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Jim Kiley
> >> Senior Technical Consultant | Summa
> >> [p] 412.258.3346
> >> http://www.summa-tech.com
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/Pb-displaying-image-tp24571593p24582908.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Pb displaying image

Posted by Paweł Wielgus <po...@gmail.com>.
Hi tutu,
You can't.

Best greetings,
Paweł Wielgus.


2009/7/21 tutu <tu...@gmail.com>:
>
> Thanks for response.
> Just one question, how do you make the image visible on the webserver
> without putting it in the web application?
>
>
> Jim Kiley wrote:
>>
>> Make sure the image is visible to your webserver, and then use an
>> http://url to access it, rather than a file:// url.
>> jk
>>
>> On Mon, Jul 20, 2009 at 11:08 AM, tutu <tu...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> I have a pb while trying to display an image that is not in my
>>> application
>>> but on the file system!!
>>>
>>> I've tried to put this in my jsp:
>>>
>>> file:///<%=request.getAttribute( /1.png"></img>
>>>
>>> and that too:
>>> <html:image
>>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>>> <html:img
>>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>>>
>>> (imageLocation reference D:/images)
>>>
>>> but nothing is displayed. Does anybody knows how to display an image that
>>> is
>>> not in the web application?
>>>
>>> thanks,
>>>
>>> tugdual
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>> --
>> Jim Kiley
>> Senior Technical Consultant | Summa
>> [p] 412.258.3346
>> http://www.summa-tech.com
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Pb-displaying-image-tp24571593p24582908.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Pb displaying image

Posted by tutu <tu...@gmail.com>.
Thanks for response.
Just one question, how do you make the image visible on the webserver
without putting it in the web application? 


Jim Kiley wrote:
> 
> Make sure the image is visible to your webserver, and then use an
> http://url to access it, rather than a file:// url.
> jk
> 
> On Mon, Jul 20, 2009 at 11:08 AM, tutu <tu...@gmail.com> wrote:
> 
>>
>> Hi,
>>
>> I have a pb while trying to display an image that is not in my
>> application
>> but on the file system!!
>>
>> I've tried to put this in my jsp:
>>
>> file:///<%=request.getAttribute( /1.png"></img>
>>
>> and that too:
>> <html:image
>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>> <html:img
>> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>>
>> (imageLocation reference D:/images)
>>
>> but nothing is displayed. Does anybody knows how to display an image that
>> is
>> not in the web application?
>>
>> thanks,
>>
>> tugdual
>> --
>> View this message in context:
>> http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> Jim Kiley
> Senior Technical Consultant | Summa
> [p] 412.258.3346
> http://www.summa-tech.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Pb-displaying-image-tp24571593p24582908.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Pb displaying image

Posted by Jim Kiley <jh...@summa-tech.com>.
Make sure the image is visible to your webserver, and then use an
http://url to access it, rather than a file:// url.
jk

On Mon, Jul 20, 2009 at 11:08 AM, tutu <tu...@gmail.com> wrote:

>
> Hi,
>
> I have a pb while trying to display an image that is not in my application
> but on the file system!!
>
> I've tried to put this in my jsp:
>
> file:///<%=request.getAttribute( /1.png"></img>
>
> and that too:
> <html:image
> src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
> <html:img src="file:///<%=request.getAttribute("imageLocation")%>/1.png"/>
>
> (imageLocation reference D:/images)
>
> but nothing is displayed. Does anybody knows how to display an image that
> is
> not in the web application?
>
> thanks,
>
> tugdual
> --
> View this message in context:
> http://www.nabble.com/Pb-displaying-image-tp24571593p24571593.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com