• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WARNING: REsource org/apache/struts/ validator/ LocalStrings_en_US.properties Not Fo

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I' using struts 1.3.5 with tomcat 5.0.28 and jdk1.4.2. Although my application is working fine but when I look at tomcat console I get follwing warnings on failure of any validation rules.

WARNING: REsource org/apache/struts/ validator/ LocalStrings_en_US.properties Not Foundsd
WARNING: REsource org/apache/struts /validator/ LocalStrings_en.properties Not Found

I have folwing files in WEB-INF directory

ApplicationResources_it_CH.properties
ApplicationResources_en_US.properties
application_it_CH.properties
application_en_US.properties

The language setting in Internet Explorer is as follwing
English(United States)[en-us]
Italian(Switzerland)[it-ch]
--------------------------------------------------
web.xml is follwing

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>struts-html</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-html-el.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts-bean</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts-logic</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-logic-el.tld</taglib-location>
</taglib>

</web-app>

-----------------------------------------------------
struts-config.xml is as follwing

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="inputFormTwoStep" type="ch03.InputWorkflowForm" />
</form-beans>
<action-mappings>
<action path="/inputSubmitStep1" type="ch03.InputWorkflowAction" name="inputFormTwoStep" validate="true" scope="session" parameter="method12" input="/step1.jsp">
<forward name="success" path="/step2.jsp" />
</action>

<action path="/inputSubmitStep2" type="ch03.InputWorkflowAction" name="inputFormTwoStep" validate="true" scope="session" parameter="method12" input="/step2.jsp">
<forward name="success" path="/success.jsp" />
</action>
</action-mappings>
<message-resources parameter="application" />
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>
-------------------------------------------------------------
validation.xml is as follwing

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">
<form-validation>

<formset>

<form name="inputForm">

<field property="userName" depends="minlength">
<arg key="inputForm.userName" resource="true" position="0"/>
<arg name="minlength" key="${var:minlength}" resource="false"
position="1"/>
<var>
<var-name>minlength</var-name>
<var-value>5</var-value>
</var>
</field>

</form>

<form name="inputFormTwoStep">

<field property="userName" depends="required,minlength,maxlength" page="0">
<arg key="inputForm.userName" resource="true" position="0"/>
<arg name="minlength" key="${var:minlength}" resource="false" position="1"/>
<arg name="maxlength" key="${var:maxlength}" resource="false" position="2"/>
<var>
<var-name>minlength</var-name>
<var-value>5</var-value>
</var>
<var>
<var-name>maxlength</var-name>
<var-value>11</var-value>
</var>
</field>

<field property="website" depends="required" page="1">
<arg key="inputForm.website" resource="true" position="0"/>
</field>

</form>

</formset>

</form-validation>
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am receiving the same messages after my Struts 1.3.5 upgrade:

<slightly truncated>
Resource org/apache/struts/validator/LocalStrings_en_US.properties Not Found.
Resource org/apache/struts/validator/LocalStrings_en.properties Not Found.

Did you ever figure out why this was happening? If it's supposed to be in the struts validator package... I mean, how could you even fix it without unpacking the jar?

Please help!

Cheers,
Kristen
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is absolutely no need to worry about this message. If you're using internationaliztion in your application, you have the option of creating LocalStrings property files for each language you support. If you provide them, Struts validation will use them, but if you don't it will just use the default. Apparently your browser is set for US English, and because of this, Struts tried to find a US English specific properties file, and since it didn't find one, it used the default, which happens to be in English anyway.
reply
    Bookmark Topic Watch Topic
  • New Topic