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,
Rave.
Ravi Kiran Reddy KatkuriAnalyst ProgrammerAsked:
Who is Participating?
 
boonlengConnect With a Mentor Commented:
You need to specify which bundle the message key is from.

Example:
    <fmt:setBundle var="bundle2" basename="abc/formLabels"/>
    <fmt:message bundle="${bundle2}" key="form.email"/>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.