RE: serving static content
Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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: serving static content
I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving static content
What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving static content
PLaese no send emailthank you -Mensaje original- De: Matthew Hixson [mailto:[EMAIL PROTECTED] Enviado el: Viernes 9 de Julio de 2004 15:54 Para: Tomcat Users List Asunto: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] AVISO LEGAL: Esta información es privada y confidencial y está dirigida únicamente a su destinatario. Si usted no es el destinatario original de este mensaje y por este medio pudo acceder a dicha información por favor elimine el mensaje. La distribución o copia de este mensaje está estrictamente prohibida. Esta comunicación es sólo para propósitos de información y no debe ser considerada como propuesta, aceptación ni como una declaración de voluntad oficial de REPSOL YPF S.A. y/o subsidiarias y/o afiliadas. La transmisión de e-mails no garantiza que el correo electrónico sea seguro o libre de error. Por consiguiente, no manifestamos que esta información sea completa o precisa. Toda información está sujeta a alterarse sin previo aviso. This information is private and confidential and intended for the recipient only. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and shall not be regarded neither as a proposal, acceptance nor as a statement of will or official statement from REPSOL YPF S.A. and/or subsidiaries and/or affiliates. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: serving static content
Host name=localhost debug=99 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- ADD WATERMARKS DIRECTORY -- Context path=/watermarks appBase= docBase=/usr/local/watermarks debug=99 reloadable=true /Context Valve className=org.apache.catalina.valves.AccessLogValve prefix=localhost_access_log. suffix=.log pattern=common directory=${jboss.server.home.dir}/log resolveHosts=false / /Host On Jul 9, 2004, at 1:52 PM, Jim Cox wrote: What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - 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: serving static content
To unsubscribe, e-mail: [EMAIL PROTECTED] ! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:57 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: serving static content PLaese no send emailthank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving static content
Adding a context is not quite enough. It must be recognized as a web-app also. Which means place an empty web.xml file in the WEB-INF directory. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:54 PM To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - 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: serving static content
Not sure that you need it, but do you have a WEB-INF directory underneath /usr/local/watermarks (i.e. /usr/local/watermarks/WEB-INF/)? If so, do you have a web.xml file in there (even a skeletal one)? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:59 pm To: Tomcat Users List Subject: Re: serving static content Host name=localhost debug=99 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- ADD WATERMARKS DIRECTORY -- Context path=/watermarks appBase= docBase=/usr/local/watermarks debug=99 reloadable=true /Context Valve className=org.apache.catalina.valves.AccessLogValve prefix=localhost_access_log. suffix=.log pattern=common directory=${jboss.server.home.dir}/log resolveHosts=false / /Host On Jul 9, 2004, at 1:52 PM, Jim Cox wrote: What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - 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: serving static content
I actually did try this already. I have a WEB-INF with a web.xml in it. The entire web.xml is: --- ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app --- I also made an empty lib directory beneath WEB-INF, but that didn't help matters. -M@ On Jul 9, 2004, at 1:58 PM, Jim Cox wrote: Not sure that you need it, but do you have a WEB-INF directory underneath /usr/local/watermarks (i.e. /usr/local/watermarks/WEB-INF/)? If so, do you have a web.xml file in there (even a skeletal one)? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:59 pm To: Tomcat Users List Subject: Re: serving static content Host name=localhost debug=99 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- ADD WATERMARKS DIRECTORY -- Context path=/watermarks appBase= docBase=/usr/local/watermarks debug=99 reloadable=true /Context Valve className=org.apache.catalina.valves.AccessLogValve prefix=localhost_access_log. suffix=.log pattern=common directory=${jboss.server.home.dir}/log resolveHosts=false / /Host On Jul 9, 2004, at 1:52 PM, Jim Cox wrote: What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving static content
I've had issues in the past with the generated webapp.xml files that Tomcat generates under ${TOMCAT_ROOT}/conf/Catalina/server/, for which stopping Tomcat, deleting the .xml file, and starting Tomcat seemed to fix. In your case that file might be: /usr/local/tomcat/conf/Catalina/localhost/watermarks.xml This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 5:09 pm To: Tomcat Users List Subject: Re: serving static content I actually did try this already. I have a WEB-INF with a web.xml in it. The entire web.xml is: --- ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app --- I also made an empty lib directory beneath WEB-INF, but that didn't help matters. -M@ On Jul 9, 2004, at 1:58 PM, Jim Cox wrote: Not sure that you need it, but do you have a WEB-INF directory underneath /usr/local/watermarks (i.e. /usr/local/watermarks/WEB-INF/)? If so, do you have a web.xml file in there (even a skeletal one)? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:59 pm To: Tomcat Users List Subject: Re: serving static content Host name=localhost debug=99 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- ADD WATERMARKS DIRECTORY -- Context path=/watermarks appBase= docBase=/usr/local/watermarks debug=99 reloadable=true /Context Valve className=org.apache.catalina.valves.AccessLogValve prefix=localhost_access_log. suffix=.log pattern=common directory=${jboss.server.home.dir}/log resolveHosts=false / /Host On Jul 9, 2004, at 1:52 PM, Jim Cox wrote: What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: serving static content
Under JBoss this file is /usr/local/jboss/server/default/conf/jboss.web/localhost/ watermarks.xml. I've tried deleting that file and restarting, but it doesn't make a bit of difference. The content of that file is: ?xml version='1.0' encoding='utf-8'? Context debug=99 docBase=/usr/local/watermarks path=/watermarks reloadable=true /Context -M@ On Jul 9, 2004, at 2:12 PM, Jim Cox wrote: I've had issues in the past with the generated webapp.xml files that Tomcat generates under ${TOMCAT_ROOT}/conf/Catalina/server/, for which stopping Tomcat, deleting the .xml file, and starting Tomcat seemed to fix. In your case that file might be: /usr/local/tomcat/conf/Catalina/localhost/watermarks.xml This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 5:09 pm To: Tomcat Users List Subject: Re: serving static content I actually did try this already. I have a WEB-INF with a web.xml in it. The entire web.xml is: --- ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app --- I also made an empty lib directory beneath WEB-INF, but that didn't help matters. -M@ On Jul 9, 2004, at 1:58 PM, Jim Cox wrote: Not sure that you need it, but do you have a WEB-INF directory underneath /usr/local/watermarks (i.e. /usr/local/watermarks/WEB-INF/)? If so, do you have a web.xml file in there (even a skeletal one)? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:59 pm To: Tomcat Users List Subject: Re: serving static content Host name=localhost debug=99 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- ADD WATERMARKS DIRECTORY -- Context path=/watermarks appBase= docBase=/usr/local/watermarks debug=99 reloadable=true /Context Valve className=org.apache.catalina.valves.AccessLogValve prefix=localhost_access_log. suffix=.log pattern=common directory=${jboss.server.home.dir}/log resolveHosts=false / /Host On Jul 9, 2004, at 1:52 PM, Jim Cox wrote: What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any logfiles. Thanks, -M@ On Jul 9, 2004, at 1:41 PM, Mike Curwen wrote: Tomcat will serve static content, pretty much out of the box. What is the problem you're experiencing ? -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 3:27 PM To: Tomcat Users List Subject: serving static content Does there exist a howto on serving static content with Tomcat? Even better would be one that shows how to do this with Tomcat+JBoss. Searching Google seems to turn up lots of hits that say basically, Use Apache instead of Tomcat to serve static content. I really need to get this working in Tomcat without Apache. Thanks, -M@ --- - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: serving static content
Have you tried making a symbolic link from /usr/local/watermarks to $TOMCAT_HOME/webapps/watermarks? The syntax would be: ln -s /usr/local/watermarks $TOMCAT_HOME/webapps/watermarks Also check the manager app, tomcat may not be recognizing things, in which case you'd not see it in the manager. Or it might be that tomcat, for whatever reason, isn't starting the context. --mikej -=- mike jackson [EMAIL PROTECTED] -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 2:48 PM To: Tomcat Users List Subject: Re: serving static content Under JBoss this file is /usr/local/jboss/server/default/conf/jboss.web/localhost/ watermarks.xml. I've tried deleting that file and restarting, but it doesn't make a bit of difference. The content of that file is: ?xml version='1.0' encoding='utf-8'? Context debug=99 docBase=/usr/local/watermarks path=/watermarks reloadable=true /Context -M@ On Jul 9, 2004, at 2:12 PM, Jim Cox wrote: I've had issues in the past with the generated webapp.xml files that Tomcat generates under ${TOMCAT_ROOT}/conf/Catalina/server/, for which stopping Tomcat, deleting the .xml file, and starting Tomcat seemed to fix. In your case that file might be: /usr/local/tomcat/conf/Catalina/localhost/watermarks.xml This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 5:09 pm To: Tomcat Users List Subject: Re: serving static content I actually did try this already. I have a WEB-INF with a web.xml in it. The entire web.xml is: --- ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app --- I also made an empty lib directory beneath WEB-INF, but that didn't help matters. -M@ On Jul 9, 2004, at 1:58 PM, Jim Cox wrote: Not sure that you need it, but do you have a WEB-INF directory underneath /usr/local/watermarks (i.e. /usr/local/watermarks/WEB-INF/)? If so, do you have a web.xml file in there (even a skeletal one)? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:59 pm To: Tomcat Users List Subject: Re: serving static content Host name=localhost debug=99 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- ADD WATERMARKS DIRECTORY -- Context path=/watermarks appBase= docBase=/usr/local/watermarks debug=99 reloadable=true /Context Valve className=org.apache.catalina.valves.AccessLogValve prefix=localhost_access_log. suffix=.log pattern=common directory=${jboss.server.home.dir}/log resolveHosts=false / /Host On Jul 9, 2004, at 1:52 PM, Jim Cox wrote: What's your Context entry? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 4:54 pm To: Tomcat Users List Subject: Re: serving static content I'm trying to serve images from /usr/local/watermarks. The URL should be http://mymachine.com/watermarks/. I've tried adding a Context to server.xml, but every time I try to access http://mymachine.com/watermarks I get a 404 message: The requested resource (/watermarks/) is not available. This is with Tomcat 5.0.26 embedded in JBoss 3.2.4. There are not any error messages in any
Re: serving static content
So, when I hit my machine without anything after the machine name in the URL I see a Welcome to JBoss page. One line on this page has: Tomcat status (full) (XML) Clicking on the 'full' link gives me a page with the output below. It looks like it does know about the watermarks context. I still don't know why Tomcat is saying its unavailable though. -M@ JVM Free memory: 90.18 MB Total memory: 99.12 MB Max memory: 320.00 MB jk-8009 Max threads: 200 Min spare threads: 4 Max spare threads: 50 Current thread count: 4 Current thread busy: 1 Max processing time: 0 ms Processing time: 0 s Request count: 0 Error count: 0 Bytes received: 0.00 MB Bytes sent: 0.00 MB Stage Time B Sent B Recv Client VHost Request P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive http-0.0.0.0-8080 Max threads: 150 Min spare threads: 25 Max spare threads: 75 Current thread count: 25 Current thread busy: 2 Max processing time: 1493 ms Processing time: 4 s Request count: 17 Error count: 9 Bytes received: 0.00 MB Bytes sent: 0.03 MB Stage Time B Sent B Recv Client VHost Request S 97 ms 0 KB 0 KB 192.168.1.1 www.forfones.com.poindextrose.org GET /status?full=true HTTP/1.1 R ? ? ? ? ? ? R ? ? ? ? ? ? P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive Application list localhost/watermarks localhost/ localhost/watermarks Startup time: 0 ms TLD scan time: 0 ms localhost/ Startup time: 46 ms TLD scan time: 0 ms Active sessions: 0 Session count: 0 Max active sessions: 0 Rejected session creations: 0 Expired sessions: 1 Processing time: 22 ms JSPs loaded: 0 JSPs reloaded: 0 default [ / ] Processing time: 0 s Max time: 126 ms Request count: 10 Error count: 7 Load time: 143 ms Classloading time: 138 ms Status Servlet [ /status ] Processing time: 1 s Max time: 796 ms Request count: 6 Error count: 0 Load time: 515 ms Classloading time: 446 ms jsp [ *.jsp , *.jspx ] Processing time: 0 s Max time: 0 ms Request count: 0 Error count: 0 Load time: 375 ms Classloading time: 30 ms On Jul 9, 2004, at 2:53 PM, Mike Jackson wrote: Have you tried making a symbolic link from /usr/local/watermarks to $TOMCAT_HOME/webapps/watermarks? The syntax would be: ln -s /usr/local/watermarks $TOMCAT_HOME/webapps/watermarks Also check the manager app, tomcat may not be recognizing things, in which case you'd not see it in the manager. Or it might be that tomcat, for whatever reason, isn't starting the context. --mikej -=- mike jackson [EMAIL PROTECTED] -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 2:48 PM To: Tomcat Users List Subject: Re: serving static content Under JBoss this file is /usr/local/jboss/server/default/conf/jboss.web/localhost/ watermarks.xml. I've tried deleting that file and restarting, but it doesn't make a bit of difference. The content of that file is: ?xml version='1.0' encoding='utf-8'? Context debug=99 docBase=/usr/local/watermarks path=/watermarks reloadable=true /Context -M@ On Jul 9, 2004, at 2:12 PM, Jim Cox wrote: I've had issues in the past with the generated webapp.xml files that Tomcat generates under ${TOMCAT_ROOT}/conf/Catalina/server/, for which stopping Tomcat, deleting the .xml file, and starting Tomcat seemed to fix. In your case that file might be: /usr/local/tomcat/conf/Catalina/localhost/watermarks.xml This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message and attachments. Thank you. -Original Message- From: Matthew Hixson [mailto:[EMAIL PROTECTED] Sent: Fri 09 July 2004 5:09 pm To: Tomcat Users List Subject: Re: serving static content I actually did try this already. I have a WEB-INF with a web.xml in it. The entire web.xml is: --- ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app --- I also made an empty lib directory beneath WEB-INF, but that didn't help matters. -M@ On Jul 9, 2004, at 1:58 PM, Jim Cox wrote: Not sure that you need it, but do you have a WEB-INF directory underneath /usr/local/watermarks (i.e. /usr/local/watermarks/WEB-INF/)? If so, do you have a web.xml file in there (even a skeletal one)? This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by reply e-mail and delete all copies of this message
Re: serving static content
On Fri, Jul 09, 2004 at 01:58:40PM -0700, Matthew Hixson wrote: : Host name=localhost debug=99 :unpackWARs=true autoDeploy=true :xmlValidation=false xmlNamespaceAware=false : : Context path=/watermarks appBase= : docBase=/usr/local/watermarks : debug=99 reloadable=true : /Context Please, humor me: what about Host {...same as above...} appBase=/usr/local Context path=/watermarks docBase=watermarks debug=99 reloadable=true / and try the URL http://localhost:{port}/watermarks What happens then? btw, Tomcat uses commons-logging (or is that log4j?) under the covers. You can up the logging through the commons-logging config. I forget the specifics, but instructions are in the archives somewhere. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: serving static content
Got it! My colleague discovered this post: http://www.jboss.org/index.html?module=bbop=viewtopicp=3840204#3840204 I put the defaultWebXml attribute into the Context and pointed it to the stock global Tomcat web.xml file. Now Tomcat thinks that /watermarks/ is a real webapp apparently and files are being served out of that directory. Thanks to everyone for the help and I hope someone else benefits from this thread someday. Cheers, -M@ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Serving static content in tomcat 5
Howdy, I tried adding a Context to the webappBase\WEB-INF\web.xml file: A context IS a web application: it's a one to one relationship. But it doesn't seem to work. Can someone please point me in the right direction to serve static content / files? You don't need to configure tomcat to serve static content, it does so automatically. You just need to place the static content in your webapp. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Serving static content in tomcat 5
OK that makes sense and I've tested it and you're right. I have a directory structure like this (everything over SSL): .../webapps/theWebApp/ .../webapps/theWebApp/certs and in the .../webapps/theWebApp/ directory I have a file called main.html that has a link to https://servername/theWebApp/certs/CACert.cer and when I click it it will not allow me to save it or access it at all. However, if I put a test file in the /certs directory called hi.html, I can access that via https://servername/theWebApp/certs/hi.html I have checked my tomcatHome/conf/web.xml and there is a mime mapping for .cer files. What gives? Thanks a lot for the help! -Alex --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, I tried adding a Context to the webappBase\WEB-INF\web.xml file: A context IS a web application: it's a one to one relationship. But it doesn't seem to work. Can someone please point me in the right direction to serve static content / files? You don't need to configure tomcat to serve static content, it does so automatically. You just need to place the static content in your webapp. Yoav Shapira __ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Serving static content in tomcat 5
Howdy, and in the .../webapps/theWebApp/ directory I have a file called main.html that has a link to https://servername/theWebApp/certs/CACert.cer and when I click it it will not allow me to save it or access it at all. However, if I put a test file in the /certs directory called hi.html, I can access that via https://servername/theWebApp/certs/hi.html I have checked my tomcatHome/conf/web.xml and there is a mime mapping for .cer files. What gives? You should start a separate thread for a separate question ;) Because of the mime type mapping the browser will not treat cer files as static content. Remove the mapping or make it the same as plain text if you want to see/save these files the same as plain text. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]