org.apache.struts2.rest.handler
Class FormUrlEncodedHandler
java.lang.Object
org.apache.struts2.rest.handler.AbstractContentTypeHandler
org.apache.struts2.rest.handler.FormUrlEncodedHandler
- All Implemented Interfaces:
- ContentTypeHandler
public class FormUrlEncodedHandler
- extends AbstractContentTypeHandler
Handles the default content type for requests that originate from a browser's HTML form
content-type: application/x-www-form-urlencoded
This handler is intended for requests only, not for responses
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
FormUrlEncodedHandler
public FormUrlEncodedHandler()
fromObject
public String fromObject(com.opensymphony.xwork2.ActionInvocation invocation,
Object obj,
String resultCode,
Writer out)
throws IOException
- Throws:
IOException
toObject
public void toObject(com.opensymphony.xwork2.ActionInvocation invocation,
Reader in,
Object target)
- No transformation is required as the framework handles this data
- Parameters:
in
- The input stream, usually the body of the requesttarget
- The target, usually the action class
getExtension
public String getExtension()
- Description copied from interface:
ContentTypeHandler
- Gets the extension this handler supports
- Returns:
- The extension is not used by this handler
getContentType
public String getContentType()
- Description copied from interface:
ContentTypeHandler
- Gets the content type for this handler
- Returns:
- The mime type
Copyright © 2000–2017 Apache Software Foundation. All rights reserved.