public class AjaxUtil extends javax.servlet.http.HttpServlet
| Constructor and Description |
|---|
AjaxUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getNextPathPart(java.lang.String path,
java.lang.String lastPart)
Given a requestUri path, find the next uri "fragment" after the "/lastPart/" one.
|
static java.lang.String |
toJson(java.lang.Object input)
Uses Google Gson (https://code.google.com/p/google-gson/) to convert to JSON
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic AjaxUtil()
public static java.lang.String toJson(java.lang.Object input)
input - the object to be converted to JSONpublic static java.lang.String getNextPathPart(java.lang.String path, java.lang.String lastPart) throws javax.servlet.ServletException
path - the RequestURI to search usually done by calling request.getRequestUri().lastPart - the previousPart of the path to search after.javax.servlet.ServletException - if path does not contain lastPartCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.