Reading the CGI Variables in JSP:
String AUTH_TYPE = request.getAuthType();
Int CONTENT_LENGTH = String.valueOf(request.getContentLength());
String CONTENT_TYPE = request.getContentType();
String DOCUMENT_ROOT = getServletContext().getRealPath("/");
String PATH_INFO = request.getPathInfo();
String PATH_TRANSLATED = request.getPathTranslated();
String QUERY_STRING = request.getQueryString();
String REMOTE_ADDR = request.getRemoteAddr();
String REMOTE_HOST = request.getRemoteHost();
String REMOTE_USER = request.getRemoteUser();
String REQUEST_METHOD = request.getMethod();
String SCRIPT_NAME = request.getServletPath();
String SERVER_NAME = request.getServerName();
Int SERVER_PORT = String.valueOf(request.getServerPort());
String SERVER_PROTOCOL = request.getProtocol();
String SERVER_SOFTWARE = getServletContext().getServerInfo();
Using the above in a JSP page:
<%=request.getServletPath()%>
Ot the XML equivalent of:
<jsp:expression> request.getServletPath() </jsp:expression>
