|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.yworks.yfiles.server.graphml.servlets.DownloadServlet
Simple download servlet that takes the request from a client and creates a file download for it.
| Constructor Summary | |
DownloadServlet()
Calls the DownloadServlet(String) constructor using
AbstractGraphRoundtripSupport.PARAM_GRAPH
as the parameter name. |
|
DownloadServlet(String graphParameter)
Creates a new instance using the provided parameter to get the graphml string from the HttpServletRequest later in getGraphInputStream(javax.servlet.http.HttpServletRequest)
from. |
|
| Method Summary | |
protected void |
doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
protected String |
getContentType()
Get the content type that will be used for the response header. |
protected InputStream |
getGraphInputStream(javax.servlet.http.HttpServletRequest httpServletRequest)
Retrieves the input stream from the request to read the graphml from. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DownloadServlet()
DownloadServlet(String) constructor using
AbstractGraphRoundtripSupport.PARAM_GRAPH
as the parameter name.
public DownloadServlet(String graphParameter)
HttpServletRequest later in getGraphInputStream(javax.servlet.http.HttpServletRequest)
from.
graphParameter - the name of the parameter of null if the ServletInputStream
shall be used.| Method Detail |
protected void doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws IOException
IOExceptionprotected String getContentType()
Depending on the servlet container configuration, the response content type might determine whether the servlet container sends a compressed response.
"text/xml".
protected InputStream getGraphInputStream(javax.servlet.http.HttpServletRequest httpServletRequest)
throws IOException
ServletRequest.getParameter(String)
method using the parameter name specified in the constructor.
If no parameter name has been specified the ServletInputStream is returned.
httpServletRequest - the request
IOException - if something bad happened.
protected void doPost(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||