I am trying to migrate my application from Resin to Tomcat 6.0.18. The
application runs fine, but my application context name(the context is
created) is coming as null in Tomcat. I tried using context.xml but still I
am facing the same problem.
In Resin the equivalent configuration in resin.conf
Abhi wrote:
I am trying to migrate my application from Resin to Tomcat 6.0.18. The
application runs fine, but my application context name(the context is
created) is coming as null in Tomcat.
How are you getting the context name?
web-app id=/Foo root-directory=webapps/Foo/
Can someone
Thanks Mark.
I am getting the context name using the session object
session.getServletContext().getServletContextName()
On Mon, Dec 1, 2008 at 5:23 PM, Mark Thomas [EMAIL PROTECTED] wrote:
Abhi wrote:
I am trying to migrate my application from Resin to Tomcat 6.0.18. The
application runs
This is an issue with the way getServletContextName() is implemented in
Resin and Tomcat. In Tomcat this returns the display-name of the application
where as in Resin it returns the URL prefix for the servlet context. Once I
added a display name to my web application I am getting the context name
I apologize for not being clear. The code is in the init method.
On Mon, Dec 1, 2008 at 6:14 PM, André Warnier [EMAIL PROTECTED] wrote:
Abhi wrote:
This is an issue with the way getServletContextName() is implemented in
Resin and Tomcat. In Tomcat this returns the display-name of the
Abhi wrote:
This is an issue with the way getServletContextName() is implemented in
Resin and Tomcat. In Tomcat this returns the display-name of the application
where as in Resin it returns the URL prefix for the servlet context. Once I
added a display name to my web application I am getting the
Abhi wrote:
I apologize for not being clear. The code is in the init method.
Tomcat 6.x implements Servlet API 2.5. There's appropiate
ServletContext#getContextPath() method: http://tinyurl.com/5scpfz . So
you can use it from Filter#init() without any problems.
--
Mikolaj Rydzewski
Thanks a ton.
On Mon, Dec 1, 2008 at 6:50 PM, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:
Abhi wrote:
I apologize for not being clear. The code is in the init method.
Tomcat 6.x implements Servlet API 2.5. There's appropiate
ServletContext#getContextPath() method: http://tinyurl.com/5scpfz