Re: css files served as application/x-pointplus with java8
Hi, On 25/07/14 17:10, Christopher Schultz wrote: Therefore, is it possible there is an issue with Tomcat (embedded via maven or not) and Java 8? I'm not really sure what to tell you, because Tomcat simply does not have a MIME mapping for application/x-pointplus. Not at all. AFAIK, Tomcat's default servlet is the only thing that uses the MIME mappings, and all of them are specified in CATALINA_HOME/conf/web.xml. Your web application may add/override MIME mappings in its own web.xml, web fragments, etc. I'm sorry, but there is very little reason to think that Tomcat itself has anything at all to do with this problem. I have to admit I'm running out of ideas about MARMOTTA-499. I'll need to look with more detail why that happens in Tomcat and not in Jetty, but should be any reason... Thanks anyways, guys. Cheers, -- Sergio Fernández Partner Technology Manager Redlink GmbH m: +43 660 2747 925 e: sergio.fernan...@redlink.co w: http://redlink.co - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: css files served as application/x-pointplus
2014-07-10 10:26 GMT+04:00 Sergio Fernández wik...@apache.org: Hi Konstantin, On 08/07/14 09:45, Konstantin Kolinko wrote: There is no application/x-pointplus string in the default conf/web.xml of Tomcat. So first you have to find where the string comes from. Yeap, that's the problem, we cannot reproduce the issue: it works fine in Linux and Windows, also in two OSX I have access. But for whatever reason we got two different users with the same issue in OSX. It failes both in a regular tomcat and the embedded one provided by the maven plugin. We have integration tests over Jetty, and on those conflicting environments the test successfully passes. So definetely something is different there... but hard to find. Tomcat component that is responsible for serving a static file and setting its mime-type is DefaultServlet. If the file is served by something else (e.g. by a different servlet in some framework, or by different server - e.g. if you serve all static files directly from Apache HTTPD), then you are on your own. In our case we have a filter for serving static content from modules (jars). Marmotta has a custom modules' architecture. Are those files mentioned in Tomcat's access log file? I have to ask. What version of Servlet Specification is declared in your WEB-INF/web.xml file? Does it have metadata-complete=true attribute on its web-app element? We are using 3.0. metadata-complete is not explicitly set there. Shoild it help? The default value (metadata-complete=false) means that effective web.xml is merged both from webapp's WEB-INF/web.xml and from all META-INF/web-fragment.xml files found in all *.jars in your web application (or in classpath in general - as depends on configuration). It may be that some rogue library is injecting a mime-type mapping via a web fragment file. The effective merged web.xml can be logged by setting logEffectiveWebXml=true option on Context, http://tomcat.apache.org/tomcat-7.0-doc/config/context.html Note that scanning for the fragment takes some time, so setting metadata-complete=true would make your web application to start up faster. http://wiki.apache.org/tomcat/HowTo/FasterStartUp Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: css files served as application/x-pointplus with java8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sergio, On 7/24/14, 6:50 AM, Sergio Fernández wrote: Hi Christopher, On 10/07/14 16:45, Christopher Schultz wrote: In our case we have a filter for serving static content from modules (jars). Marmotta has a custom modules' architecture. - From the bug report: This is what I get $ curl -I http://localhost:8080/marmotta/core/public/style/blue/style.css HTTP/1.1 200 OK Server: Apache Marmotta/3.2.0 (build 0) Expires: Mon, 19 May 2014 15:55:53 GMT Content-Type: application/x-pointplus Content-Length: 6118 Date: Mon, 19 May 2014 14:55:53 GMT The server string indicates that something other than Tomcat is producing the response. This is likely to be a problem with Marmotta's configuration. Alvaro Graves says: the web.xml shows text/css for mapping. However ./apache-tomcat-7.0.39/webapps/marmotta/WEB-INF/lib/mime-util-2.1.3.jar contains both text/css and application/x-pointplus for mimetypes Well, MARMOTTA-499 has provide us the perfect excuse to move out from mime-utils. Now mimetypes are provide by Apache Tika, but the issue still remains. I'm fairly sure this has nothing to do with Tomcat. After some inquiries we have isolated the environmental circumstance that causes the issue. And it is not at the OS level (OSX), but with Java 8.x: https://issues.apache.org/jira/browse/MARMOTTA-499?focusedCommentId=14071564page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14071564 Jetty (which is used for the integration tests) correctly serves .css as text/css. That's why I initially discarded the issue was located in our static resource handling. Therefore, is it possible there is an issue with Tomcat (embedded via maven or not) and Java 8? I'm not really sure what to tell you, because Tomcat simply does not have a MIME mapping for application/x-pointplus. Not at all. AFAIK, Tomcat's default servlet is the only thing that uses the MIME mappings, and all of them are specified in CATALINA_HOME/conf/web.xml. Your web application may add/override MIME mappings in its own web.xml, web fragments, etc. I'm sorry, but there is very little reason to think that Tomcat itself has anything at all to do with this problem. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT0nNTAAoJEBzwKT+lPKRYmF8QAJq+iKXS1ESbioJbXCbWBURL ot1gvRdqpJXlGOQ2vjq6aipkXY8zdF5tBpWFhVHJh4HINIGT4CNF5uQmVhlisVHZ wwK2f8LQUYH4p9SyNo9WFPk+oPkGFQnIwb0FsqQ9+6Vgzya0LnIjmFbxvftEOZ6d AcctrJTJ3tjQksTlvTPn45ysTw788MXUTna9378bRYPVxxfXeKvj6hmAOnqQ+ZIQ cNOKpSAAzDi/PoA5oaIdUMWJXknjdZm8/GAwS9TqgaWUgNBKu+KSm4pjpolg2PZs d+DCYjptKUFSbM52ulHE5KneOht5jytxZE19OWJKzxJj0PzuhmJLTVL1LCUY+Pbx MrVUnL074xpX91iYEPLy5gbUJYaXve/sxcXgvlLzDf0IVB28318Yvua3xkdHayWB 16lDrkkp8x28sA7kAtvT6gJJv19+fCWJ7/qr9nM+Tx2iA2XbxWzPsFrjKWtrWXTF wC4X7fCExonzaOOTvtWJc6pzSmjJcEtg04fu8mdmNTeuIVIsWz7pcJAYL0SJNnlD YhfPKjCmwMOPMUHgZz5cTKQzlSid5KmhTomH9sbOPOBFpO2Dh2WC2Da/YrCQ6t/R LF+6+tXDi10GR3D99kAt8P3/ZDjuJxhGc81YszVZlv0HvY3YS7e9Ie2T88BKO+id O4TjF1SX7CSxOij01ln9 =544U -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: css files served as application/x-pointplus with java8
Hi Christopher, On 10/07/14 16:45, Christopher Schultz wrote: In our case we have a filter for serving static content from modules (jars). Marmotta has a custom modules' architecture. - From the bug report: This is what I get $ curl -I http://localhost:8080/marmotta/core/public/style/blue/style.css HTTP/1.1 200 OK Server: Apache Marmotta/3.2.0 (build 0) Expires: Mon, 19 May 2014 15:55:53 GMT Content-Type: application/x-pointplus Content-Length: 6118 Date: Mon, 19 May 2014 14:55:53 GMT The server string indicates that something other than Tomcat is producing the response. This is likely to be a problem with Marmotta's configuration. Alvaro Graves says: the web.xml shows text/css for mapping. However ./apache-tomcat-7.0.39/webapps/marmotta/WEB-INF/lib/mime-util-2.1.3.jar contains both text/css and application/x-pointplus for mimetypes Well, MARMOTTA-499 has provide us the perfect excuse to move out from mime-utils. Now mimetypes are provide by Apache Tika, but the issue still remains. I'm fairly sure this has nothing to do with Tomcat. After some inquiries we have isolated the environmental circumstance that causes the issue. And it is not at the OS level (OSX), but with Java 8.x: https://issues.apache.org/jira/browse/MARMOTTA-499?focusedCommentId=14071564page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14071564 Jetty (which is used for the integration tests) correctly serves .css as text/css. That's why I initially discarded the issue was located in our static resource handling. Therefore, is it possible there is an issue with Tomcat (embedded via maven or not) and Java 8? Thanks in advance. Cheers, -- Sergio Fernández Partner Technology Manager Redlink GmbH m: +43 660 2747 925 e: sergio.fernan...@redlink.co w: http://redlink.co - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: css files served as application/x-pointplus
Hi Konstantin, On 08/07/14 09:45, Konstantin Kolinko wrote: There is no application/x-pointplus string in the default conf/web.xml of Tomcat. So first you have to find where the string comes from. Yeap, that's the problem, we cannot reproduce the issue: it works fine in Linux and Windows, also in two OSX I have access. But for whatever reason we got two different users with the same issue in OSX. It failes both in a regular tomcat and the embedded one provided by the maven plugin. We have integration tests over Jetty, and on those conflicting environments the test successfully passes. So definetely something is different there... but hard to find. Tomcat component that is responsible for serving a static file and setting its mime-type is DefaultServlet. If the file is served by something else (e.g. by a different servlet in some framework, or by different server - e.g. if you serve all static files directly from Apache HTTPD), then you are on your own. In our case we have a filter for serving static content from modules (jars). Marmotta has a custom modules' architecture. Are those files mentioned in Tomcat's access log file? I have to ask. What version of Servlet Specification is declared in your WEB-INF/web.xml file? Does it have metadata-complete=true attribute on its web-app element? We are using 3.0. metadata-complete is not explicitly set there. Shoild it help? Thanks! -- -- Sergio Fernández Partner Technology Manager Redlink GmbH m: +43 660 2747 925 e: sergio.fernan...@redlink.co w: http://redlink.co - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: css files served as application/x-pointplus
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sergio, On 7/10/14, 2:26 AM, Sergio Fernández wrote: On 08/07/14 09:45, Konstantin Kolinko wrote: There is no application/x-pointplus string in the default conf/web.xml of Tomcat. So first you have to find where the string comes from. Yeap, that's the problem, we cannot reproduce the issue: it works fine in Linux and Windows, also in two OSX I have access. But for whatever reason we got two different users with the same issue in OSX. It failes both in a regular tomcat and the embedded one provided by the maven plugin. We have integration tests over Jetty, and on those conflicting environments the test successfully passes. So definetely something is different there... but hard to find. Tomcat component that is responsible for serving a static file and setting its mime-type is DefaultServlet. If the file is served by something else (e.g. by a different servlet in some framework, or by different server - e.g. if you serve all static files directly from Apache HTTPD), then you are on your own. In our case we have a filter for serving static content from modules (jars). Marmotta has a custom modules' architecture. - From the bug report: This is what I get $ curl -I http://localhost:8080/marmotta/core/public/style/blue/style.css HTTP/1.1 200 OK Server: Apache Marmotta/3.2.0 (build 0) Expires: Mon, 19 May 2014 15:55:53 GMT Content-Type: application/x-pointplus Content-Length: 6118 Date: Mon, 19 May 2014 14:55:53 GMT The server string indicates that something other than Tomcat is producing the response. This is likely to be a problem with Marmotta's configuration. Alvaro Graves says: the web.xml shows text/css for mapping. However ./apache-tomcat-7.0.39/webapps/marmotta/WEB-INF/lib/mime-util-2.1.3.jar contains both text/css and application/x-pointplus for mimetypes I'm fairly sure this has nothing to do with Tomcat. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTvqb4AAoJEBzwKT+lPKRYvVYP/AijqAvPf6lsud+mz/T97unD cuepTXYkcYCzZ0EX2COnfv0EIEHmwc9ImLpNwp0aOncldQsTcqnRE9VgxknEWM8s 5fBLYEZg2pXciLrdE81h7Zom1jFIOPlQPTzzKspU+BYs2txXJyBEAdjZxdo1Nh2h 41/u4E+WzykFaMHSXCR91K9OKTRUVzD7S0N2oGBBc7AMSuX1WHMPXdmZEticTrKr gMQZgD/QeL3wdTC7jcoid+mw6lmanf4fJqvtXQ+SPM147ufO0SKPBNP0wnLlJtC+ /2o7xZnMemdu51jFrfREW1GF1dFzxZ5hXfbIzWPhYvFS4aRmfz2H5C0SWaWYBsia J0LMvY75dRzo/g5osl15DW2xltILLCphBwNDBUS2WNMzUrJpxc2VvqJGgPpOQIPv 7hcwp9K3ZI5issKCazIxR6NKuPxd+t8K0ta5utKvjh+yJ+z76Nl3YwuijgXZAWR6 O4+86KWBA+fzU59m+CVeyDhjzpHjCaXWK0e0ijABJ5R/ZluPPgsiqzV2oRnlHP4z ir96CA846oA46wQe3B14C2A1KGmnbvUYNsUqBIOwQDX7CPADPf1DgNJlMu623CIH i57tZM9xbW5UM/BRrYv8HAsSUTnJ3PMeAuGQZ5YtWRTeDzjGb9+Ps7vD+fRqNnvH pmc0BgI9yymffA49D6Bx =LlAh -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: css files served as application/x-pointplus
2014-07-08 9:30 GMT+04:00 Sergio Fernández wik...@apache.org: Hi, in Marmotta we are having an issue deploying on Tomcat: https://issues.apache.org/jira/browse/MARMOTTA-499 Basically all .css files are served using mimetype application/x-pointplus, even if the web.xml contains an explicit mime-mapping to the right one. The issue was detected under OSX with Tomcat 7.0.53, although the same issue has been detected in other versions, we cannot reproduce it in other environments, either Linux or Windows. But I'm not sure if it comes directly from Tomcat or from any of the used libraries, such as mime-util. We'd appreciate your help. There is no application/x-pointplus string in the default conf/web.xml of Tomcat. So first you have to find where the string comes from. Tomcat component that is responsible for serving a static file and setting its mime-type is DefaultServlet. If the file is served by something else (e.g. by a different servlet in some framework, or by different server - e.g. if you serve all static files directly from Apache HTTPD), then you are on your own. Are those files mentioned in Tomcat's access log file? What version of Servlet Specification is declared in your WEB-INF/web.xml file? Does it have metadata-complete=true attribute on its web-app element? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org