如果我没有记错,Resin和其他一些Web服务器将HTML注释添加到错误页面来填充消息,以便显示真正的错误。
例如所看到的网络上http://weblogtoolscollection.com/archives/2004/06/22/lame-internet-explorer-script-error-message/
样品评论:
<!–-
Unfortunately, Microsoft has added a clever new
“feature” to Internet Explorer. If the text in
an error’s message is “too small”, specifically
less than 512 bytes, Internet Explorer returns
its own error message. Yes, you can turn that
off, but *surprise* it’s pretty tricky to find
buried as a switch called “smart error
messages” That means, of course, that many of
Resin’s error messages are censored by default.
And, of course, you’ll be shocked to learn that
IIS always returns error messages that are long
enough to make Internet Explorer happy. The
workaround is pretty simple: pad the error
message with a big comment to push it over the
five hundred and twelve byte minimum. Of course,
that’s exactly what you’re reading right now.
-->
我要指出,这个消息应该在页面(例如不可见),如果它是可见的,出了问题的注释。例如也许该文件被作为文本提供,而不是text/html?
我可能会说这很糟糕。我只是引用评论来显示它是一个Resin问题,即使Resin没有启动。我的问题是我在哪里可以修改这个特定的错误,所以我可以改变页面布局?谢谢! – user673256 2011-03-23 17:13:10