Christian Mack wrote:
>Andy Jefferson wrote:
>>
>> Simple one. How to access a particular image file via a servlet ...
>>
>> For example I have a servlet in
>>
>> /home/httpd/servlets/uk/co/demon/ajsoft/Invoice/
>>
>> and images in
>>
>> /home/httpd/servlets/uk/co/demon/ajsoft/Invoice/images/
>Your image file has to live in the webserver directory, not in the servlet
>directory.
>
>So use somthing like:
>/usr/local/apache/htdocs/ajsoft/images/delete.gif
>To store the gif, and use:
><IMG SRC="/ajsoft/images/delete.gif">
>to give it back to the client.
Thanks. I was aware that I could put images in there, *but* a servlet should be
able to be packaged on its own, and to pick images up from its own space. A
mechanism *should* be available for doing this - either via Apache, or via
Jserv. For example, if I had my servlet within a 'jar', I wouldn't want to have
to copy the images into the web document root area.
TIA
--
Andy
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]