You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Simon Kelly <ke...@ipe.fzk.de> on 2002/12/20 10:48:35 UTC

Positioning and naming of resource (.properties) files.

Hi all,

I am currently having a small problem with the placing of .properties files
within the structure of the struts war file created by build.xml.

I have placed my two .properties files (ApplicationResources.properties and
ApplicationResources_de.properties) within the WEB-INF/src/java/resources
directory and built the war file.  This has then placed the two files in the
WEB-INF/Classes/resources directory.

I have also included an init-param entry in web.xml as follows

[code]
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>
[/code]

and have the following lines in my .sjp

[code]
(snip...)
<head>
    <html:base/>
    <title>
        <bean:message key="index.title"/>
    </title>
</head>
(snip...)
[/code]

But I am getting the following error when I access the page.

[error-msg]
javax.servlet.ServletException: Missing message for key index.title
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
	at org.apache.jsp.BookView_jsp._jspService(BookView_jsp.java:68)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
(snip...)
[/error-msg]

Could someone tell me which bit I have written wrong please.

Regards

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : kelly@ipe.fzk.de


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