You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jj...@lexmark.com on 2000/03/01 19:57:29 UTC

M1R2, .WAR and ResourceBundle

I have a webapp that localizes strings via a ResourceBundle.  I've just updated
everything to create a .WAR file, which I place in the webapps directory.  I'm
running M1R2.

The first time I start Tomcat, the .WAR file hasn't yet been unpacked.  It gets
unpacked OK, but when I try to hit my URI with the browser I get:

     java.util.MissingResourceException: Can't find resource for base name
actionStrings, locale en_US

The file actionStrings.properties is in the webapps\<myapp>\WEB-INF, which is in
the classpath, but for some reason it's not found.

The second time I start Tomcat - when all the files are already unpacked - there
are no problems.

Some of the servlet examples use LocalStrings.properties to do about the same
thing I'm doing.  Those examples work, but I don't see anything in their code,
web.xml or server.xml that looks different than what I'm doing.

Any idea what's happening?

Thanks,
-Jeff



Re: M1R2, .WAR and ResourceBundle

Posted by Gal Shachor <sh...@il.ibm.com>.
Jeff,

Try to put your properties file inside the
webapps\<myapp>\WEB-INF\classes directory
I not sure that the webapps\<myapp>\WEB-INF should be loadable by the
application
class loader (look at section 9.4 of the servlet API spec).

	Gal Shachor

jjrobert@lexmark.com wrote:
> 
> I have a webapp that localizes strings via a ResourceBundle.  I've just updated
> everything to create a .WAR file, which I place in the webapps directory.  I'm
> running M1R2.
> 
> The first time I start Tomcat, the .WAR file hasn't yet been unpacked.  It gets
> unpacked OK, but when I try to hit my URI with the browser I get:
> 
>      java.util.MissingResourceException: Can't find resource for base name
> actionStrings, locale en_US
> 
> The file actionStrings.properties is in the webapps\<myapp>\WEB-INF, which is in
> the classpath, but for some reason it's not found.
> 
> The second time I start Tomcat - when all the files are already unpacked - there
> are no problems.
> 
> Some of the servlet examples use LocalStrings.properties to do about the same
> thing I'm doing.  Those examples work, but I don't see anything in their code,
> web.xml or server.xml that looks different than what I'm doing.
> 
> Any idea what's happening?
> 
> Thanks,
> -Jeff
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org