Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Message bundles accessed from JSF and JSP pages

843844Oct 14 2008 — edited Oct 16 2008
Hello, everybody!

I'm developing a localized JSF application. It is working pretty well until now.

These are my message files:
mensagens.properties
mensagens_en_US.properties
This is how they're configured in faces-config.xml:
<application>
    <resource-bundle>
        <base-name>br.urca.www.biblioteca.web.mensagens</base-name>
        <var>msg</var>
    </resource-bundle>
</application>
And this is how I access the messages in a page:
<h:outputText value="#{msg.titulo}" />
Nothing new until now. But now there was a need for me to have a raw jsp page in
my web application. This page is displaying ok but I also need to access the
message bundles as I'm able to access in the normal jsp with the JSF components.
As you should know I can't use something like the above code with an +<h:outputText>+
to access the messages because this is a JSF component and I'll not be able to use
JSF components with this raw jsp page.

So, my question is: how do I access my localized messages from a raw jsp page? I
suppose there should be a way to do this, but unfortunately I started programming
to the web world in Java with JSF, not JSP, so I don't know how to do this with
JSP.

Thank you very much.

Marcos
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2008
Added on Oct 14 2008
12 comments
407 views