It is working. This is odd...
I changed from
*<property name="basenames"
value="/META-INF/i18n/application,/META-INF/i18n/messages" />
*to
*<property name="basenames"
value="META-INF/i18n/application,META-INF/i18n/messages" />*
Notice I removed the leading slashes. It is now working with Tomcat Maven
plugin.
What caused the different behavior between standard Tomcat and maven plugin
Tomcat, I can't explain...
Regards,
J.



2012/10/1 Julien Martin <bal...@gmail.com>

> I am still trying to work out how to fix this problem.
>
> Can someone please explain to me what the difference is between standard
> Tomcat and embedded Tomcat (maven plugin)? Especially where does the
> embedded (maven plugin) Tomcat looks for the webapp resources?
>
> Here is how I configured the plugin:
>
>             <plugin>
>                 <groupId>org.apache.tomcat.maven</groupId>
>                 <artifactId>tomcat7-maven-plugin</artifactId>
>                 <version>2.0</version>
>                 <configuration>
>                     <argLine>-Xmx1024m</argLine>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <id>start-tomcat</id>
>                         <phase>pre-integration-test</phase>
>                         <goals>
>                             <goal>run</goal>
>                         </goals>
>                     </execution>
>                     <execution>
>                         <id>stop-tomcat</id>
>                         <phase>post-integration-test</phase>
>                         <goals>
>                             <goal>shutdown</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>
> Thanks in advance,
> J.
>
>
> 2012/10/1 Julien Martin <bal...@gmail.com>
>
>> Thanks Daniel,
>>
>> I've just deployed my app onto a standard Tomcat: it works ok.
>>
>> My Spring config is as follows (the relevant parts at least):
>>
>> <bean
>> class="org.springframework.context.support.ResourceBundleMessageSource"
>> id="messageSource">
>>    <property name="basenames"
>> value="/META-INF/i18n/application,/META-INF/i18n/messages" />
>> </bean>
>>
>> <bean class="org.springframework.web.servlet.i18n.FixedLocaleResolver"
>> p:defaultLocale="fr" />
>>
>> Regards,
>> J.
>>
>>
>> 2012/10/1 Daniel Mikusa <dmik...@vmware.com>
>>
>>>  On Oct 1, 2012, at 5:42 AM, Julien Martin wrote:
>>>
>>> > Hello,
>>> >
>>> > I am experiencing trouble with my embedded tomcat: when I run my
>>> Spring app
>>> > using the embedded Tomcat, it seems the properties are not resolved.
>>>
>>> What about using a standard (i.e. not embedded, not part of Eclipse)
>>> Tomcat installation?  Does this work?
>>>
>>> >
>>> > Even if the properties file are loaded:
>>> >
>>> > INFO
>>>  org.springframework.context.support.PropertySourcesPlaceholderConfigurer
>>> > - Loading properties file from file
>>> >
>>> [/home/julien/Documents/donnees/projets/Site-Rencontres/java/target/classes/META-INF/i18n/application.properties]
>>> >
>>> > The resource bundles are not found:
>>> >
>>> > WARN  org.springframework.context.support.ResourceBundleMessageSource
>>> > - ResourceBundle [/META-INF/i18n/application] not found for
>>> > MessageSource: Can't find bundle for base name
>>> > /META-INF/i18n/application, locale fr
>>>
>>> This is off topic for this list, but what does your Spring configuration
>>> look like for this?
>>>
>>> Dan
>>>
>>>
>>>
>>> > However, when I run my app from Eclipse/STS, I have no such issue.
>>> >
>>> > Can anyone please help?
>>> >
>>> > Regards,
>>> >
>>> > Julien.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>
>

Reply via email to