0

我有一个带有 iframe 的网站,它适用于 FF 和 Chrome,但在 IE 中我得到:HTTP Status 500 (Tomcat)。我无权访问日志文件。

为什么会这样?

编辑:

这是网站: http: //archiv.difmoe.eu/kalender/ubrtest.php

我使用 fiddler2 来获取此报告:

<html><head><title>Apache Tomcat/5.0.26 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.exlibris.digitool.common.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:50)

根本原因

java.lang.NullPointerException
    org.apache.jsp.mets.toc_jsp._jspService(toc_jsp.java:74)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    com.exlibris.digitool.common.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:50)

note Apache Tomcat/5.0.26 日志中提供了根本原因的完整堆栈跟踪。

Apache Tomcat/5.0.26

4

2 回答 2

0

这是因为没有传递带有会话 ID 的 cookie 。您需要在每个设置cookie的页面上发送标题

PHP:

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

ASP.NET:

HttpContext.Current.Response.AddHeader("p3p","CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");

姜戈:

response = render_to_response('mytemplate.html')
response["P3P"] = 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'

JSP:

response.addHeader("P3P","CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"")

参考: http ://adamyoung.net/IE-Blocking-iFrame-Cookies

于 2012-07-17T09:04:50.567 回答
0

Old question but it has a lot of Google juice so maybe this will help someone in the future:

I had this same issue with an ASP.NET MVC website. I had to remove [ValidateAntiForgeryToken] from the POST method in my Controller as well as removing it from the view. Then everything worked fine (in all versions of IE). My guess is it is still related to headers in some form or fashion.

于 2015-03-20T15:28:39.490 回答