public class CommunoteRestletServletAdapter
extends org.restlet.ext.servlet.ServletAdapter
ServletAdapter since we need to specify the
getBaseRef(HttpServletRequest) more freely and
HttpServletRequest.getServletPath() does not seem to fulfill our needs.| Constructor and Description |
|---|
CommunoteRestletServletAdapter(javax.servlet.ServletContext context)
Restlet servlet adapter
|
| Modifier and Type | Method and Description |
|---|---|
org.restlet.data.Reference |
getBaseRef(javax.servlet.http.HttpServletRequest request)
Will take the urlBasePath as basePath extension instead of
HttpServletRequest.getServletPath() |
String |
getUrlBasePath() |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Services a HTTP Servlet request as a Restlet request handled by the "target" Restlet.
|
void |
setUrlBasePath(String urlBasePath)
Set the url base path, it will be trimmed, and preceeded by a slash if not happend so far
|
getNext, getRootRef, setNext, toRequestpublic CommunoteRestletServletAdapter(javax.servlet.ServletContext context)
context - the servlet contextpublic org.restlet.data.Reference getBaseRef(javax.servlet.http.HttpServletRequest request)
HttpServletRequest.getServletPath()getBaseRef in class org.restlet.ext.servlet.ServletAdapterpublic String getUrlBasePath()
getBaseRef(HttpServletRequest)public void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
service in class org.restlet.ext.servlet.ServletAdapterrequest - The HTTP Servlet request.response - The HTTP Servlet response.public void setUrlBasePath(String urlBasePath)
urlBasePath - the url base path that will be used for getBaseRef(HttpServletRequest)Copyright © 2019 Communote team. All rights reserved.