日期:2014-05-17  浏览次数:20813 次

JSP页面出了个505错误,请问怎么解决?谢谢!
Java code

<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%@page import="com.ultrapower.report.component.Create"%>
<%@page import="java.util.HashMap"%>
<%@page import="com.ultrapower.report.rpt.session.SessionInfo"%>
<%@page import="com.ultrapower.report.rpt.session.SessionManager"%>
<%@page import="com.ultrapower.report.rpt.DirectTable"%>
<%@page import="com.ultrapower.report.rpt.sql.ReBuildSQL"%>
<%@page import="com.ultrapower.report.rpt.sql.SQLHandler"%>
<%
    String ctxPath = request.getContextPath();
    //String iam=request.getParameter("iam");
    //SessionInfo sessionInfo=SessionManager.getSessionInfo(iam);
    String deparmentid=request.getParameter("deparmentid");
    
    final String  sqlname="nmr.tjbomc.capse.error_kpi_day";
     List list=new ArrayList();
        StringBuffer optionstr=new StringBuffer();
        String result="";
        DirectTable dt = new DirectTable(sqlname);
        ReBuildSQL rb = dt.getReBuildSql();
        rb.setNestSQL(1, deparmentid);
        dt.setReturnType(SQLHandler.Return_ArrayListRow);
        dt.executeSql();
        list=dt.getSqlResult();
        for (int i=0;i<list.size();i++)
        {ArrayList rowlist=new ArrayList();
         rowlist =(ArrayList) list.get(i);
         String id=(String)rowlist.get(0);
         String name=(String)rowlist.get(1);
         optionstr.append("|"+id+"$"+name);
        }
        optionstr.append("|");
        result=optionstr.toString();
        result="|Resperson$----全部----|"+result;
        out.print(result);

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
    <title>My JSP 'response.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

  </head>
  
  <body>

  </body>
</html>




==============================================================================
错误信息如下:
505错误 
HTTP 版本不受支持! 
我们须分析相关的 HTTP 数据,以就不同 HTTP 协议版本如何应予支持达,还可能需要修改我们的支持特定 HTTP 版本的程序, 这可能需要一些时间。
==============================================================================

------解决方案--------------------
有可能是你的写法导致了你的http头部不合法
------解决方案--------------------
应该有修改代码或者修改配置文件吧,
要不然不会以前可以现在不行,

一段一段的注释代码,找出原因出在哪里!!

------解决方案--------------------
一段一段的注释代码,找出原因出在哪里!! 


对,这样做可以了
------解决方案--------------------
如果启用了 HTTP 1.1,则可能出现此类错误。要禁用 HTTP 1.1,请单击“工具”按钮,单击“Internet 选项”,然后单击“高级”选项卡。在“设置”下,滚动到“HTTP 1.1 设置”部分,清除“使用 HTTP 1.1”复选框。如果第三方产品干扰 Internet Explorer,则可能出现此类错误。请尝试关闭所有程序,然后重新尝试访问该网页。   大多数浏览器都默认Web服务器支持 1.x 的版本的 HTTP 协议。但实际上如 0.9 版今天已很少使用,关键是因为和新版本的协议比起来它们的安全性和性能都差得多。 所以,如果您在浏览器中看到这个错误,可以升级您的Web服务器软件。如果版本 1.x 的请求失败,很可能是因为您的 Web 服务器不是很好地支持 1.x 协议版本, 而不是根本不支持。
出自百度百科
------解决方案--------------------