Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util.http
Class HttpMessages

    java.lang.Object
      org.apache.tomcat.util.http.HttpMessages

public class HttpMessages
extends java.lang.Object

Handle (internationalized) HTTP messages.

Author:
  James Duncan Davidson [duncan@eng.sun.com], James Todd [gonzo@eng.sun.com], Jason Hunter [jch@eng.sun.com], Harish Prabandham, costin@eng.sun.com

Field Summary
`protected static StringManager` | `sm`

Constructor Summary
`HttpMessages()`

Method Summary
`static java.lang.String` | `filter(java.lang.String message)` Filter the specified message string for characters that are sensitive in HTML.
`static java.lang.String` | `getMessage(int status)` Get the status string associated with a status code.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sm

    protected static StringManager sm

Constructor Detail

### HttpMessages

    public HttpMessages()

Method Detail

### getMessage

    public static java.lang.String getMessage(int status)

  Get the status string associated with a status code. No I18N - return the messages defined in the HTTP spec. ( the user isn't supposed to see them, this is the last thing to translate) Common messages are cached.

### filter

    public static java.lang.String filter(java.lang.String message)

  Filter the specified message string for characters that are sensitive in HTML. This avoids potential attacks caused by including JavaScript codes in the request URL that is often reported in error messages.

  Parameters:
    `message` - The message string to be filtered

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.