我是在jdk1.5,tomcat5.59提供的servlet包下编译的

解决方案 »

  1.   

    encodeUrl
    public String encodeUrl(String url)
    Deprecated. As of version 2.1, use encodeURL(String url) instead Parameters:
    url - the url to be encoded. 
    Returns:
    the encoded URL if encoding is needed; the unchanged URL otherwise.
    setStatus
    public void setStatus(int sc,
                          String sm)
    Deprecated. As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use setStatus(int), to send an error with a description use sendError(int, String). Sets the status code and message for this response. Parameters:
    sc - the status code
    sm - the status message
      

  2.   

    不错,就是上面这些方法。
    可是我的程序里并没有用到它们。
    setStatus(int sc, java.lang.String sm) 
         The default behavior of this method is to call setStatus(int sc, String sm) on the wrapped response object.
    这是HttpServletResponseWrapper 里的setStatus()也并没有说明过期。