f



Cannot find message resources under key org.apache.struts.action.MESSAGE

Hello,

I'm developping my first Struts application.

I've got this error: Cannot find message resources under key
org.apache.struts.action.MESSAGE

web.xml
  <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>
    <load-on-startup>1</load-on-startup>
  </servlet>

struts-config.xml
<struts-config>
	<!-- ===== D�finition des messages de l'application =========== -->
	<message-resources parameter="com.unifr.sis.etunet.ApplicationResources"/>

</struts-config>

my jsp page
<bean:message key="prompt.username"/>

my ApplicationResources.properties (in
\WEB-INF\classes\com.unifr.sis.etunet)
prompt.password=Password
prompt.username=Username

I use Sybase EAServer (normally works fine with J2EE and with
Struts...)

idea? Need some help...

Cedric
0
cedric
7/6/2004 8:37:06 AM
comp.lang.java 3285 articles. 1 followers. Post Follow

1 Replies
2035 Views

Similar Articles

[PageSpeed] 59

Try to setup resources in web.xml

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>
     com.unifr.sis.etunet.ApplicationResources
</param-value>
</init-param>
<!-- ... -->
</servlet>

Cedric wrote:

> Hello,
> 
> I'm developping my first Struts application.
> 
> I've got this error: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
> 
> web.xml
>   <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>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
> 
> struts-config.xml
> <struts-config>
> 	<!-- ===== D�finition des messages de l'application =========== -->
> 	<message-resources parameter="com.unifr.sis.etunet.ApplicationResources"/>
> 
> </struts-config>
> 
> my jsp page
> <bean:message key="prompt.username"/>
> 
> my ApplicationResources.properties (in
> \WEB-INF\classes\com.unifr.sis.etunet)
> prompt.password=Password
> prompt.username=Username
> 
> I use Sybase EAServer (normally works fine with J2EE and with
> Struts...)
> 
> idea? Need some help...
> 
> Cedric
0
Pavel
7/6/2004 2:19:57 PM
Reply: