Trace: • Considering Database Default Values • Use XmlWorker and XmlNode • Using XmlSecurityManager • Setting Column Width • Functions and Procedures With IN and OUT Parameters • DataSourceHandler and DBCredentials • CSV Export of Databooks • Server-Side Trigger for Storages • Using HttpContext
The com.sibvisions.rad.server.http.HttpContext is useful for application server deployments. It allows accessing the original request and response from the http connection. If you need access to the HttpRequest, HttpResponse, PortletReqeust or PortletResponse, simply use the HttpContext.
The HttpContext is in use for JVx' Server, REST interface, Mobile server, Vaadin UI and other projects using JVx.
Simply use HttpContext to get the request URL:
HttpContext ctxt = HttpContext.getCurrentInstance(); if (ctxt != null) { Object oRequest = ctxt.getRequest(); if (oRequest instanceof HttpServletRequest) { String sURI = ((HttpServletRequest)oRequest).getRequestURL().toString(); } else { //e.g. PortletRequest } }
The HttpContext is available in application server environments and will be created before the ServerContext.
