Redian新闻
>
问一个奇怪的tomcat+svg问题
avatar
问一个奇怪的tomcat+svg问题# Java - 爪哇娇娃
T*e
1
后面太多,简言之就是:
IE6/FF1.5 with Adobe SVG Viewer 3.0.3没法正常显示我网页中
的SVG图形,但是显示别的网站的SVG图形没有问题。
正文:
avatar
T*e
2
一直在折腾……
发现:
1. tomcat/conf/web.xml中有svg mime type的重复定义,我删除了重复;
2. ff 1.5有内置的svg支持,我删除了adobe svg viewer plug-in for ff。
新的试验结果:
ie6 with adobe svg viewer:
- can display svg files from other websites
- can display svg files from localhost
- cannot display svg files from other sites in xhtml (localhost)
- cannot display svg files from localhost in xhtml (localhost)
ff 1.5 with native svg support:
- can properly display svg files from other websites
- cannot display svg files from localh

【在 T*****e 的大作中提到】
: 后面太多,简言之就是:
: IE6/FF1.5 with Adobe SVG Viewer 3.0.3没法正常显示我网页中
: 的SVG图形,但是显示别的网站的SVG图形没有问题。
: 正文:

avatar
t*5
3
use a proxy to check the difference in http response.
I use http://www.xk72.com/charles/
not supprising that browser support for svg is incomplete
and inconsistent. years ago I only managed to make it work
in IE, with some wierd twikings. (like content-type must be
image/svg-xml, no idea why '-' not '+')

【在 T*****e 的大作中提到】
: 一直在折腾……
: 发现:
: 1. tomcat/conf/web.xml中有svg mime type的重复定义,我删除了重复;
: 2. ff 1.5有内置的svg支持,我删除了adobe svg viewer plug-in for ff。
: 新的试验结果:
: ie6 with adobe svg viewer:
: - can display svg files from other websites
: - can display svg files from localhost
: - cannot display svg files from other sites in xhtml (localhost)
: - cannot display svg files from localhost in xhtml (localhost)

avatar
T*e
4
I tried an extension called "extended link properties", which can
give me detailed link information.
The conteng-type shown for svg links from localhost is "image/svg"
instead of "image/svg+xml". However, I cannot find any mime mapping
like that. I searched every file under the tomcat installation folder
for "svg" but found nothing relevant except the entry for svg in
tomcat/conf/web.xml. I even changed the svg mime mapping to "image/xvg+xml"
but the content-type for local svg files is still

【在 t****5 的大作中提到】
: use a proxy to check the difference in http response.
: I use http://www.xk72.com/charles/
: not supprising that browser support for svg is incomplete
: and inconsistent. years ago I only managed to make it work
: in IE, with some wierd twikings. (like content-type must be
: image/svg-xml, no idea why '-' not '+')

avatar
T*e
5
Thanks.
I do have the web developer extension, but it doesn't help :)
When I type in the address of one of my svg files from localhost,
ff opens the download dialog and I don't have a chance to inspect
the http headers. If I chose to open the file using ff,
ff displays the content of the svg file correctly, but the address
is a local one, something like file:///c/temp/...
However, ff can display external svg links without any problem
http://www.w3.org/TR/SVG11/images/text/text01.svg as an exam

【在 t****5 的大作中提到】
: use a proxy to check the difference in http response.
: I use http://www.xk72.com/charles/
: not supprising that browser support for svg is incomplete
: and inconsistent. years ago I only managed to make it work
: in IE, with some wierd twikings. (like content-type must be
: image/svg-xml, no idea why '-' not '+')

avatar
t*5
6
firefox web developer extension. must have.
or use a http proxy to monitor the traffic.

【在 T*****e 的大作中提到】
: 一直在折腾……
: 发现:
: 1. tomcat/conf/web.xml中有svg mime type的重复定义,我删除了重复;
: 2. ff 1.5有内置的svg支持,我删除了adobe svg viewer plug-in for ff。
: 新的试验结果:
: ie6 with adobe svg viewer:
: - can display svg files from other websites
: - can display svg files from localhost
: - cannot display svg files from other sites in xhtml (localhost)
: - cannot display svg files from localhost in xhtml (localhost)

avatar
T*e
7
Updated tomcat from 5.5.9 to 5.5.12 and did some minor changes on [tomcat]/conf/web.xml.
Now the content type for svg files from localhost is "image/svg+xml".
However, I still have another problem: implementation status of SVG
Firefox native: the "use" element cannot refer to external elements
Adobe SVG viewer 3.0.x: the same as above
Adobe SVG viewer 6.0 preview 1: can display external "use" elements, but
- IE crashes when I try to print any SVG,
- ff cannot print the external "us

【在 T*****e 的大作中提到】
: I tried an extension called "extended link properties", which can
: give me detailed link information.
: The conteng-type shown for svg links from localhost is "image/svg"
: instead of "image/svg+xml". However, I cannot find any mime mapping
: like that. I searched every file under the tomcat installation folder
: for "svg" but found nothing relevant except the entry for svg in
: tomcat/conf/web.xml. I even changed the svg mime mapping to "image/xvg+xml"
: but the content-type for local svg files is still

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。