permaculture playing cards
The moose likes Struts and the fly likes bug in Struts or in Tomcat ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bug in Struts or in Tomcat ??" Watch "bug in Struts or in Tomcat ??" New topic

bug in Struts or in Tomcat ??

R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5382
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
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
I agree. Here's the link:
subject: bug in Struts or in Tomcat ??
It's not a secret anymore!