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

  • Home
  • SEARCH
  • 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 8289817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:36:39+00:00 2026-06-08T12:36:39+00:00

I have problem referring to resource values from .properties file in xhtml file I

  • 0

I have problem referring to resource values from .properties file in xhtml file

I get following message :

Jul 23, 2012 8:33:27 PM com.sun.faces.context.ExternalContextImpl getMimeType
WARNING: JSF1091: No mime type could be found for file hello.  To resolve this,
add a mime-type mapping to the applications web.xml.

Here is my faces-config.xml

<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_2_1.xsd"
    version="2.1">
    <application>
        <resource-bundle>
            <base-name>resources.resources</base-name>
            <var>resource</var>
        </resource-bundle>
        <locale-config>
            <default-locale>en</default-locale>
        </locale-config>
    </application>
</faces-config>

Here is my test page

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html 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:p="http://primefaces.org/ui">
<f:view>
    <h:head>
        <h:outputText value="Header" />
    </h:head>

    <h:body>
        <h:form>
        <h:outputText value="#{resource.hello}" />
            <h:outputText value="Body" />
            <br />
            <p:spinner />
        </h:form>
    </h:body>
</f:view>
</html>

What could be wrong ?

EDIT:

Not sure if it matters , i use Primefaces-3.3.1

Thanks!

  • 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-06-08T12:36:40+00:00Added an answer on June 8, 2026 at 12:36 pm

    The EL variable #{resource} is a reserved variable name which refers to the resource files in /resources folder which are used by <h:outputStylesheet>, <h:outputScript> and <h:graphicImage>. The EL variable #{resource} is usually only used in CSS files like so

    .someClass {
        background-image: url("#{resource['someLibrary:image/some.png']}");
    }
    

    Give it a different name.

    <var>res</var>
    
    <var>msg</var>
    
    <var>text</var>
    
    <var>i18n</var>
    
    etc...
    

    See also:

    • Communication in JSF 2.0 – Implicit EL objects
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar
I have problem with UIWebView delay when the load image from url. In my
I have problem with TableView its empty. In (.h) file: @interface TableViewController : UITableViewController{
I have the following query: SELECT * from foo where timestamp = (select max(timestamp)
Referring on this question , I have a similar -but not the same- problem..
I have the following problem, which seems not to have a nice solution. For
I have a recurring problem in templating projects. I can't really test my work
I have problem with my query on C, I’m using the oci8 driver. This
I have problem with repopulating form_upload after validation. Other input fields or selectboxes are
I have problem with show or hide form in Window Form Application. I start

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.