This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes ServletActionContext.getServletContext().getContextPath() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ServletActionContext.getServletContext().getContextPath()" Watch "ServletActionContext.getServletContext().getContextPath()" New topic


Meenatchi Sundar

Joined: Jan 31, 2011
Posts: 12
im new to servlets,jsp and struts Doubt is that in our project they are using the line ServletActionContext.getServletContext().getContextPath().What does it mean?Can anyone clear my doubts?
lokesh pattajoshi
Ranch Hand

Joined: Jul 29, 2009
Posts: 130
ServletActionContext.getServletContext() returns ServletContext object so using the return object getContextPath() method has been called which will return the context path of your application.

I agree. Here's the link:
subject: ServletActionContext.getServletContext().getContextPath()
It's not a secret anymore!