Struts: How to use more than one resources file

P

PC Leung

Hello all,

How to make use of more than one resources files
as I want to group them by nature?

The following is my coding.
But I do not know how to specify in coding that I
want that message from that resource file.


web.xml:
<init-param>
<param-name>application</param-name>
<param-value>com.erp.quotation.ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

struts-config.xml:
<!-- message resources -->
<message-resources
parameter="com.erp.quotation.ApplicationResources"
null="false" />
<message-resources
key="userResources"
parameter="com.erp.quotation.user" />
 
S

Sudsy

PC said:
Hello all,

How to make use of more than one resources files
as I want to group them by nature?

The following is my coding.
But I do not know how to specify in coding that I
want that message from that resource file.

You need to know how messages are generated and where. Try reading
this article:
<http://www.sudsy.net/technology/struts-messageresources.html>
It includes code samples and even diagrams showing the processing
of messages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top