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

## org.directwebremoting.dwrp
Class ParseUtil

    java.lang.Object
      org.directwebremoting.dwrp.ParseUtil

    public class ParseUtil

extends java.lang.Object

Utilities to parse GET and POST requests from the DWR javascript section.

Author:
  Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
`ParseUtil()`

Method Summary
`static java.util.Map` | `parseGet(javax.servlet.http.HttpServletRequest req)` Parse an HTTP GET request to fill out the scriptName, methodName and paramList properties.
`static java.util.Map` | `parsePost(javax.servlet.http.HttpServletRequest req)` Parse an HTTP POST request to fill out the scriptName, methodName and paramList properties.
`static java.lang.String[]` | `splitInbound(java.lang.String data)` The javascript outbound marshaller prefixes the toString value with a colon and the original type information.

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

Constructor Detail

### ParseUtil

    public ParseUtil()

Method Detail

### parsePost

    public static java.util.Map parsePost(javax.servlet.http.HttpServletRequest req)
                                   throws ServerException

  Parse an HTTP POST request to fill out the scriptName, methodName and paramList properties. This method should not fail unless it will not be possible to return any sort of error to the user. Failure cases should be handled by the `checkParams()` method.

  Parameters:
    `req` - The original browser's request
  Returns:
    The equivalent of HttpServletRequest.getParameterMap() for now
  Throws:
    `ServerException` - If reading from the request body stream fails

### parseGet

    public static java.util.Map parseGet(javax.servlet.http.HttpServletRequest req)
                                  throws ServerException

  Parse an HTTP GET request to fill out the scriptName, methodName and paramList properties. This method should not fail unless it will not be possible to return any sort of error to the user. Failure cases should be handled by the `checkParams()` method.

  Parameters:
    `req` - The original browser's request
  Returns:
    Simply HttpRequest.getParameterMap() for now
  Throws:
    `ServerException` - If the parsing fails

### splitInbound

    public static java.lang.String[] splitInbound(java.lang.String data)

  The javascript outbound marshaller prefixes the toString value with a colon and the original type information. This undoes that.

  Parameters:
    `data` - The string to be split up
  Returns:
    A string array containing the split data

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