free servlet directory gateway w/ tomcat installation instructions
I am an independent software developer and consultant. Last fall I released a free and open source software product that I think some may be interested in. You can find out all about it at: http://www.mentata.com/ldaphttp/ My central offering is a framework for building efficient MVC web applications using web servers, directory servers, and Java servlets. I deliver with it a directory gateway application that enables users to retrieve, create, delete, extend, update, and link entries in directory databases through web interfaces. It was developed in a contractual engagement and is currently being used in a high-vis production capacity within an mid-size enterprise. I intend to add some key capabilities in the coming year, and will launch subscription web services of my own design sometime afterwards. I have now reconfigured the delivered software to be installed with a .war file, and have included specific notes for Tomcat installation. You can find this (and some commentary which *may* be of interest to you) at: http://www.mentata.com/news/28Feb03.htm I request your feedback on these installation instructions. In particular, I want to make sure there is not a community or technical reason for aversion to putting packaged software in the [CATALINA_HOME]/shared/lib directory. Most of my previous servlet engine experience has been with the Netscape/iPlanet/Sun ONE family of web servers. However, in the interest of open source I have migrated my development environment to Apache/Tomcat to complement Linux and OpenLDAP. FWIW, I so far find Tomcat to be superior in capability and support to the Sun offering, but with some shortcomings in stability and complexity both with the application itself and with the (still evolving) space of connectors. I am committed to the approach overall, and will provide feedback and support when possible. Thank you for any interest and feedback, and please keep up the great work. Jon Roberts [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: free servlet directory gateway w/ tomcat installation instructions
Why do you recommend putting the two required jar files ( ldaphttp.jar and ldapjdk.jar ) in CATALINA_HOME/shared/lib? Why not just add a WEB-INF/lib directory to your .war archive and put the jars in there. It makes for much simpler deployment and fewer instructions. Also, why not have a default working example already set up and ready to go? As it stands, the .war file you have isn't deployable without some additional work. Why not just set it up so that it works by simply dropping it in CATALNIA_HOME/webapps and something can actually be viewed by default? It would make it more clear how things are supposed to work. Just my $0.02 Jake At 10:37 AM 3/1/2003 -0600, you wrote: I am an independent software developer and consultant. Last fall I released a free and open source software product that I think some may be interested in. You can find out all about it at: http://www.mentata.com/ldaphttp/ My central offering is a framework for building efficient MVC web applications using web servers, directory servers, and Java servlets. I deliver with it a directory gateway application that enables users to retrieve, create, delete, extend, update, and link entries in directory databases through web interfaces. It was developed in a contractual engagement and is currently being used in a high-vis production capacity within an mid-size enterprise. I intend to add some key capabilities in the coming year, and will launch subscription web services of my own design sometime afterwards. I have now reconfigured the delivered software to be installed with a .war file, and have included specific notes for Tomcat installation. You can find this (and some commentary which *may* be of interest to you) at: http://www.mentata.com/news/28Feb03.htm I request your feedback on these installation instructions. In particular, I want to make sure there is not a community or technical reason for aversion to putting packaged software in the [CATALINA_HOME]/shared/lib directory. Most of my previous servlet engine experience has been with the Netscape/iPlanet/Sun ONE family of web servers. However, in the interest of open source I have migrated my development environment to Apache/Tomcat to complement Linux and OpenLDAP. FWIW, I so far find Tomcat to be superior in capability and support to the Sun offering, but with some shortcomings in stability and complexity both with the application itself and with the (still evolving) space of connectors. I am committed to the approach overall, and will provide feedback and support when possible. Thank you for any interest and feedback, and please keep up the great work. Jon Roberts [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: free servlet directory gateway w/ tomcat installation instructions
Jacob Kjome wrote: Why do you recommend putting the two required jar files ( ldaphttp.jar and ldapjdk.jar ) in CATALINA_HOME/shared/lib? Why not just add a WEB-INF/lib directory to your .war archive and put the jars in there. It makes for much simpler deployment and fewer instructions. I want to make it easy to deploy multiple .war files of servlets (read: applications) that all use these libraries. Also, if you put them in the .war, you can't put the examples in CATALINA_HOME/shared/lib because they would extend classes that would then be hidden in the .war. Then you'd have to extract and modify files inside the .war to get it to work or make modifications to your local definitions. Also, why not have a default working example already set up and ready to go? As it stands, the .war file you have isn't deployable without some additional work. Why not just set it up so that it works by simply dropping it in CATALNIA_HOME/webapps and something can actually be viewed by default? It would make it more clear how things are supposed to work. The problem is that any example would require the knowledge of the associated directory server. Directory servers have few limitations on how they are configured, so no set of defaults would cover everybody and I don't want to provide an example that only works out of the box for a percentage of people. I could assume internet connectivity and use a public internet server, but I don't currently administer one myself and would consider it inappropriate to reference somebody else's. This isn't ideal, and that's why I absolutely want to hear what's impalatable. However, I am kind of interested in creating something that nudges people to set up and use the javac and jar commands. It promotes awareness and administrative self-sufficiency for Java in general. Just my $0.02 And thanks for it. It's worth more than that to me, but I don't support micropayments so you'll have to content yourself with my gratitude :) Jon Roberts www.mentata.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
setting the default servlet directory
How do I change the ${catalina_home}/webapps to something like /usr/web/servlets Thanks Charles (Allen) Jordan [EMAIL PROTECTED] System Administrator(407)771-8919 Convergys 285 International Parkway, Lake Mary, FL 32746-5007 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting the default servlet directory
check out server.xml, there you can setup your contexts using the Context element or take a look at admin.xml in the webapp directory Filip -Original Message- From: Charles A Jordan [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 11:36 AM To: [EMAIL PROTECTED] Subject: setting the default servlet directory How do I change the ${catalina_home}/webapps to something like /usr/web/servlets Thanks Charles (Allen) Jordan [EMAIL PROTECTED] System Administrator(407)771-8919 Convergys 285 International Parkway, Lake Mary, FL 32746-5007 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting the default servlet directory
map to the new folder in conf\servlet.xml. Context path=/test docBase=yourfolder debug=1 reloadable=true / Charles A Jordan [EMAIL PROTECTED] wrote:How do I change the ${catalina_home}/webapps to something like /usr/web/servlets Thanks Charles (Allen) Jordan System Administrator (407)771-8919 Convergys 285 International Parkway, Lake Mary, FL 32746-5007 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, and more
Re: Servlet directory?
It's under this directory, /WEB-INF/lib or /WEB-INF/classes of any webapp that you have. Then define the servlet for the web app in web.xml . There are quite a few good examples on this that ship with many jakarta projects. So download a few and take a peek at it. Jørgen Ramskov wrote: Hi I'm trying to some software called ArcIMS. It asks for the webservers servlet directory and in the readme it gives some examples: === Cut === Installing ArcIMS Servlet Connector The ArcIMS Servlet Connector directory, \com, must be copied to your Web server's servlet directory in order to establish communication between your Web server and the ArcIMS Application Server. The following is a list of common Web servers and their servlet directories. Apache 1.3.20 and Jakarta Tomcat 3.2 drive:\TOMCAT_HOME\webapps\ROOT\WEB-INF\classes === Cut === I'm however using Tomcat 4.1.12, where is the directory then? Thanks. -- Joergen -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Servlet directory?
Hi I'm trying to some software called ArcIMS. It asks for the webservers servlet directory and in the readme it gives some examples: === Cut === Installing ArcIMS Servlet Connector The ArcIMS Servlet Connector directory, \com, must be copied to your Web server's servlet directory in order to establish communication between your Web server and the ArcIMS Application Server. The following is a list of common Web servers and their servlet directories. Apache 1.3.20 and Jakarta Tomcat 3.2 drive:\TOMCAT_HOME\webapps\ROOT\WEB-INF\classes === Cut === I'm however using Tomcat 4.1.12, where is the directory then? Thanks. -- Joergen -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Servlet directory?
Me again, Forgot to mention that in TC4.1.12 and above, the invoker servlet is off by default. You will have to map it to a different url in the web.xml. Something other than servlet. Then change the diagnostics urls to match. From Tim Moore, You have two choices for how to fix this problem. 1. You could go into tomcat/conf/web.xml and re-enable the servlet-mapping for the invoker (it's just commented out). This is the fast way. 2. You could create a URL mapping in your webapp's web.xml file for and then use that URL to access it. This is the better way. The invoker servlet can be dangerous, and it's now recommended that you leave it disabled. You'll need to map your servlet to a URL. So that being said, I think you should do something like, For example, add this to your web.xml in the TOMCAT_HOME/webapps/arcimsServletConnector/WEB-INF/ servlet-mapping servlet-namecom.esri.esrimap.Esrimap/servlet-name url-pattern/com.esri.esrimap.Esrimap/url-pattern /servlet-mapping And then go to http://your_server/arcimsServletConnector/com.esri.esrimap.Esrimap?CMD=connectorping http://your_server/arcimsServletConnector/com.esri.esrimap.Esrimap?CMD=appserverping I haven't tested the correct way, I just uncommented the system web.xml file. I only do local host stuff on my desktop for developing. HTH rls Robert L Sowders [EMAIL PROTECTED] 10/18/2002 02:23 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Servlet directory? Ahhh, another ArcIMS headache in the making. I've found that it's easier to just lie to the installer and then delete whatever it installs for the connector. Then go to the ArcIMS\connectors\servlet directory and copy the arcimsServletConnector.war file to the TOMCAT_HOME/webapps directory and let Tomcat autodeply the connector for you. You can do the same for the ArcIMS Administrator, they also supply the administrator in a war file for you. It's called esriadmin.war. Just put it in the TOMCAT_HOME/webapps directory. You will have to make the jkmount statements or the mod_jk2 uri statements. One called arcimsServletConnector and another for esriadmin Only problem is the ESRI supplied diagnostic routine will not function. It has hard coded paths and was made with the assumption that you have loaded everything to the ROOT of Tomcat. You can still do the diagnostics, you just have to use your browser and call the function directly. The following assumes you are installing your web server to localhost, change it to suit your installation. http://localhost/arcimsServletConnector/servlet/com.esri.esrimap.Esrimap?CMD=connectorping http://localhost/arcimsServletConnector/servlet/com.esri.esrimap.Esrimap?CMD=appserverping Following the above procedure is more in line with the spec and lets you use your Tomcat installation for more than just ArcIMS. Here is a How To for a window 2000 installation for apache, tomcat, mod_jk2, arcims4, jsdk1.4.1. At the end of the ArcIMS section is a section called new that outlines the above steps. The main guide try's to follow as close as possible ESRI's instructions. ftp://pokey.wr.usgs.gov/pub/rsowders/ArcIMS4_Apache2_JK2_TC4.1.x_JDK1.4.x.zip The ArcIMS section at least is generic to your platform just change the paths you select, keep in mind that if you put the output and website directories in the DocumentRoot of the webserver then you don't have to do any aliases for them. rls Jørgen Ramskov [EMAIL PROTECTED] 10/18/2002 12:41 AM Please respond to Tomcat Users List To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:Servlet directory? Hi I'm trying to some software called ArcIMS. It asks for the webservers servlet directory and in the readme it gives some examples: === Cut === Installing ArcIMS Servlet Connector The ArcIMS Servlet Connector directory, \com, must be copied to your Web server's servlet directory in order to establish communication between your Web server and the ArcIMS Application Server. The following is a list of common Web servers and their servlet directories. Apache 1.3.20 and Jakarta Tomcat 3.2 drive:\TOMCAT_HOME\webapps\ROOT\WEB-INF\classes === Cut === I'm however using Tomcat 4.1.12, where is the directory then? Thanks. -- Joergen -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Servlet directory?
Ahhh, another ArcIMS headache in the making. I've found that it's easier to just lie to the installer and then delete whatever it installs for the connector. Then go to the ArcIMS\connectors\servlet directory and copy the arcimsServletConnector.war file to the TOMCAT_HOME/webapps directory and let Tomcat autodeply the connector for you. You can do the same for the ArcIMS Administrator, they also supply the administrator in a war file for you. It's called esriadmin.war. Just put it in the TOMCAT_HOME/webapps directory. You will have to make the jkmount statements or the mod_jk2 uri statements. One called arcimsServletConnector and another for esriadmin Only problem is the ESRI supplied diagnostic routine will not function. It has hard coded paths and was made with the assumption that you have loaded everything to the ROOT of Tomcat. You can still do the diagnostics, you just have to use your browser and call the function directly. The following assumes you are installing your web server to localhost, change it to suit your installation. http://localhost/arcimsServletConnector/servlet/com.esri.esrimap.Esrimap?CMD=connectorping http://localhost/arcimsServletConnector/servlet/com.esri.esrimap.Esrimap?CMD=appserverping Following the above procedure is more in line with the spec and lets you use your Tomcat installation for more than just ArcIMS. Here is a How To for a window 2000 installation for apache, tomcat, mod_jk2, arcims4, jsdk1.4.1. At the end of the ArcIMS section is a section called new that outlines the above steps. The main guide try's to follow as close as possible ESRI's instructions. ftp://pokey.wr.usgs.gov/pub/rsowders/ArcIMS4_Apache2_JK2_TC4.1.x_JDK1.4.x.zip The ArcIMS section at least is generic to your platform just change the paths you select, keep in mind that if you put the output and website directories in the DocumentRoot of the webserver then you don't have to do any aliases for them. rls Jørgen Ramskov [EMAIL PROTECTED] 10/18/2002 12:41 AM Please respond to Tomcat Users List To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:Servlet directory? Hi I'm trying to some software called ArcIMS. It asks for the webservers servlet directory and in the readme it gives some examples: === Cut === Installing ArcIMS Servlet Connector The ArcIMS Servlet Connector directory, \com, must be copied to your Web server's servlet directory in order to establish communication between your Web server and the ArcIMS Application Server. The following is a list of common Web servers and their servlet directories. Apache 1.3.20 and Jakarta Tomcat 3.2 drive:\TOMCAT_HOME\webapps\ROOT\WEB-INF\classes === Cut === I'm however using Tomcat 4.1.12, where is the directory then? Thanks. -- Joergen -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Servlet directory
I have put some servlet classes in my web applications classes directory, however when I try to access it via the url http://localhost:8080/myapp/servlet/myservlet it does not work. It seems to only work when I put the classes in the default ROOT web app and access it via http://localhost:8080/servlet/myservlet. Is there a way of configuring tomcat to make it work from the first url???
Re: Servlet directory
And you've provided appropriate servelet and servlet-mapping entries in your web.xml? -Michael - Original Message - From: Daliso Zuze [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, August 03, 2002 4:51 AM Subject: Servlet directory I have put some servlet classes in my web applications classes directory, however when I try to access it via the url http://localhost:8080/myapp/servlet/myservlet it does not work. It seems to only work when I put the classes in the default ROOT web app and access it via http://localhost:8080/servlet/myservlet. Is there a way of configuring tomcat to make it work from the first url??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlet directory
Yes Micheal, I have added those entries When I try to use the servlet mapping name it gives me a CLASS NOT FOUND exception. - Original Message - From: Michael E. Locasto [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, August 03, 2002 2:44 PM Subject: Re: Servlet directory And you've provided appropriate servelet and servlet-mapping entries in your web.xml? -Michael - Original Message - From: Daliso Zuze [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, August 03, 2002 4:51 AM Subject: Servlet directory I have put some servlet classes in my web applications classes directory, however when I try to access it via the url http://localhost:8080/myapp/servlet/myservlet it does not work. It seems to only work when I put the classes in the default ROOT web app and access it via http://localhost:8080/servlet/myservlet. Is there a way of configuring tomcat to make it work from the first url??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlet directory
The way you are trying to access this servlet implies a couple of assumptions: 1. Your servlet is in the default package. That is to say that it exist in WEB-INF/classes and not some directory deeper inside of that. 2. Your class is all lower case myservlet since that is how it is written on the URL your provided below. I think it is probably likely that #1 is true. However, I'm guessing that #2 is not. The general practice for naming classes is to use Capital letters for each distinct part of the class name. For instance, you probably named your class MyServlet, not myservlet. As such, the URL you provided won't work. It should be: http://localhost:8080/myapp/servlet/MyServlet Note that servlet and servlet-mapping entries in your own web.xml have nothing in particular to do with accessing your class through Tomcat's default servlet invoker which is mapped to /[your context]/servlet/*. The other thing you should look at is that the directory that your app is running out of exists in: $TOMCAT_HOME/webapps/myapp make sure that myapp is in all lower case. Oh, and make sure that there are no spaces in $TOMCAT_HOME. If you have it installed in a directory like Program Files, you can do the following (on Windows). I'll use my setup as an example. $CATALINA_HOME=C:\Progra~1\Apache~1\Jakarta\tomcat-4.1.8 The original path is: C:\Program Files\Apache Group\Jakarta\tomcat-4.1.8 Just use the tilde's to fix directory names which have spaces. The names with tilde's can be no more than 8 chars long. Restart Tomcat after using the hints above and things should work just fine. Jake At 10:51 AM 8/3/2002 +0200, you wrote: I have put some servlet classes in my web applications classes directory, however when I try to access it via the url http://localhost:8080/myapp/servlet/myservlet it does not work. It seems to only work when I put the classes in the default ROOT web app and access it via http://localhost:8080/servlet/myservlet. Is there a way of configuring tomcat to make it work from the first url???
Re: Servlet directory
Thanks, I got it working now, I had misplaced the classes directory. Daliso - Original Message - From: Jacob Kjome [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, August 03, 2002 7:18 PM Subject: Re: Servlet directory The way you are trying to access this servlet implies a couple of assumptions: 1. Your servlet is in the default package. That is to say that it exist in WEB-INF/classes and not some directory deeper inside of that. 2. Your class is all lower case myservlet since that is how it is written on the URL your provided below. I think it is probably likely that #1 is true. However, I'm guessing that #2 is not. The general practice for naming classes is to use Capital letters for each distinct part of the class name. For instance, you probably named your class MyServlet, not myservlet. As such, the URL you provided won't work. It should be: http://localhost:8080/myapp/servlet/MyServlet Note that servlet and servlet-mapping entries in your own web.xml have nothing in particular to do with accessing your class through Tomcat's default servlet invoker which is mapped to /[your context]/servlet/*. The other thing you should look at is that the directory that your app is running out of exists in: $TOMCAT_HOME/webapps/myapp make sure that myapp is in all lower case. Oh, and make sure that there are no spaces in $TOMCAT_HOME. If you have it installed in a directory like Program Files, you can do the following (on Windows). I'll use my setup as an example. $CATALINA_HOME=C:\Progra~1\Apache~1\Jakarta\tomcat-4.1.8 The original path is: C:\Program Files\Apache Group\Jakarta\tomcat-4.1.8 Just use the tilde's to fix directory names which have spaces. The names with tilde's can be no more than 8 chars long. Restart Tomcat after using the hints above and things should work just fine. Jake At 10:51 AM 8/3/2002 +0200, you wrote: I have put some servlet classes in my web applications classes directory, however when I try to access it via the url http://localhost:8080/myapp/servlet/myservlet it does not work. It seems to only work when I put the classes in the default ROOT web app and access it via http://localhost:8080/servlet/myservlet. Is there a way of configuring tomcat to make it work from the first url??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Default servlet / directory listings: different settings per context
Hello, I'm well aware how to globally enable or disable directory listings within Tomcat (by modifying the listings parameter of the default servlet). However, I don't know how to set this up correctly context-by-context. Here's what I've tried: - copying the servlet and servlet-mapping elements as-is from the global web.xml to the web.xml of a particular context. This doesn't work, as the context is not initialised due to the duplicate servlet definition. - copying the servlet and servlet-mapping elements from the global web.xml to the web.xml of a particular context, but changing the name in both elements to default2. The context starts, but the servlet is never invoked (the default global servlet seems to intercept and process the request, because the request is handled as expected from the global web.xml, but not according to the params of the context's web.xml). I don't want to remove the global definition of the default servlet, because that becomes somewhat tedious if I've got to copy it to each context I deploy. This is also unsuitable when I wish to deploy a WAR file, as I have to unpack it and modify it's web.xml. Furthermore, I can't leave the default servlet's definition in any redistributable webapp that I create, because it's not guaranteed that the implementing class (org.apache.catalina.servlets.DefaultServlet) will be available on other servlet version, or if the class is the same version. How can I achieve the desired configuration? Thanks in advance, -Chris B. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Changing servlet directory
Hi, for some reasons i would like to place my servlets and java classes in a separate directory instead of WEB-INF/classes or WEB-INF/lib. I tried to add the classpath of my classes in the catalina.bat script as suggested by some ppl here. However, tomcat throws the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet Did adding extra classpath to catalina.bat affect the loading of tomcat's classes? Thansk in advance. Firestar __ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com
Re: Changing servlet directory
Hi, remove your classes from the classpath. follow these steps.: in web.xml add details about your web-app. in tomcat 3.2 it was known as context mapping. just add your context under context manager and set the docBase attribute to the dir where your web-app is installed. Manu Hi, for some reasons i would like to place my servlets and java classes in a separate directory instead of WEB-INF/classes or WEB-INF/lib. I tried to add the classpath of my classes in the catalina.bat script as suggested by some ppl here. However, tomcat throws the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet Did adding extra classpath to catalina.bat affect the loading of tomcat's classes? Thansk in advance. Firestar __ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
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
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
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
IIS with Tomcat: Change default servlet directory
Hi All, I've installed Tomcat on Winnt4 with IIS4 and I've followed the instructions in Tomcat IIS HowTo to let IIS cooperate with Tomcat. It works if I set the home directory of my Web site in IIS to d:\tomcat (for my case, TOMCAT_HOME = d:\tomcat). I can run the servlet examples included in Tomcat successfully. Now I decide to change the home directory of my Web site in IIS to another directory (for my case, new home directory = d:\myWeb) and also put my servlet classes into another directory e:\myServlet. However, I don't know how to set config files to let my servlet classes be executed. Would anyone help me with an example for my case? Thanks in advance!! Albert __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
RE: class path to the servlet Directory
In fact, you need a jar package for your application to work. In this case, you can put your jar package in the %TOMCAT_HOME%/lib directory. Tomcat will load it at startup. Loïc Lefèvre -Message d'origine- De : anupama [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 2 août 2001 12:54 À : [EMAIL PROTECTED] Objet : class path to the servlet Directory Hi, how do I set the classpath to the directory where I have my servlets.This has to be the directory other than the default webapps directory thanks Aditya
Servlet Directory
Hi, I've just installed tomcat 3.2.1 and its working fine except that I am using the default webapps/examples directory to store my servlets which is a pain as I physically have to copy them over etc and I would like to keep them on a seperate folder somewhere else on my machine. I have been trying to achieve this by adding a contex-path to the server.xml file with no luck. Currently my servlets are in H:\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes and I would like to store them in H:\Work\MyServlets\bin I cannot work out how to change this directory this is as far as I have got:- Context path="/myservlets" docBase="../../Work/MyServlets/bin" crossContext="false" debug="0" reloadable="true" /Context This does not work and I cannot work out why! Can anyone help? Thanks Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Servlet Directory
Adding a context path in server.xml is just one part to it (BTW, in docBase you might want to use a fully qualified path rather than a relative path). The 2nd file that you need to edit is uriworkermap.properties file, and add (in your case) /myservlets/*=ajp12 You may need to restart both Tomcat and the web server. Good luck. Anuj. Richard Scales wrote: I've just installed tomcat 3.2.1 and its working fine except that I am using the default webapps/examples directory to store my servlets which is a pain as I physically have to copy them over etc and I would like to keep them on a seperate folder somewhere else on my machine. I have been trying to achieve this by adding a contex-path to the server.xml file with no luck. Currently my servlets are in H:\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes and I would like to store them in H:\Work\MyServlets\bin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Servlet Directory
Anuj, I've done that and I get now get the Tomcat Admin tools page at http://localhost:8080/richard/index.html on my machine but cannot access my servlets below my bin directory. Any ideas? Rich -Original Message- From: Anuj Agrawal [mailto:[EMAIL PROTECTED]] Sent: 02 March 2001 13:45 To: [EMAIL PROTECTED] Subject: Re: Servlet Directory Adding a context path in server.xml is just one part to it (BTW, in docBase you might want to use a fully qualified path rather than a relative path). The 2nd file that you need to edit is uriworkermap.properties file, and add (in your case) /myservlets/*=ajp12 You may need to restart both Tomcat and the web server. Good luck. Anuj. Richard Scales wrote: I've just installed tomcat 3.2.1 and its working fine except that I am using the default webapps/examples directory to store my servlets which is a pain as I physically have to copy them over etc and I would like to keep them on a seperate folder somewhere else on my machine. I have been trying to achieve this by adding a contex-path to the server.xml file with no luck. Currently my servlets are in H:\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes and I would like to store them in H:\Work\MyServlets\bin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Servlet Directory
I do this all the time. I assume that the /Work/MyServlets/bin contains a WEB-INF directory. docBase should be set to the directory which contains the WEB-INF directory. Tomcat looks in the WEB-INF/classes directory for any class files. Match Richard Scales wrote: Hi, I've just installed tomcat 3.2.1 and its working fine except that I am using the default webapps/examples directory to store my servlets which is a pain as I physically have to copy them over etc and I would like to keep them on a seperate folder somewhere else on my machine. I have been trying to achieve this by adding a contex-path to the server.xml file with no luck. Currently my servlets are in H:\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes and I would like to store them in H:\Work\MyServlets\bin I cannot work out how to change this directory this is as far as I have got:- Context path="/myservlets" docBase="../../Work/MyServlets/bin" crossContext="false" debug="0" reloadable="true" /Context This does not work and I cannot work out why! Can anyone help? Thanks Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Basic servlet directory question
First of all, I'm sorry for posting such a basic question, but I can't seem to find what I'm looking for anywhere. Some eight months ago, I configured Tomcat to work with IIS and serve the servlets. All I need to do now is add another servlet directory. Try as I might, I can't remember how I did this originally and looking through the myriad of docs on Tomcat isn't helping. I can't remember which configuration file(s) I had to edit in order to add the container, and what modifications I had to make. The Tomcat docs talk a little bit about the server.xml file, and they link to Sun's site for info on editing the web.xml file. Will I need to edit both of these? Here is an example of what I need to do: I have a normal content directory called /Test I want to add a servlet container to the following directory: /Test/Servlet/ I want all pages in the /Test directory to continue being served by IIS If anyone could point me in the right direction as to which docs detail this, I would be greatly appreciative. Thanks in advance -Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Servlet Directory
Hi, Just to spell things out a bit clearer: The code for a servlet class, and any non-library classes it uses, must be in the classpath. Your best options are: (a) put them under {yourwebapp}/WEB-INF/classes, in a subdirectory that matches your package structure. (b) put them in a jar file, in {yourwebapp}/WEB-INF/lib In either case above, tomcat automatically adds the directories/libs to its classpath when it starts. You *can* put your servlet classes elsewhere on your disk, and make sure your CLASSPATH points to them before starting tomcat, but there are many disadvantages to this, including making it difficult to install your code elsewhere, and not being able to use the servlet auto-reload feature. Now that your class is *loadable* by tomcat, you need to tell tomcat what URLs map to what servlets. There is an entry in $TOMCAT_HOME/conf/web.xml which sets up a default mapping for servlets; for any url of form /webapp/servlet/servletname, an attempt is made to do a "loadClassForName(servletname)" and if successful, the request is passed off to the found class. Of course, the class to be loaded merely has to be in the classpath somewhere (see (a) and (b) above). [[NB: this only applies in tomcat3.1; I hear that tomcat3.2 does not have a $TOMCAT_HOME/conf/web.xml file, in which case I'm not sure how or if the default servlet mapping gets set up...]] If you don't like this default mapping, you just define your own (url-servletclass) mappings in the file yourwepapp/WEB-INF/web.xml. See the file $TOMCAT_HOME/conf/web.dtd to see what tags are allowed in the web.xml file; then read the sun servlet specs. NB: don't modify the web.xml file in TOMCAT_HOME/conf, create your own inside your webapp/WEB-INF. Note that the servlet class *never* lives *at* the url that the user enters; the url is always looked up to find a corresponding class name, and then the servlet class is loaded from the classpath. I hope this clarifies things a bit... Regards, Simon -Original Message- From: Clark D. Richey, JR. [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, October 24, 2000 3:22 AM To: [EMAIL PROTECTED] Subject: RE: Servlet Directory The class file has to be in Tomcat's classpath. Where are you putting the servlet's class file? -Original Message- From: Corey A. Johnson [mailto:[EMAIL PROTECTED]] Sent: Monday, October 23, 2000 8:15 PM To: [EMAIL PROTECTED] Subject: Servlet Directory Hello all, First, let me apologize... this is so simple... but i have been beating my head against the wall for almost 20 hours straight now... I have successfully installed Tomcat on my Solaris... With Apache 1.3.14 Everything seems to be working fine... JSPs work well... looking through the logs... no errors... but i can not get any servlets to work in my defined servlet directory. I must be missing something very simple. When i try to invoke a servlet, the tomcat.log file shows: Context log: path="" Class Not Found in init java.lang.ClassNotFoundException: testAllego In my tomcat.conf file.. i have the line: ApJServMount /servlet /root And i have this in my server.xml file: Context path="" docBase="/export/home/cni/servlet" debug="0" reloadable="true" /Context I feel like i am so close... because ay least it is "trying" to load the servlet class... but tomcat can't find it.. please help... i need some sleep... thanks in advance. Cj -- Corey A. Johnson Creative Network Innovations, Inc. 1-800-264-5547 ** 1-321-259-1984