Title: Trouble with file paths in servlets
I beleive that anything in a servlet zone will be treated as a servlet.  I don't think that you can serve static HTML (including images) from a servlet directory (at least not without using mod_rewrite).
 
What I do is put image files in the htdocs/images directory instead and reference them like <img src="/images/myGif.gif">
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dwight Spencer
Sent: Tuesday, June 13, 2000 12:05 PM
To: '[EMAIL PROTECTED]'
Subject: Trouble with file paths in servlets

I am running Apache 1.3.12 with JServ 1.1.1 on Unixware 2.1.2 with
SCO Java 1.1.3u.

I have been trying to run a servlet that simply generates a page with
a background image. For example, the fragment of HTML generated
by my servlet would be:

   ... <body background=myGif.gif> ...

The image file resides in the same directory as the servlet that generates
this HTML. However, the path requested by the resulting GET access to the
Apache server  is basically :

     GET /<zone of zervlet>/<name of servlet>/myGif.gif

But I always get a 404 back (file not found). How can I get the correct path
to finally be placed in the GET using JServ?  Is it solvable via a JServ
configuration change or via Java servlet re-programming or both?

- Dwight Spencer
   [EMAIL PROTECTED]
   Senior Software Engineer
   Interactive Northwest, Inc.
   Tualatin, Oregon

Reply via email to