• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

How do we set multiple base names for resource bundle at one place.

Hi Experts,

Iam using JSTL in my project. I have to read two separate resource bundles and display them in my JSP. For example iam maintaining formLabels and errorMessages from two different property files.

Iam setting my resource bundle as follows

<fmt:setBundle basename="abc/formLabels"/>
but my requirement is to set multiple base names. How do we achieve this.

Thanks & Regards,
Ravi Kiran Reddy Katkuri
Ravi Kiran Reddy Katkuri
1 Solution
You need to specify which bundle the message key is from.

    <fmt:setBundle var="bundle2" basename="abc/formLabels"/>
    <fmt:message bundle="${bundle2}" key="form.email"/>

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now