26/12/2010, 22:33
|
| | Fecha de Ingreso: febrero-2007 Ubicación: Barranquilla, Colombia
Mensajes: 181
Antigüedad: 17 años, 11 meses Puntos: 3 | |
Respuesta: Cómo obtener el nombre del Script JSP <%= request.getServletPath().substring(request.getServ letPath().lastIndexOf("/")+1,request.getServletPath().lastIndexOf(".") ) %>
<%
out.println("OS Server: "+System.getProperty("os.name" )
+"<P>request.getMethod(): "+request.getMethod()
+"<P>request.getProtocol(): "+request.getProtocol()
+"<P>request.getServerName(): "+request.getServerName()
+"<P>request.getRemoteHost(): "+request.getRemoteHost()
+"<P>request.getRequestURI(): "+request.getRequestURI()
+"<P>request.getServletPath(): "+request.getServletPath()
+"<P>request.getContextPath(): "+request.getContextPath()
+"<P>request.getScheme(): "+request.getScheme()
+"<P>request.getRemoteUser(): "+request.getRemoteUser());
out.println("<P>request:<P>");
String headername = "";
for(java.util.Enumeration e = request.getHeaderNames(); e.hasMoreElements();){
headername = (String)e.nextElement();
out.println("<P>"+ headername +": "+request.getHeader(headername));
}
%> |