org.directwebremoting.dwrp
Class ParseUtil

java.lang.Object
  extended by 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 boolean isMultipartContent(javax.servlet.http.HttpServletRequest request)
          Utility method that determines whether the request contains multipart content.
 java.util.Map<java.lang.String,FormField> parseRequest(javax.servlet.http.HttpServletRequest request)
          Parse an inbound request into a set of fields
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

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

parseRequest

public java.util.Map<java.lang.String,FormField> parseRequest(javax.servlet.http.HttpServletRequest request)
                                                       throws ServerException
Parse an inbound request into a set of fields

Parameters:
request - The original browser's request
Returns:
The set of fields parsed from the request
Throws:
ServerException

isMultipartContent

public static final boolean isMultipartContent(javax.servlet.http.HttpServletRequest request)
Utility method that determines whether the request contains multipart content.

Parameters:
request - The servlet request to be evaluated. Must be non-null.
Returns:
true if the request is multipart, false otherwise.

Copyright ¬ 2005