This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
Hi I am using Tomcat4.1 and Struts 1.0. I tried to get the ServletContext name. I tried to find out some easy way provided by Struts , but could not find any method which can give me the name of Context. So I tried in my jsp.. 1) request.getSession().getServletContext().getServletContextName() But it returns "null" 2) application.getServletContextName() But it returns "null" I need to know the context name so finally I used request.getContextPath() and then parse it to get the Context name. I wonder what I was doing wrong in first two cases .. why I was not getting theh context name ?? Is it the bug in Tomcat or in Struts ?? or I was worng somewhere ?? Is there any other way to get Context name OR ServletContext object ??
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh