Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getContextPath()  RSS feed

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I can not find the method getContextPath() in either ServletRequest or HttpServletRequest. Can someone please help me find out what it does exactly?
Thanks.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cameron Park:
Hi, I can not find the method getContextPath() in either ServletRequest or HttpServletRequest.

It gives the location your web-app is mapped to. You can find a more extensive answer here.
- Peter
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!