tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: question about Tomcat5.5 getServletContext().getContext(String url);
Date Tue, 22 Dec 2009 09:35:38 GMT
Peter Chen wrote:
> Hi,
> 
> In a JSP file, there is a sentence like this:
> 
> ServletContext sc = this.getServletContext().getContext("/File");
> 
> if(sc == null){
> 
>   Logger.warn(msg,"Can't get the context of /File.");
> 
>   return;
> 
> }
> 
>  
> 
> What's the mean of this sentence?
> 
> Now, I run this application in Tomcat5.5, and find the log: Can't get
> the context of /File.
> 
> How to solve this problem? Thanks.
> 
> 
Have a look here (obtained via Google) :
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getContext%28java.lang.String%29

In other words, it is trying to get the context of a webapp which should 
be located at webapps/File.
If you do not have such a webapp, then that is the reason for the 
message above.
Why it is doing that however, and whether it is a problem, is something 
you will need to ask from the author of the application.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message