servlet 补习1

getServletPath: /pic.upload
getPathInfo() :null
getRequestURI(): /sea/pic.upload
ggetRequestURL(): http://localhost:8080/sea/pic.upload
getPathTranslated(): null
getServerName():localhost
getRemoteHost():127.0.0.1
getContextPath():localhost:8080/sea    //此方法在jsp中返回是:/sea
 

getServletContext().getServerInfo():Apache Tomcat/6.0.18
getServletContext().getRealPath("/"):E:\Tomcat 6.0\webapps\sea\

你可能感兴趣的:(apache,tomcat,jsp,servlet)