@WebServlet(value="/getJson") public class ProxyServlet extends AbstractJsonDiscoverer
The result is filter to the first LIMIT_LINES to avoid overloading the server.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LIMIT_CHARS
Name of the property holding the number of lines that the proxy should read
|
private int |
limitChar
Limit of chars to read
|
private static long |
serialVersionUID |
static java.lang.String |
URL_PARAM
Name of the property holding the name of the parameter
|
private java.lang.String |
urlParam
The name of the param which will be received in the POST call
|
dotExePath, jsonParam, properties, serverURL, version, workingDir| Constructor and Description |
|---|
ProxyServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Performs a POST call to this servlet.
|
void |
init()
|
addResponseOptions, digestExceptionMessage, doOptions, drawModel, drawModel, drawObjectModel, encodeToString, encodeToString, encodeToStringdoDelete, doGet, doHead, doPut, doTrace, getLastModified, service, serviceprivate static final long serialVersionUID
public static final java.lang.String URL_PARAM
public static final java.lang.String LIMIT_CHARS
private java.lang.String urlParam
private int limitChar
public void init()
throws javax.servlet.ServletException
init in class AbstractJsonDiscovererjavax.servlet.ServletExceptionAbstractJsonDiscoverer.init()protected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
Receives a URL (in the parameter set in urlParam).
Reads a number of bytes (as many as limitChar sets) from
the URL and returns them as text.
doPost in class javax.servlet.http.HttpServletreq - The Request of the callresp - The Response to the calljavax.servlet.ServletExceptionjava.io.IOExceptionHttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)