struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian DeLuca" <bdelu...@iwon.com>
Subject RE: Properties
Date Thu, 05 Dec 2002 19:56:23 GMT


    
      application
      ApplicationResources
    

The above section of the web xml sets this init param that later gets used to put the  on
the servletContext under the Key 
org.apache.struts.action.MESSAGE  The tag  will retrieve the servlet context attribute under
key org.apache.struts.action.MESSAGE It will then create a "properties" type file out of this
attribute and look for key="foo" and print the value of foo to the JSP page.  The value of
"foo" is in the file named ApplicationResources.properties.  

If you do not have this init param then the key org.apache.struts.action.MESSAGE  at the servlet
context level will be null and it will then throw the error.

If the "RED" code is your jsp code.  Check the file ApplicationResources.properties for 
title.login=foo

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)
[...]


  
    abc
    org.apache.struts.action.ActionServlet
    
      config
      /WEB-INF/struts-config.xml
        

    
      application
      ApplicationResources
    

    1
  


  


title.login=Login module







_______________________________________________
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message