Pages

Sunday, October 23, 2011

Servlet get path


rquest:
request.getServletPath() : /game
request.getContextPath() : /GamersCom
request.getRequestURL() : http://localhost:8080/GamersCom/game/*
request.getRequestURI() :  /GamersCom/game/*

request.getPathInfo() : /*
request.getRealPath(nextView) : /Users/Frank/Documents/workspace/......../GamersCom/game.jsp

ServletContext
getServletContext().getContextPath() : /GamersCom
getServletContext().getRealPath(nextView) : /Users/Frank/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/GamersCom/game.jsp

No comments:

Post a Comment