You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Tse <er...@netvigator.com> on 2002/12/05 18:12:53 UTC

Properties

Dear all,

I tried to compare struts-blank.war and banking.war tonight and made my own struts applications. I found some strange behavior (it should be I misunderstand some of the syntax, i believe)... can u give me a hint?

When i put the text in red, the code can run. otherwise, an error page appears.What's the purpose of the application param?

Regards,
Eric

[...]
org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
[...]

<!-- /WEB-INF/web.xml -->
  <servlet>
    <servlet-name>abc</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>1</load-on-startup>
  </servlet>

<!-- /WEB-INF/struts-config.xml -->
  <message-resources parameter="DEF" null="false"/>

<!-- /WEB-INF/classes/DEF.properties -->
title.login=Login module

<!-- /login.jsp -->
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<title><bean:message key="title.login"/></title>


Re: Properties

Posted by micael <ca...@harbornet.com>.
The application param, as has been intimated, references your application 
resources file for the i18n functionality, etc.


>----- Original Message -----
>From: "Eric Tse" <er...@netvigator.com>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Thursday, December 05, 2002 9:12 AM
>Subject: Properties
>
>
>Dear all,
>
>I tried to compare struts-blank.war and banking.war tonight and made my own
>struts applications. I found some strange behavior (it should be I
>misunderstand some of the syntax, i believe)... can u give me a hint?
>
>When i put the text in red, the code can run. otherwise, an error page
>appears.What's the purpose of the application param?
>
>Regards,
>Eric
>
>[...]
>org.apache.jasper.JasperException: Cannot find message resources under key
>org.apache.struts.action.MESSAGE
>at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
>48)
>at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>[...]
>
><!-- /WEB-INF/web.xml -->
>   <servlet>
>     <servlet-name>abc</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>1</load-on-startup>
>   </servlet>
>
><!-- /WEB-INF/struts-config.xml -->
>   <message-resources parameter="DEF" null="false"/>
>
><!-- /WEB-INF/classes/DEF.properties -->
>title.login=Login module
>
><!-- /login.jsp -->
><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
><title><bean:message key="title.login"/></title>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

Micael

-------------------------------------------------------

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Properties

Posted by "Khalid K." <gr...@maikada.com>.
I was creating a sample struts project, and I was getting "similar" errors.
I did realize that my jsp syntax for tags were incorrect...
for example: my <html:message ...>  tag was missing the "/" at the
end..etc....just go through your code and make sure the syntax for your jsp
is correct...i hope this helps

Khalid

----- Original Message -----
From: "Eric Tse" <er...@netvigator.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, December 05, 2002 9:12 AM
Subject: Properties


Dear all,

I tried to compare struts-blank.war and banking.war tonight and made my own
struts applications. I found some strange behavior (it should be I
misunderstand some of the syntax, i believe)... can u give me a hint?

When i put the text in red, the code can run. otherwise, an error page
appears.What's the purpose of the application param?

Regards,
Eric

[...]
org.apache.jasper.JasperException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
[...]

<!-- /WEB-INF/web.xml -->
  <servlet>
    <servlet-name>abc</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>1</load-on-startup>
  </servlet>

<!-- /WEB-INF/struts-config.xml -->
  <message-resources parameter="DEF" null="false"/>

<!-- /WEB-INF/classes/DEF.properties -->
title.login=Login module

<!-- /login.jsp -->
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<title><bean:message key="title.login"/></title>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>