如果我沒有記錯,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