This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ServletActionContext.getServletContext().getContextPath()" Watch "ServletActionContext.getServletContext().getContextPath()" New topic
Author

ServletActionContext.getServletContext().getContextPath()

Meenatchi Sundar
Greenhorn

Joined: Jan 31, 2011
Posts: 12
Hi,
im new to servlets,jsp and struts framework.my 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
Hi,
ServletActionContext.getServletContext() returns ServletContext object so using the return object getContextPath() method has been called which will return the context path of your application.

Regards,
Lokesh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ServletActionContext.getServletContext().getContextPath()
 
Similar Threads
Wildcard servlet mappings in web.xml - how to get the part behind the * ?
Uploading images to webapp/images folder
getContextPath()
Serving binaries to clients from a packaged application
easy uri context path req.getRequestURI()