tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Rowles" <>
Subject RE: NewB/Default Servlet:Can't find .gif
Date Mon, 18 Feb 2002 15:55:00 GMT
> Hello List...

Hallo Newbie ;-)

> NEWBIE:  I want to generate the welcome page for my domain so 
> I mapped a test servlet to "/" in the web.xml for my context.
> PROBLEM:  A test.gif image is not rendered by the servlet - 
> as it appears the path is not found.

Are you trying to return html including an image link (such as <img src="test.gif">)
or trying to stream an image via the servlet?  

If the latter, then jsp is the wrong tool - it is text only.  If not, read on:

*** Can you send us the location and output of your jsp page and the location of your gif
please? ***

It sounds like a simple problem.

> OBSERVED:  If I map the servlet instead to "/intro" then the 
> test.gif is rendered ok.
> TRIED:  Using various path combinations"/test.gif", 
> "test.gif" etc - no result.
> NOTE:  I've read some postings advising locating files should 
> be done as in InputStream [getResourceAsStream()].  Is it 
> applicable in this case when all I want is a simple 
> 	out.println( "<img src=\"/test.gif ... etc )?

Oh, then you are trying to do it right!  Good.

You're only jealous cos the little penguins are talking to me. 

For more information on Ordnance Survey products and services,
visit our web site at

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message