You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by D Bamud <no...@cad.delhi.nic.in> on 2002/08/24 10:41:22 UTC

Static pages dir inside webapps

I *need* to put a directory (say "static") inside webapps that contains
static html pages. When I try to invoke
http://localhost:8080/static/test.html  I get 404 error. HOWEVER the moment
I make *the* dir WEB-INF in static dir it starts working. It was working
fine in TC3.x without WEB-INF dir but gives the problem in TC4.0.4. Does
that mean that all the apps must adhere to have WEB-INF dir? Why?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Static pages dir inside webapps

Posted by Jacob Kjome <ho...@visi.com>.
Read the Tomcat docs and the servlet spec...or, just ignore them and take 
if for granted that Tomcat only generates a context entry when there is a 
WEB-INF dir inside your webapp.  Any way you look at it, you *have* to have 
a WEB-INF directory in your webapp in order for it to be seen as a 
context.  Tomcat-3.3 may not have enforced the rule, but I can almost 
guarantee that it is not portable to other servers implementing the 
servlet-2.2+ spec and, as you have already experienced, it isn't even 
portable to the next generation of Tomcat itself.

Jake

At 02:11 PM 8/24/2002 +0530, you wrote:
>I *need* to put a directory (say "static") inside webapps that contains
>static html pages. When I try to invoke
>http://localhost:8080/static/test.html  I get 404 error. HOWEVER the moment
>I make *the* dir WEB-INF in static dir it starts working. It was working
>fine in TC3.x without WEB-INF dir but gives the problem in TC4.0.4. Does
>that mean that all the apps must adhere to have WEB-INF dir? Why?
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

Re: Static pages dir inside webapps

Posted by Jeff Forbeck <je...@yahoo.com>.
D - 


I am a newbie, but may be able to help. The
$CATALINA_HOME\webapps\[your app] is the directory I
store static pages. This is the area for public files
where WEB-INF stores protected documents. Adding a
special subdir called [your app]\static\ worked for
me. Of course, I forgot to restart Tomcat the first
time (dah), but I eventually gathered my senses.

As far as what previous allowed, I can't help you. I
started with 2.3 and there is a strict directory
specification. 

Anyhow, I didn't see another repsonse - hope this
helps.

Jeff
--- D Bamud <no...@cad.delhi.nic.in> wrote:
> I *need* to put a directory (say "static") inside
> webapps that contains
> static html pages. When I try to invoke
> http://localhost:8080/static/test.html  I get 404
> error. HOWEVER the moment
> I make *the* dir WEB-INF in static dir it starts
> working. It was working
> fine in TC3.x without WEB-INF dir but gives the
> problem in TC4.0.4. Does
> that mean that all the apps must adhere to have
> WEB-INF dir? Why?
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>