Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:52:10+00:00 2026-05-25T00:52:10+00:00

Using: JSF 1.2, Facelets 1.1.15, GateIn 3.1 GA, Richfaces 3.3.3 I have some common

  • 0

Using: JSF 1.2, Facelets 1.1.15, GateIn 3.1 GA, Richfaces 3.3.3

I have some common .xhtml and backing bean in a JAR that our portlets can see. I did this by overriding ResourceResolver as described in other posts:

  • http://ocpsoft.com/opensource/create-common-facelets-jar/
  • How to use Facelets composition with files from another context

The portlets can load the XHTML and use the backing bean.

Here is my problem: I cannot get the xhtml to substitute the messages defined in messages_en.properties. I have tried moving the properties file outside of the JAR and placing directly in /lib folder. I have also tried putting a / in front of the name to try to get the resolver to find it. I have also put it in the components folder.

The common jar info is: I hava a my-portlet-common-resources.jar which resides in server/my-portal/lib. The jar is structured like so:

  • com/portlet/common/CustomResourceResolver.class
  • com/portlet/common/FilterCreateBean.class – backing bean for the common popup
  • messages_en.properties
  • faces-config.xml
  • META-INF/components/commonPopups.xhtml
  • META-INF/faces-config.xml – declares the FilterBean
  • META-INF/Manifest.mf

faces-config.xml contents:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
    version="1.2">

    <application>
        <locale-config>
            <default-locale>en</default-locale>
        </locale-config>
        <message-bundle>/messages_en.properties</message-bundle>
    </application>

    <managed-bean>
        <managed-bean-name>FilterCreateBean</managed-bean-name>
        <managed-bean-class>com.portlet.common.FilterCreateBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

</faces-config>

Include the messages in commonPopups.xhtml (partial snip):

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">

    <a4j:loadBundle basename="messages" var="msgs"/>

    <rich:panel style="border-style:none;" id="addNewChainPanel">
    <rich:modalPanel id="modalNewChainPanel" autosized="true">
        <f:facet name="header"><h:outputText value="#{msgs['filterset.modal.new.title']}" /></f:facet>

</ui:composition>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:52:10+00:00Added an answer on May 25, 2026 at 12:52 am

    This should work. Perhaps you already have a messages*.properties file in the classpath root of your main webapp. This one has then precedence in classloading. You need to put it in a more specific package. Put the JAR’s one in for example the com/portlet/common folder so that it becomes member of the com.portlet.common package. This way it’ll be available by:

    <a4j:loadBundle basename="com.portlet.common.messages" var="msgs"/>
    

    Unrelated to the concrete problem, the <message-bundle> entry in faces-config.xml has a completely different purpose. It’s supposed to override JSF default validation/conversion messages which are returned by JSF default validators/converters. It is not intended to provide localized content. There you use the <resource-bundle> entry or <xxx:loadBundle> tag for. I’d remove that entry from the faces-config.xml.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
I'm using JSF (Mojarra 1.2) with Richfaces (3.3.2) within some facelets which are used
Using Richfaces 3.3.0GA, jsf 1.2_14 and facelets. I have a richfaces ModalPanel with an
Using jsf 1.2, hibernate, richfaces 3.3.0GA and facelets. I have this code in my
I have a problem using JSF to display some data in Facelets. I have
Let's say that you have the following Facelet ( Using Facelets 1.1.12 ): edit_item.xhtml
I'm building a web App using JSF 2.0 and had a jaf-facelets.1.1.10 jar in
I have been investigating a JSF upgrade on our existing web apps that are
I'm having some trouble with navigation when using Facelets. I have my master template
I have developed a java web application using JSF 2.0(Facelets) on GlassFish 3.1.1 with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.