有没有办法更改此错误消息?当Resin没有运行时出现,所以我认为这是一个IIS6错误消息,但页面的源代码显示此文本被注释掉:
我在IIS6或Resin的文档中找不到此错误消息。
答案 0 :(得分:1)
如果我没记错的话,Resin和其他一些Web服务器会在错误页面中添加一条HTML注释来填充消息,以便显示真正的错误。
e.g。 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?