Resource bundle in content repository

Hi,
We have a weblogic portal application. Client wants the flexibility to be able to change the text (labels, paragraphs) without any help from IT i.e no releases or redeployment should be required.
For static pages htmls have been moved to content repository and that helps.
However for multilingual jsp labels, headers etc. should we add the resource bundle files(.properties files) to content repository?
Please suggest. We are using netui tags in UI.

What are you using to show the message i18n or JSTL? i18n tag libraries have a timed technique of reload. ResourceBundles cant be reloaded (directly). search for a snippet on the web which shows how to reload ResourceBundles.
should we add the resource bundle files(.properties files) to content repository?So long as you have a way to push the files to all managed servers , store it wherever you want.
While this is an idealistic scenario of business can update all content consider what happens when a business user changes the key by mistake, makes a formatting error etc that can potentially break your page.

Similar Messages

  • Unable to refer to custom resource bundle in WPC content rendered with xslt

    Hi,
    I need to use the resource bundle messages inside WPC content.
    When rendered by standard xsl templates the  call to XSLTHelper class is done to retrieve message from the standard SAP resource bundle com.sap.nw.wpc.bundles.core.properties, like this:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                         xmlns:wpc="com.sap.nw.wpc.km.service.editor.hslt.XsltHelperCore">
    <xsl:value-of select="wpc:getString([key defined in sap bundle], string(/document/@locale))"/>
    The problem is that helper class doesn't provide any API to use custom bundles.
    I tried to create xslt helper (including config in KM), but that didn't succeed neither. It would return with error NoClassDefFound.
    Could you please help on configuring xslt helper and registering it with xslt rendering engine for Web Page Composer? I could not find any how-to guides on xslt helpers for WPC.
    Thanks in advance.
    Ruslan

    Hi
    Did you find a solution?
    Christof

  • SAPDB password in content repository

    Hello,
    I 'm in the process of configuring the repository with content server.
    Two of the parameters with content repository are SAPDBUser and SAPDBPassword.
    Before finishing to configure this we have used the report RSCMSPWS to set the technical user password settings used for connection.
    After launching this report with definning the DBuser = SAPCS and Password = SAPCS
    Two parameters have been aded on the parameters of the repository:
    -1- SAPDBUser
    -2- SAPDBPassword
    with SAPCS as user and another different password as SAPCS defining in MAXDB
    Knowing that the 2 passwords must be the same, what must be done to resolve this.
    Best Regards.
    Zied.

    What are you using to show the message i18n or JSTL? i18n tag libraries have a timed technique of reload. ResourceBundles cant be reloaded (directly). search for a snippet on the web which shows how to reload ResourceBundles.
    should we add the resource bundle files(.properties files) to content repository?So long as you have a way to push the files to all managed servers , store it wherever you want.
    While this is an idealistic scenario of business can update all content consider what happens when a business user changes the key by mistake, makes a formatting error etc that can potentially break your page.

  • How to enumerate keys in Resource Bundle?

    Is there any way to enumerate all the keys (but not the values) of resource bundle?

    If rb is a ResourceBundle, you can enumerate the keys and values in its 'content' property with the following code:
    for (var key:String in rb.content)
        var value:* = rb.content[key];
    Gordon Smith
    Adobe Flex SDK Team

  • How to Upload Mutilple Images in content repository?

    Hi
    How to Upload Mutilple Images in content repository?
    I have a html which shd be displayed and it has 3 images which shd be displayed
    in the same page
    Here i am able to display the HTML uploaded in content repository
    but the images are not displayed,since the path is not valid for the images.
    Can any one hint me in this,
    wating for the reply
    Thanks in Adv
    Regards
    Suresh

    Suresh, your html specifies an image at resources/images/privacy.gif - is that
    image in your repository at the correct relative position to where yout html is?
    Your html and repository structure must match. So if the html you posted is at
    /BEA Repository/foo.html
    then privacy.gif must be at /BEA Repository/resources/images/privacy.gif
    James
    "Suresh" <[email protected]> wrote:
    >
    >
    >
    Hi James
    Here i have attached my sample html and image
    My Repository Structure is as follows :
    Virtual Content Repository
    BEA Repository
    MainImage type image
    Privacy type i created
    ----StartDate
    ----EndDate
    ----File Upload
    My HTML
    <HTML>
    <HEAD>
    <TITLE> New Document </title>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </head>
    <BODY>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td class="norBold"><img src="resources/images/privacy.gif"
    width="123"
    height="73">Privacy
    Policy</td>
    </tr>
    <tr>
    <td class="formHeadBack" height="19"><b> Privacy Policy</b></td>
    </tr>
    </body>
    </html>
    and
    one image
    Thanks in Adv
    Suresh
    "James Owen" <reply.to@newsgroup> wrote:
    Suresh, how is your content structured and what does your html looklike?
    If you
    could post examples, that would be helpful.
    thanks,
    James
    "suresh" <[email protected]> wrote:
    Hi
    How to Upload Mutilple Images in content repository?
    I have a html which shd be displayed and it has 3 images which shd
    be
    displayed
    in the same page
    Here i am able to display the HTML uploaded in content repository
    but the images are not displayed,since the path is not valid for the
    images.
    Can any one hint me in this,
    wating for the reply
    Thanks in Adv
    Regards
    Suresh

  • Custom error messages - resource bundle

    Greetings everyone!
    My JDev version is:  11.1.2.3.0
    I've seen several threads in OTN and outside about this topic, but they seem confused (or may be it's me that is missing something).
    I have this current situation, when because of the presence of a FK in the database, when a try to delete a certain record, a popUp shows up ORA-02292 error code. I don't want to enable cascade deletion (i don't want anything to be deleted in that case at all), so i was trying to customize the error message. I've created a java class and declared it as a resource bundle in the Model project. The content is this:
    public class CustomErrorMessages extends ListResourceBundle {
        private static final Object[][] sMessageStrings = new String[][] {
    {"25014", "Another user has made a modification to this record meanwhile. Please cancel your changes!"},
        {"CREDITOR", "This party is assigned as a creditor/debtor in this contract. It cannot be deleted!"},
        {"DEBTOR", "This party is assigned as a creditor/debtor in this contract. It cannot be deleted!"}
        /**Return String Identifiers and corresponding Messages in a two-dimensional array.
        protected Object[][] getContents() {
            return sMessageStrings;
    25014 - refers to JBO-25014 and it works fine. Now CREDITOR/DEBTOR are the FK mentioned above. If i put 02292  or ORA-02292  instead of them it doesn't work at all. If i let them just like this, it works if i run the Application Module only, but not when i run the application. What does it mean?
    Also, i've noticed that the ViewController project has also a "Resource Bundle" section in the properties, but the content is disabled. Should i do any kind of configuration to make it work?
    Thank you in advance.

    Hi,
    this blog is as close as it gets to your requirement
    http://www.jobinesh.com/2011/03/customizing-business-components-error.html
    Frank

  • How to Upload a file to KM Content repository from a Portal Application

    Hello All
    I have a urgent requirement where i have to upload a file to a KM Content Repository from my Portal Application which is a JSP DynPage Component..
    I am new to the area of Knowledge Management...Can anyone guide me of how to achieve this functionality from my component..
    I will be highly obliged..
    Thanks
    Sundeep

    Hello Sundeep,
    Check this:
    https://www.sdn.sap.com/irj/sdn/thread?threadID=241883
    One more important doc:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f7ced90-0201-0010-589f-8eff15a14072
    Sample coding for content creating and retrieval
    String out = new String(“my content”);
    ByteArrayInputStream data = new
    ByteArrayInputStream(out.getBytes());
    IContent newContent =
    new Content(data, “text/plain”,
    data.available());
    resource.updateContent(newContent);
    IContent oldContent = resource.getContent();
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers
    Message was edited by:
            Praveen Gudapati

  • 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

  • 11g Add Text  Resource Values in a Resource Bundle (Bug? - minor)

    Hi,
    When you are adding a new Text Resource Value in a Resource Bundle the "Save and Select" button becomes active only when you enter a value for "Description". I believe we should be able to input text resources having no Description if we would like so.
    Notice that the "Project Properties/ Resource Bundle / Always Prompt for Description" check box is not selected.
    Best Regards,
    Elias.

    I have made a small mistake in the post above as the line
    *<c:set var="viewBundle" value="#{adfBundle}"/>*
    should be read as
    *<c:set var="viewBundle" value="#{adfBundle\['nsi.isbs.uicli.bundles.ResponsesBundle'\]}"/>*
    The forum application removed the content inside square brackets because I had not escaped the brackets in the text.

  • Utf-8 from resource bundle?

    I've been looking at many resources and see this is a common problem but still haven't found solution to desplaying unicode data.
    Page starts with <%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %> and has <meta http-equiv="content-type" content="text/html; charset=utf-8"> in the html head tag.
    Output from all database derived unicode characters look fine. However, output from resource bundle is garbled. i.e. "Espa�ol" comes back as "Espa&#195;&#177;ol".
    Using Tomcat 5 where I set URIEncoding="UTF-8" in the Connector tag.
    Also have a catch all filter setting.
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    and I've duplicated the settings in the jsf file.
    I'd really appreciate any ideas what I'm doing wrong or what more I need to add?

    ResourceBundle Properties uses java.util.properties. If you look closely in
    http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
    you can see it is not using UTF-8, but only ISO 8859-1.
    There is no easy solution for this problem.
    If you are using JSE 5.0 you can view sun newletter
    http://java.sun.com/developer/JDCTechTips/2005/tt1018.html
    Hope it helps.

  • Unable to Create a Content Repository Connection using 'socketssl'

    I'm trying to create a Content Repository Connection with RIDC Socket Type as "socketssl".
    I am not able to create the connection. The following are the parameters mentioned in Jdeveloper
    RIDC Socket Type : socketssl
    Server Host Name : <ip of the content server>
    Content Server Listener Port : 54444 (incoming SSL provider is configured in the content server)
    KeyStore File Location : patch of the client keystore
    KeyStore Password : password
    Private Key Alias : PrivateKey Alias Name
    Private Key password : password
    I get the below error. However I am able to use RIDC to connect to UCM using socketssl. This problem is seen only with jdeveloper.
    SEVERE: Submission[id=1, service=oracle.webcenter.content.jcr.login, resource=ucm] caught exception running task
    javax.jcr.RepositoryException: oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketException: Software caused connection abort: recv failed
         at oracle.jcr.impl.ExceptionFactory.repository(ExceptionFactory.java:161)
         at oracle.stellent.jcr.IdcPersistenceManagerFactory.createPersistenceManager(IdcPersistenceManagerFactory.java:185)
         at oracle.jcr.impl.OracleRepositoryImpl.login(OracleRepositoryImpl.java:444)
         at oracle.vcr.jam.LoginTask.call(LoginTask.java:68)
         at oracle.vcr.jam.LoginTask.call(LoginTask.java:29)
         at oracle.webcenter.concurrent.Submission$2.run(Submission.java:484)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.webcenter.concurrent.Submission.runAsPrivileged(Submission.java:498)
         at oracle.webcenter.concurrent.Submission.run(Submission.java:424)
         at oracle.webcenter.concurrent.Submission$SubmissionFutureTask.run(Submission.java:888)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.runTask(ModifiedThreadPoolExecutor.java:657)
         at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.run(ModifiedThreadPoolExecutor.java:682)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketException: Software caused connection abort: recv failed
         at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readResponse(HdaProtocol.java:254)
         at oracle.stellent.ridc.IdcClient.sendRequest(IdcClient.java:165)
         at oracle.stellent.jcr.IdcPersistenceManagerFactory.createPersistenceManager(IdcPersistenceManagerFactory.java:171)
         ... 15 more
    Caused by: java.net.SocketException: Software caused connection abort: recv failed
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
         at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(SSLSocketImpl.java:1523)
         at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:103)
         at com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:689)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:985)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:904)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:238)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:753)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
         at oracle.stellent.ridc.common.util.StreamUtil.readRawLine(StreamUtil.java:227)
         at oracle.stellent.ridc.common.util.StreamUtil.readLine(StreamUtil.java:254)
         at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readHeaders(HdaProtocol.java:453)
         at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readResponse(HdaProtocol.java:215)
         ... 17 more
    31/10/2011 2:14:29 PM oracle.webcenter.content.internal.dt.connection.wizard.AdapterConfigPanel validateConfig
    WARNING: Invalid Configuration Parameters
    javax.jcr.RepositoryException: oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketException: Software caused connection abort: recv failed
         at oracle.jcr.impl.ExceptionFactory.repository(ExceptionFactory.java:161)
         at oracle.stellent.jcr.IdcPersistenceManagerFactory.createPersistenceManager(IdcPersistenceManagerFactory.java:185)
         at oracle.jcr.impl.OracleRepositoryImpl.login(OracleRepositoryImpl.java:444)
         at oracle.vcr.jam.LoginTask.call(LoginTask.java:68)
         at oracle.vcr.jam.LoginTask.call(LoginTask.java:29)
         at oracle.webcenter.concurrent.Submission$2.run(Submission.java:484)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.webcenter.concurrent.Submission.runAsPrivileged(Submission.java:498)
         at oracle.webcenter.concurrent.Submission.run(Submission.java:424)
         at oracle.webcenter.concurrent.Submission$SubmissionFutureTask.run(Submission.java:888)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.runTask(ModifiedThreadPoolExecutor.java:657)
         at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.run(ModifiedThreadPoolExecutor.java:682)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketException: Software caused connection abort: recv failed
         at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readResponse(HdaProtocol.java:254)
         at oracle.stellent.ridc.IdcClient.sendRequest(IdcClient.java:165)
         at oracle.stellent.jcr.IdcPersistenceManagerFactory.createPersistenceManager(IdcPersistenceManagerFactory.java:171)
         ... 15 more
    Caused by: java.net.SocketException: Software caused connection abort: recv failed
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
         at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(SSLSocketImpl.java:1523)
         at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:103)
         at com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:689)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:985)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:904)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:238)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:753)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
         at oracle.stellent.ridc.common.util.StreamUtil.readRawLine(StreamUtil.java:227)
         at oracle.stellent.ridc.common.util.StreamUtil.readLine(StreamUtil.java:254)
         at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readHeaders(HdaProtocol.java:453)
         at oracle.stellent.ridc.protocol.intradoc.HdaProtocol.readResponse(HdaProtocol.java:215)
         ... 17 more
    Please let me know the valid Configuration Parameters?
    Thanks,
    Manjunath
    Edited by: 890922 on Oct 30, 2011 8:25 PM

    You need to supply the "Key Store Location", "Key Store Password", "Private Key Alias" and "Private Key Password' to use socketssl.
    Also please make sure that the content server has enabled "Use SSL". You can configure it using the enterprise manager.

  • Using resource bundler with a specific encoding type

    Hi All,
    Using resource bundler class in Java one can pass the key and get the appropriate string value for that in appropriate language. These strings can be stored in a class (BuldlerList) or in some file.
    My doubt is can I specify the encoding type of the string while passing the key ?
    This might be needed in a case like follows. Say I have a Java Swing application for which I want to get the labels in appropriate language. The application is Windows based. The methods in resource buldler class while getting the string value for a key uses platform's default encoding type. So if I store my file containing all the resource bundler in UTF-8 I can't read them properly from an Windows 2000 system having Japanese as the locale. The constraint is that you can never make Windows default platform encoding as UTF-8 (or something equivalent for Unicode). In that case one cannot developed a truly internationalised application in this frame work.
    Any comments/suggestion/input will be highly appreciated.
    Thanks,
    Sourav

    I dunno 'bout the bundles BUT u can possiblly use XML
    instead.
    u can have a attribute type that specifies the encoding
    type for the content. This will be a totally application
    specific approach BUT it will work.. that much I am sure
    of. IF u read this attribute in your application first and
    then read the value, in that pre-specified encoding, ur
    problem could be solved.
    Just like resource bundles, XML files will be stored in
    local machines only. The only thing is u need a
    JAXP API for processing them.
    aXe!

  • Character encoding in resource bundle files

    I am developing a multilingual site, using resource bundle files. The problem I'm having is that, while the jsp file is save in UTF-8, and the contentType="text/html; charset=UTF-8", the foreign characters in the bundle files don't display properly unless I save them as "windows-1252". If I copy the text and paste it into the jsp file, it displays correctly.
    How can I make the text from the bundle files display the same as the text in the jsp document itself when both files are saved as UTF-8? I'm surprised it doesn't do this by default.

    Because resource bundles (the PropertyResoureceBundle class in particular) doesn't know anything about JSP or HTML page encodings. All that class knows is that it needs to load a properties file from the local (server-side) file system. (BTW, if you are using Struts MessageResources, it works the same way). Anyway, it doesn't read the file every time you call for a resource property String, it reads it 1 time, and 1 time only when you call new ResourceBundle().
    The API docs (in java.util.Properties) specified that properties files are read using the ISO8895-1 encoding, actually, not the Windows-1252 or whatever the OS defines. So if you store text that's using a different encoding then ISO8895-1, it's going to read the chars incorrectly.
    native2ascii converts things to ASCII using Unicode escapes, as I said. (Although, maybe it saves as ISO8895-1, I forget..., or maybe you should specify the output encoding.... you'd have to read the docs on that tool, cuz there's no command-line help.) This is sort-of an exception to the ISO8895-1 thing, in a sense, as all ASCII chars are the same as the first 127 chars of ISO8895-1, so it doesn't matter really.
    So in short, it doesn't assume it's in the default Windows encoding, it assumes it's in ISO8895-1. But since the API docs specifically say so, you should abide by those rules.
    As for "getting around the problem", yes, it does, actually. See, whatever it reads in that Unicode escaped ASCII text is converted properly to Strings in Java, which are 16-bit Unicode characters, which cover nearly every character set around (English, Chinese, Japanese, Arabic, Cyrillic, etc). When it's in that form, the chars are the Unicode chars and that's it. That's all they need to be. Encodings are only important when writing (and reading back) to files or other byte streams. You have to read in with the same encoding it was written under, otherwise the conversion is not going to be correct (with a few exceptions, but not many).
    So that creates a Unicode String in Java, and when you write that to a JSP page or servlet, the output writer used knows from the content type you specified in the page declaration (UTF-8 is typically recommended because it's an efficent way to deal with Unicode chars, particularly in HTML, where most of the HTML tag content is still ASCII text), so it encodes the strings in that encoding.
    Get it?

  • Allowing EL expression in a resource bundles

    Mojarra 2.1.7-jbossorg-1 (20120227-1401)
    JBoss 7.1.1
    EL expressions in a resource bundle are currently not evaluated. That is, an an example, I have the following in the requiredMessage attribute of a JSF input control:
    requiredMessage="Status for #{someBean.documentMap[claimDocument.id].description} is required."I would like to move this to a messages.properties file like so:
    required.claimDocumentStatus=Status for #{someBean.documentMap[claimDocument.id].description} is required... so that the requiredMessage attribute becomes:
    requiredMessage="#{msg['required.claimDocumentStatus']}"Now the output for h:message(s) is
    Status for #{someBean.documentMap[claimDocument.id].description} is required.As I have found out, JSF resource bundles does not resolve EL expressions:
    http://stackoverflow.com/questions/6547136/el-variable-in-jsf-resourcebundle
    What I am trying to do is to allow such resolution / resolving to take place for JSF resource bundles. Now there is a class called "javax.el.ResourceBundleELResolver". I was wondering what it would take to extend this class to allow such a thing to take place. There does not seem to be a way to override it or to specify a custom resolver via faces-config.xml.
    Any thoughts ?
    Edited by: jmsjr on 14-Jan-2013 21:53

    jmsjr wrote:
    gimbal2 wrote:
    IMO this requirement, if it is possible to implement, is only going to lead to a hard to maintain application. But I guess that's something you have to experience before you believe it.
    You can't use EL directly in a resource bundle out of the box, but it is possible to parametrize them anyway, did you know that? Perhaps that is already good enough for you.
    http://murygin.wordpress.com/2010/04/23/parameter-substitution-in-resource-bundles/
    http://stackoverflow.com/questions/5697189/pass-parameters-to-messages-from-resource-bundle-to-components-other-than-hou
    Yes, I am aware of parameterising the resource bundles. However, these require you to use f:param .. and the last time I tried, these parameters were not available / visible at the requiredMessage attribute. I'll try it again anyway.As I have re-discovered, you cannot parameterise the requiredMessage attribute.
    http://stackoverflow.com/questions/9280915/how-to-parameterize-requiredmessage-attribute-in-composite-component
    The other alternative I am looking at, for the cases where the requiredMessage needs to be parameterised, or needs to have dynamic content, is to call a backing method for the requiredMessage attribute, from which I can then do whatever I need, even use EL expressions. I was thinking of this as a last resort.
    On the other hand, when one uses the validator attribute, usually one ends up adding one or multiple FacesMessage in code within the method being called, where the string of the message already comes from a resource bundle. I was trying to have a delineation whereby:
    1) requiredMessage should only use resource bundles, no backing bean method called.
    2) FacesMessages added via the method called by the validator attribute is OK

  • Locale Resource Bundle Best Practice

    Hi
    I have a Flex application that loads it's locale resource bundle from a service.
    So when the httpservice loads the bundle it populates an instance of a class "I18NBundle" that contains all the bundle properties. For instance you could do:
    i18nBundle.hello_message and it would return "Hello"
    I'm currently using Cairngorm for this project so this i18nBundle instance it's on the model locator.
    What I'm seeing and that I don't like is that for a component be able to get the bundle it must access to the model locator and then to the i18nBundle.
    Instead of that what I would like is that each component doesn't rely on this for getting the bundle.
    I guess I could create a "bundle" property on each component class and then pass it the reference to the bundle when it is instanciated. It seems it could be messy and a difficult task to initialize this property in some cases for instance on a datagrid cell renderer.
    Other could be transforming the I18NBundle class into a singleton and then when the service response it's recieved the singleton it's initialized. Since all application components should/must access the same locale bundle I guess this could be a better option.
    What do you think about this?
    Do you think there is some a better way to achieve this with Flex?
    Any opinion or recommendation would be appreciatted.
    (I don't wish to use the Adobe Flex proposal of having the properties file on the Flex project and the compiling them into swf.)
    thanks in advance.
    Polaco.
    ps: If you think I haven't expressed myself correctly please let me know and I will rewrite it.

    I have managed to extend IResourceBundle and added it to ResourceManager.
    The only problem now is that my bundle does not represent a language and it doesn't need a name either.
    Since the localization part is done on the webapplication and then the apporpiate bundle returned in the request's response.
    So it's locale attribute value is "".
    And it's name is "".
    I can display a property correctly if I use the following code:
    (resourceManager.getResourceBundle('','')).content.helloMessage
    but I doesn't work if I try to retrieve it like:
    resourceManager.getString("", "helloMessage");
    any ideas ?
    thanks

Maybe you are looking for

  • How can i check for virus in my macbook pro

    Hello every body is any one have a trouble shooting to open their cam automatically

  • I cannot make Robohelp 9 export epubs

    I have tried with very little succes all day making Robohelp 9 export to epub. I am running techcomm 3.5 full version on win 7/64 bit. I have opend a very small FrameMaker 10 book file with a front page, a toc and a 7 pages content file with some 7 o

  • How to use DCJMSReplyTo in JMS Receiver Adapter

    Hi, I was trying to send the message to TIBCO JMS dynamically to a queue name based on the value in the message. I followed the steps as in the SAP Note: 8563461 1) Set the queue name to DCJMSReplyTo in udf under the namespace "http://sap.com/xi/XI/S

  • Renaming and numbering files question

    Currently I like to bring my image files (named by the camera as something like IMG_4896,IMG_4897,IMG_4898,etc.) into the LR catalog, move the files into a Photo Collection folder, and rename them based on the date taken along with a sequence suffix,

  • Communication error in VC apps with SP21 of EP 7.0

    We are in the process of applying SP21 to our EP 7.0 SP16 landscape and have run into an issue with Visual Composer.  When we run a VC app, we now receive the following popup: Communication Error A communication error has occurred.  Could not retriev