RE: Tomcat Servlet Directory
With JServ, we are able to have multiple servlet directories mapped to Unix home directories( i.e.. /home/user1/servlets, /home/user2/servlets, . . . ). This is very convenient for development. That is why I want to change the servlets directory. -Matt -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 9:37 AM To: '[EMAIL PROTECTED]' Subject: RE: Tomcat Servlet Directory The answer would be that is isn't configurable. The Servlet 2.2 spec introduced the concept of a web application, which is an archive with a predefined internal structure that includes the "WEB-INF" directories. This web application archive is supposed to be universally deployable. It is up to the servlet container how it chooses to deploy the web application. It so happens that Tomcat deploys to a directory structure that matches the jar, but servlet containers are not required to do so. The only requirement is that the classes contained in the archive's "WEB-INF/classes" and "WEB-INF/lib" be made available only to that web application. The spec doesn't require that these location(s) be made configurable. Tomcat doesn't currently support this, and isn't likely to support it. Is there some reason you don't want to put your servlets in the WEB-INF/classes, or in jars in the WEB-INF/lib? Larry > -Original Message- > From: Hoggatt Matt - mahogg [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 10:14 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Tomcat Servlet Directory > > > Are you saying that there is no way to change the preset > servlet directory? > > -Original Message- > From: Larry Isaacs [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 9:06 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Tomcat Servlet Directory > > > Handling for WEB-INF/classes and WEB-INF/lib is mandated by > the Servlet 2.2 and later specifications. If you want your > servlets, or other classes, to be accessible *only* to that > web application, then these are the only places available that > do this. > > However, you may place servlets on your CLASSPATH. These > servlets will be available in all web applications. Thus, > you may put "C:\public_html\myServlets" on your CLASSPATH > and put servlets there. > > The important thing to note about doing this is that > the "CLASSPATH" servlets will be loaded by the "application" > classloader. The means that these servlet will *NOT* be > able to use any classes from any web application's > WEB-INF/classes or WEB-INF/lib directories. This may affect > the suitability of putting servlets on the CLASSPATH. > > Hope this helps. > Larry > > > > -Original Message- > > From: Hoggatt Matt - mahogg [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 20, 2001 9:34 AM > > To: '[EMAIL PROTECTED]' > > Subject: Tomcat Servlet Directory > > > > > > After I installed Tomcat 3.2.3, my servlet directory is C:\Program > > Files\Apache > > Group\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes. > > Now I want to change it to, or add the directory > > C:\public_html\myServlets. > > > > I've tried and tried and I cannot figure this out. How is > this done? > > > > -Matt > > >
RE: Tomcat Servlet Directory
The answer would be that is isn't configurable. The Servlet 2.2 spec introduced the concept of a web application, which is an archive with a predefined internal structure that includes the "WEB-INF" directories. This web application archive is supposed to be universally deployable. It is up to the servlet container how it chooses to deploy the web application. It so happens that Tomcat deploys to a directory structure that matches the jar, but servlet containers are not required to do so. The only requirement is that the classes contained in the archive's "WEB-INF/classes" and "WEB-INF/lib" be made available only to that web application. The spec doesn't require that these location(s) be made configurable. Tomcat doesn't currently support this, and isn't likely to support it. Is there some reason you don't want to put your servlets in the WEB-INF/classes, or in jars in the WEB-INF/lib? Larry > -Original Message- > From: Hoggatt Matt - mahogg [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 10:14 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Tomcat Servlet Directory > > > Are you saying that there is no way to change the preset > servlet directory? > > -Original Message- > From: Larry Isaacs [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 9:06 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Tomcat Servlet Directory > > > Handling for WEB-INF/classes and WEB-INF/lib is mandated by > the Servlet 2.2 and later specifications. If you want your > servlets, or other classes, to be accessible *only* to that > web application, then these are the only places available that > do this. > > However, you may place servlets on your CLASSPATH. These > servlets will be available in all web applications. Thus, > you may put "C:\public_html\myServlets" on your CLASSPATH > and put servlets there. > > The important thing to note about doing this is that > the "CLASSPATH" servlets will be loaded by the "application" > classloader. The means that these servlet will *NOT* be > able to use any classes from any web application's > WEB-INF/classes or WEB-INF/lib directories. This may affect > the suitability of putting servlets on the CLASSPATH. > > Hope this helps. > Larry > > > > -Original Message- > > From: Hoggatt Matt - mahogg [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 20, 2001 9:34 AM > > To: '[EMAIL PROTECTED]' > > Subject: Tomcat Servlet Directory > > > > > > After I installed Tomcat 3.2.3, my servlet directory is C:\Program > > Files\Apache > > Group\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes. > > Now I want to change it to, or add the directory > > C:\public_html\myServlets. > > > > I've tried and tried and I cannot figure this out. How is > this done? > > > > -Matt > > >
RE: Tomcat Servlet Directory
Are you saying that there is no way to change the preset servlet directory? -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 9:06 AM To: '[EMAIL PROTECTED]' Subject: RE: Tomcat Servlet Directory Handling for WEB-INF/classes and WEB-INF/lib is mandated by the Servlet 2.2 and later specifications. If you want your servlets, or other classes, to be accessible *only* to that web application, then these are the only places available that do this. However, you may place servlets on your CLASSPATH. These servlets will be available in all web applications. Thus, you may put "C:\public_html\myServlets" on your CLASSPATH and put servlets there. The important thing to note about doing this is that the "CLASSPATH" servlets will be loaded by the "application" classloader. The means that these servlet will *NOT* be able to use any classes from any web application's WEB-INF/classes or WEB-INF/lib directories. This may affect the suitability of putting servlets on the CLASSPATH. Hope this helps. Larry > -Original Message- > From: Hoggatt Matt - mahogg [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 9:34 AM > To: '[EMAIL PROTECTED]' > Subject: Tomcat Servlet Directory > > > After I installed Tomcat 3.2.3, my servlet directory is C:\Program > Files\Apache > Group\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes. > Now I want to change it to, or add the directory > C:\public_html\myServlets. > > I've tried and tried and I cannot figure this out. How is this done? > > -Matt >
RE: Tomcat Servlet Directory
Handling for WEB-INF/classes and WEB-INF/lib is mandated by the Servlet 2.2 and later specifications. If you want your servlets, or other classes, to be accessible *only* to that web application, then these are the only places available that do this. However, you may place servlets on your CLASSPATH. These servlets will be available in all web applications. Thus, you may put "C:\public_html\myServlets" on your CLASSPATH and put servlets there. The important thing to note about doing this is that the "CLASSPATH" servlets will be loaded by the "application" classloader. The means that these servlet will *NOT* be able to use any classes from any web application's WEB-INF/classes or WEB-INF/lib directories. This may affect the suitability of putting servlets on the CLASSPATH. Hope this helps. Larry > -Original Message- > From: Hoggatt Matt - mahogg [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 20, 2001 9:34 AM > To: '[EMAIL PROTECTED]' > Subject: Tomcat Servlet Directory > > > After I installed Tomcat 3.2.3, my servlet directory is C:\Program > Files\Apache > Group\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes. > Now I want to change it to, or add the directory > C:\public_html\myServlets. > > I've tried and tried and I cannot figure this out. How is this done? > > -Matt >
Tomcat Servlet Directory
After I installed Tomcat 3.2.3, my servlet directory is C:\Program Files\Apache Group\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes. Now I want to change it to, or add the directory C:\public_html\myServlets. I've tried and tried and I cannot figure this out. How is this done? -Matt