Re: Why does servlet need to be in a subdir of WEB-INF/classes?
Tomcat 3.2 will load servlets from the classpath. I believe that tomcat 3.3 will not do this out of the box, but you will be able to change the startup scripts to enable it. "Lu, Spencer" wrote: > > Hi, > > I've noticed that a servlet class invoked by Tomcat must reside in a > subdirectory of /WEB-INF/classes. Ideally I would like to be able > to place my servlet class in a directory that is not under WEB-INF/classes. > Is there any way to do this without changing the Tomcat source and > recompiling it? If not, does anyone know why the developers coded Tomcat > this way, instead of just loading the servlet from a directory in the > classpath? Just curious. Thanks. > > Spencer
Re: Why does servlet need to be in a subdir of WEB-INF/classes?
On Tue, 17 Apr 2001, Lu, Spencer wrote: > Hi, > > I've noticed that a servlet class invoked by Tomcat must reside in a > subdirectory of /WEB-INF/classes. Ideally I would like to > be able to place my servlet class in a directory that is not under > WEB-INF/classes. Is there any way to do this without changing the > Tomcat source and recompiling it? If not, does anyone know why the > developers coded Tomcat this way, instead of just loading the > servlet from a directory in the classpath? Just curious. Thanks. Because that's what the spec says they're supposed to do? Seriously, if you say more about what you're trying to do and why, maybe people can give you some better explanations and suggestions. The WEB-INF/classes et al stuff (in the 2.2 spec) is a change from the previous, and is generally an improvement. It allows for bundling web applications in one spot. There's also a way to place things in a "root" context, things that aren't in a particular web application, but I believe that still involves putting the servlet class in a WEB-INF/classes directory. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
Re: Why does servlet need to be in a subdir of WEB-INF/classes?
See the Servlet Spec. and you will see why. Pae >Hi, > >I've noticed that a servlet class invoked by Tomcat must reside in a >subdirectory of /WEB-INF/classes. Ideally I would like to be able >to place my servlet class in a directory that is not under WEB-INF/classes. >Is there any way to do this without changing the Tomcat source and >recompiling it? If not, does anyone know why the developers coded Tomcat >this way, instead of just loading the servlet from a directory in the >classpath? Just curious. Thanks. > >Spencer >
Why does servlet need to be in a subdir of WEB-INF/classes?
Hi, I've noticed that a servlet class invoked by Tomcat must reside in a subdirectory of /WEB-INF/classes. Ideally I would like to be able to place my servlet class in a directory that is not under WEB-INF/classes. Is there any way to do this without changing the Tomcat source and recompiling it? If not, does anyone know why the developers coded Tomcat this way, instead of just loading the servlet from a directory in the classpath? Just curious. Thanks. Spencer