RE: Touble with context container
What is in your H:\Tomcat\WEB-INF\web.xml file? -Original Message- From: Didier Croutz [mailto:[EMAIL PROTECTED] Sent: 23 February 2004 14:22 To: [EMAIL PROTECTED] Subject: Touble with context container Hello, I'm starting with Tomcat and I've got a configuration problem. I've installed Tomcat 5.014 on a Windows 2K SP4 workstation into the default directory (C:\Program Files\Tomcat 5.0). I've kept the default settings (e.g. port 8080, admin.xml, server.xml ). I stored my applications on a network drive (H:) into a directory named Tomcat. I've just modified C:\Program Files\Tomcat 5.0\conf\server.xml file a little bit adding Context path=/Tomcat docBase=H:/Tomcat debug=0 line (server.xml joined to this mail). My testing application is into H:\Tomcat directory (departement.class and recherchDep.html files joined to this mail). I fill the address field of my web browser (internet explorer 6.0.2800.1106) with: htpp://localhost:8080/Tomcat/recherchDep.html. I can reach the html page but when I tried to launch departement script I get a 404 message into my browser saying that it can reach departement resource. Could somebody help me ? Thanks, Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Touble with context container
Hi Didier, I would create a directory under C:\Program Files\Tomcat 5.0\web-apps\write-your-web-application-here\ And then in the context I would try: Context path=/myapp docBase=myapp debug=0/Context It should work. Hugo PS: You can find a simple example on how to configure a tomcat to run a simple application here: http://kevinj.develop.com/javahome/javatomcat.jsp -Original Message- From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] Sent: Montag, 23. Februar 2004 15:42 To: 'Tomcat Users List' Subject: RE: Touble with context container What is in your H:\Tomcat\WEB-INF\web.xml file? -Original Message- From: Didier Croutz [mailto:[EMAIL PROTECTED] Sent: 23 February 2004 14:22 To: [EMAIL PROTECTED] Subject: Touble with context container Hello, I'm starting with Tomcat and I've got a configuration problem. I've installed Tomcat 5.014 on a Windows 2K SP4 workstation into the default directory (C:\Program Files\Tomcat 5.0). I've kept the default settings (e.g. port 8080, admin.xml, server.xml ). I stored my applications on a network drive (H:) into a directory named Tomcat. I've just modified C:\Program Files\Tomcat 5.0\conf\server.xml file a little bit adding Context path=/Tomcat docBase=H:/Tomcat debug=0 line (server.xml joined to this mail). My testing application is into H:\Tomcat directory (departement.class and recherchDep.html files joined to this mail). I fill the address field of my web browser (internet explorer 6.0.2800.1106) with: htpp://localhost:8080/Tomcat/recherchDep.html. I can reach the html page but when I tried to launch departement script I get a 404 message into my browser saying that it can reach departement resource. Could somebody help me ? Thanks, Regards. - 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: Touble with context container
Tomcat will not see your servlet until you create a web.xml file for your application. The following document explains the directory layout: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/ Pay particular attention to this section: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/deployment.html In short, you need to do the following: 1. Create a WEB-INF directory under H:\Tomcat. 2. Create a lib directory under H:\Tomcat\WEB-INF 3. Create a classes directory under H:\Tomcat\WEB-INF 4. Move your class file to H:\Tomcat\WEB-INF\classes\your\package. (I don't know what package your class is in, so I'm assuming your.package for now) 5. Create a web.xml file under H:\Tomcat\WEB-INF. Add the following text: ?xml version=1.0 encoding=ISO-8859-1? web-app servlet servlet-namedepartement/servlet-name servlet-classyour.package.departement/servlet-class servlet servlet-mapping servlet-namedepartement/servlet-name url-pattern/departement/url-pattern /servlet-mapping /web-app 6. Restart tomcat 7. Type http://localhost:8080/Tomcat/departement into your browser to see if your servlet is working. Regards, Andy -Original Message- From: Didier Croutz [mailto:[EMAIL PROTECTED] Sent: 23 February 2004 16:12 To: Bodycombe, Andrew Subject: RE: Touble with context container Hi, First thanks for your response. I have no H:\Tomcat\WEB-INF\web.xml file but C:\Program Files\Tomcat 5.0\conf\server.xml. Regards. A 14:42 23/02/2004 +, vous avez écrit : What is in your H:\Tomcat\WEB-INF\web.xml file? -Original Message- From: Didier Croutz [mailto:[EMAIL PROTECTED] Sent: 23 February 2004 14:22 To: [EMAIL PROTECTED] Subject: Touble with context container Hello, I'm starting with Tomcat and I've got a configuration problem. I've installed Tomcat 5.014 on a Windows 2K SP4 workstation into the default directory (C:\Program Files\Tomcat 5.0). I've kept the default settings (e.g. port 8080, admin.xml, server.xml ). I stored my applications on a network drive (H:) into a directory named Tomcat. I've just modified C:\Program Files\Tomcat 5.0\conf\server.xml file a little bit adding Context path=/Tomcat docBase=H:/Tomcat debug=0 line (server.xml joined to this mail). My testing application is into H:\Tomcat directory (departement.class and recherchDep.html files joined to this mail). I fill the address field of my web browser (internet explorer 6.0.2800.1106) with: htpp://localhost:8080/Tomcat/recherchDep.html. I can reach the html page but when I tried to launch departement script I get a 404 message into my browser saying that it can reach departement resource. Could somebody help me ? Thanks, Regards. - 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]