How to link the resource bundle in JSF implemented in  eclipse?

Kindly help me out

This is how I called the resource bundle in JSF
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
<f:loadBundle basename="constantsUIProp" var="prop"/>
<h:form>
<h:inputText maxlength="#{prop.AREA_CODE_MAX}"></h:inputText>
</h:form>
</f:view>
</body>
</html>
when i tend to build, it shows an error like+ Resource bundle cannot be found on the classpath+
I have saved the resource bundle in WebContent/Web-Inf/classes/constantsUIProp

Similar Messages

  • How to load the resource bundle message on confirmation popup

    hi every one
    i am using java script confirmation message on my delete button.
    this is my sample for that one
    <h:commandButton action="#{createCurrency.removeCurrency}"
             onclick="if (!confirm('Are you sure to delete this value?')) return false" value="#{messages.Delete}"/>    i need to load the "Are you sure to delete this value?" from resource bundle.
    is there any way to load above message from resource bundle.
    thiagu.m

    If you're using JSF 1.2, you can add the bundle config in your faces-config.xml file like this:
    <resource-bundle>
       <base-name>mypackage.i18n.MessageResources</base-name> // i18n is shorthand for internationalization
       <var>msg</var>
    </resource-bundle>     
    <locale-config>           
       <default-locale>en</default-locale>  // or whatever locale you preferred 
       <supported-locale>...</supported-locale> // other locale defined here if you need them
    </locale-config>Then create a property file called "MessageResources_en.properties. In this file, you can define something like:
    {code}
    MSG_CONFIRM=Do you wish to delete this value?
    // add other messages here. Syntax is: key=value
    {code}
    Then reference the bundle's message in your form as per normal:
    {code}
    !confirm(#{msg.MSG_CONFIRM}))
    {code}
    I haven't tried the above codes but it should help you get started.
    Edited by: icepax on 13/11/2009 19:44

  • How to use common resource bundle across all the development components ?

    Hi,
    I am working on SAP NetWeaver Developer Studio - JAVA
    How to use common resource bundle across all the development components ?
    Description :
    I have a requirement of creating a resource bundle (resource.properties) and use that common resource bundle in all the development components.
    Can we create a  development component (war and ear both) and create only resource.properties in this development component( DC ) and create the dependency of the same DC  in all the other DCs ?
    Thanks,
    Neha

    Hello Neha 
    This question is more NWDS related.
    You may have a better chance of someone answering the thread under
    SAP Netweaver -> SAP NetWeaver Development Infrastructure (NWDI, formerly known as JDI) forum
    Thanks
    Kenny

  • How to link the messages.properties to a jsf project?

    Hi,
    I have a messages.properties in a package mypackage under the jsf project src folder.
    In faces-config I added the messages bundle. In the jsp page I have the following line:
    <f:loadBundle basename="mypackage.messages" var="msg" />
    but eclipse complains that it cannot find the resource bundle in the classpath.
    Thanks,
    Sonia

    sun_sonia wrote:
    It was a mistake on my part. the page itself was created somewhere else. I recreated the page in the project and the error is gone. Sorry. But I learned something. You are saying that the messages bundle in faces-config is different from the one I specify in the jsp page?
    My messages bundle just has static text.Then get rid of the definition in faces-config. It is meant to override default JSF validation/conversion/etc error messages. If you don't have anything overridden in your bundle, it will only add unnecessary overhead in looking up the messages. Your bundle is to be defined in f:loadBundle. Nothing more needs to be done.

  • How to share a resource bundle throughout the faces application

    adf faces 11g release 1
    I want to implement the resource bundle as a java class extending the ListResourceBundle . That works fine for the local project.
    I then made one global "resource project" that should be shared in all projects. I tried first deploying the project to a adflib jar file,
    but i found that the resource class was not included ! I then deployed to a ordinary jar file and that works fine.
    My question is : Is that the way to make a shared resource bundle ?
    Regards,
    Jan

    Hi.
    Check following
    http://andrejusb.blogspot.com/2009/12/reusing-resource-bundles-from-different.html

  • How to deal with resource bundle in multiple applications system

    Hi all,
    I'm building new system depend on the method of
    one common model with multiple applications for the view objects
    my JDeveloper version 11.1.2.3
    my Question
    How can i merge the resource bundle for these applications
    as in the common model exists file for resouce bundle
    and each other applications contains resource bundle files how can i merge all these file in one Resource bundle file ?
    Edited by: 985756 on Apr 2, 2013 12:39 AM

    Hi,
    Please check anerjusb blog for your answer
    Hoping this will help you.
    http://andrejusb.blogspot.in/2009/12/reusing-resource-bundles-from-different.html
    Thanks & Regards,
    Vikas

  • How to use a resource bundle in viewcontroller project

    How can I create a resource bundle for a viewcontroller project ? Is there any way to add entries to it other than adding manually editing the property file ? so that all the key generated will be unique? How to access a message in the resource bundle in my backing bean so that I can display it in my screen ?
    Thanks
    Suneesh

    Suneesh Raman wrote:
    How to access a message in the resource bundle in my backing bean so that I can display it in my screen ?Take a look at this: http://adfcodebits.blogspot.com/2010/04/bit-5-accessing-resource-bundle-from.html

  • How to destroy the resource contained in resourcebundle.getBundle

    Hi
    I have one problem here.
    I m using ResourceBundle class to load the local values
    from portal_local.properties.
    well its works fine but when i make some changes in this file.The changes r not reflected in the result.Resourcebundle reflects the older values cached in it.
    is their any way so that we can destroy that cache contained in resourcebundle and then load the new file again.
    thanks for any help
    Map globalProperties = PropertyUtils.toMap(ResourceBundle.getBundle(global));
    the whole function is like that
    private static Map loadResources(String global, String local) {
    //getTimeStamp();
    Map globalProperties = PropertyUtils.toMap(ResourceBundle.getBundle(global));
    try {
    globalProperties.putAll(PropertyUtils.toMap(ResourceBundle.getBundle(local)));
    } catch (MissingResourceException e) {
    // We only bother with the local resources if the file's present. The
    // getBundle() will fail if portal_local is missing
    return globalProperties;

    My problem is also that the resource bundle cache cannot be cleared.
    1. you can load a propertyfile from classpath (resourcebundle), but it is cached, and read only once.
    2. you can load a propertyfile if there is where your class is, but then users should see java classes, which is not the best i think.
    At last somebody should tell me how to create a user friendly customizable app, which can be modofied by properties at runtime!

  • [svn:fx-trunk] 10599: -fix spark doc target so the docs are put into the resource bundle swc.

    Revision: 10599
    Author:   [email protected]
    Date:     2009-09-25 13:07:56 -0700 (Fri, 25 Sep 2009)
    Log Message:
    -fix spark doc target so the docs are put into the resource bundle swc.
    -added building of all spark localized _rb.swcs
    QE notes: localization team should look at the spark swcs
    Doc notes:
    Bugs: sdk-23256
    Reviewer:
    Tests run: yes
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/sdk-23256
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/build.xml

    Thats good news.

  • How to link the Business Partner with the SAP User ID.

    Hi,
    We are working on a scenario wherein the resources are created as Business Partners in R/3.
    now How to link the Business Partner with the SAP User ID.

    HI AP,
    Maintain the business partner in role Internet User - BUP005.
    Now assign the existing user to this BP .(you can make this assignment in tab "internet user'. Just enter the user name in the field User and save).
    You can now see the link in table HRP1001.
    Cheers,
    Rishu.

  • Did you know how to link the text in two or more text boxes?

    Did anyone know how to link the text in two or more text boxes in Pages 5.0? Thanks for your answer.
    Qualcuno sa come collegare il testo in due o più caselle di testo nella versione 5.0 di Pages. Grazie per le vostre risposte.

    It's just one of the many, many features that have been eliminated or changed. Leave feedback for the Pages team using the link in the Pages menu and review & rate the new versions in the Mac App Store.
    If you previously had iWork '09, those apps are still in your Applications folder in a folder named iWork '09. You can continue to use them to get things done.

  • How to link the reports to portal

    Hai Friends...
    I generated reports using discoverer plus and i viewed the reports using discoverer viewer . I am new to discoverer viewer.
    Any body done please give me steps for how to deploy the reports in discoverer viewer and how to link the reports to portal.I wouid appreciate any help.
    Cheers
    Gopi

    hi gopi,
    u can store ur reports in the database using Discoverer user edition. these stored reports can then be viewed in the discoverer Viewer. here i am assuming that u have configured ur discoverer viewer correctly.
    bye..
    naresh

  • How to link the main site menu to an anchor on a subpage?

    How to link the main site menu (masterpage) to an anchor possition on a subpage? Is that possible. I would like the the contact menu to link to specific anchors  location contact FAQ hours. The way I do it now. I have to create seperate html pages, I would rather do it on one page. Thanks
    http://beta.tmj-sleep.ca/index.html

    Hello,
    To link a website Menu to anchors on any page in the website, you need to create a manual menu using the Menu Widget. You can change Menu to a manual Menu by clicking on the white arrow in Blue Circle which comes up at the top right of the Menu (Menu properties) and select the Menu type as Manual. Please have a look at the screenshot below :
    Now you can add change/add the text there and when you select the text/menu item then from the Hyperlink drpdown at the top in the toolbar, you can select the name of the anchor on any page of your website.
    Anchors are listed in Hyperlink dropdown in this format - Page Name:Anchor Name.
    Hope this helps.
    Regards,
    Sachin

  • How to log the user activity in JSF?

    How to log the user activity in JSF?
    e.g. the pages the user accessed
    searching criteria the user inputted...

    user080701 wrote:
    I need to write the info to database so that we can analyse which product most people seach for , etc.
    Can I write a filter to capture the request info and write the info to database?Of course. Although I would still advocate using logs. You can always parse them and put the data in a database after the fact.

  • IDM : How to get the Resource name in Exclude Rule during Reconciliation?

    Hi
    Problem Statement => How to get the Resource name in Exclude Rule during Reconciliation.
    Problem Description => Apparently, we use exclude rule for not consider some account during reconciliation.
    I need the resource name in exculde rule during reconciliation. I tried with getResources() method which is an inbuilt method.But it gives all the resources are aviablable in the repository (IDM). I need only the current reconcilied resource name instead of fetching all the resouce.
    Can any one please help how to get the resource name in exclude rule during reconciliation?
    Thanks in advance for you help.
    Thanks,
    Chellappan

    Hi,
    Thanks for your reply.
    I have 50 resouces and these resouces using the same kind of exclude rules. In the exclude rule, i am using resource name to do some work. If i get the resouce name in exclude rule, then i can use the same exculde rule for 50 resources. This will minimise the rule count from 50 to 1. For that, i need resouce name.
    Thanks,
    Chellappan Sampath.

Maybe you are looking for

  • How do I add links to my buttons?

    Hi, I am new to the Flash platform, but have some Dreamweaver experience......I have designed a page with a top logo and a horizontal and a verticle menubar. I went to test it and it all works fineas far hover colors, hit etc..... Now I need to make

  • Airport won't auto connect to my router, connects to the neighbors regularl

    Hey, Every time I close my computer it logs off of the internet, which bugs me. Additionally when I open the computer back up instead of auto connecting to my internet, it connects to the neighbors internet titled Lynksis. Can anyone tell me how to r

  • Connection question

    Hello everybody, got some doubts about my new msi GD65 8D, do i have to connect the ATX 4-pin power connector: JPWR3 with the power supply unit of my computer? btw. my PSU dont has a ATX4-pin power connector or is this only necesarry if im using more

  • Portable External HD

    I have tried a Western Digital external HD and an IO Gear External HD. Neither will run on my new PowerBook, but both work on my iMac and the WD will work on an iBook. I am attempting to use one of these drives without a seperate power source. The Po

  • Getting Security Error# 2048 while working in Flash 11.2

    Hi all, Greetings to all. Well So i prepared a widget written in Action Script 3. Here are my system configurations: OS: Windows 7 Flash: 11.2 Now when i make a SWF file and open it in my local host i can see the widget running with no problems. But