MissingResourceException using ResourceBundle

I'm developing an app based on the Duke's bank app in J2sdkee 1.3 Tutorial. I get the following IE 5.0 browser error when I try to access the "main" page.
A Servlet Exception Has Occurred
java.util.MissingResourceException: Can't find bundle for base name WebMessages, locale en_CA
     at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:712)
     at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:604)
     at java.util.ResourceBundle.getBundle(ResourceBundle.java:559)
     at lostfound.web.Dispatcher.doGet(Dispatcher.java:23)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
The code that raises the exception is the same as the Duke's bank code:
public class Dispatcher extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
ResourceBundle messages = (ResourceBundle)session.getAttribute("messages");
if (messages == null) {
Locale locale=request.getLocale();
messages = ResourceBundle.getBundle("WebMessages", locale);
session.setAttribute("messages", messages);
request.setAttribute("selectedScreen", request.getServletPath());
try {
request.getRequestDispatcher("/template.jsp").forward(request, response);
} catch(Exception ex) {
ex.printStackTrace();
When I created the war file in the j2sdkee 1.3 deploytool, I settings similar to Duke's bank's BankWAR. In my WAR file, I definitely added WebMessages.properties and WebMessages_es.properties, both of which are the same level as WEB-INF. Here I did notice a difference with Duke's bank's WAR settings. In the latter, WebMessages.properties and WebMessages_es.properties appear under WEB-INF/classes. I tried various methods (including drag-drop) but deploytool just wouldn't let me put my webmessage property files under WEB-INF/classes. Any ideas? By the way, how does the server know how to find text and property files anyway?

I am having the same problem. I am using ForteEE to
deploy a version of the bank as a j2ee app. If I just
deploy the web module node from forte to the tomcat
server, then the web-context paths are all picked up
correctly, however if I add the web module to a
j2ee app node in forte and try to deploy this to the
same web-context on the j2ee RI, all my relative urls
(including the one the Dispatcher class uses to pick
up the ResourceBundle) point do not work. I am digging
around to see if there is some deployment descripter
section that I am missing. Howerever, I think I might
file a bug against forte since this may get a faster
response. Please let me know if you resolved this.
Thanks,
Tom
I'm developing an app based on the Duke's bank app in
J2sdkee 1.3 Tutorial. I get the following IE 5.0
browser error when I try to access the "main" page.
A Servlet Exception Has Occurred
java.util.MissingResourceException: Can't find bundle
for base name WebMessages, locale en_CA
at
java.util.ResourceBundle.throwMissingResourceException
ResourceBundle.java:712)
at
java.util.ResourceBundle.getBundleImpl(ResourceBundle.
ava:604)
at
java.util.ResourceBundle.getBundle(ResourceBundle.java
559)
at
lostfound.web.Dispatcher.doGet(Dispatcher.java:23)
at
javax.servlet.http.HttpServlet.service(HttpServlet.jav
:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.jav
:853)
The code that raises the exception is the same as the
Duke's bank code:
public class Dispatcher extends HttpServlet {
public void doGet(HttpServletRequest request,
t, HttpServletResponse response) {
HttpSession session = request.getSession();
ResourceBundle messages =
ges =
(ResourceBundle)session.getAttribute("messages");
if (messages == null) {
Locale locale=request.getLocale();
messages =
ssages = ResourceBundle.getBundle("WebMessages",
locale);
session.setAttribute("messages", messages);
request.setAttribute("selectedScreen",
een", request.getServletPath());
try {
request.getRequestDispatcher("/template.jsp").forward(
equest, response);
} catch(Exception ex) {
ex.printStackTrace();
When I created the war file in the j2sdkee 1.3
deploytool, I settings similar to Duke's bank's
BankWAR. In my WAR file, I definitely added
WebMessages.properties and WebMessages_es.properties,
both of which are the same level as WEB-INF. Here I
did notice a difference with Duke's bank's WAR
settings. In the latter, WebMessages.properties and
WebMessages_es.properties appear under
WEB-INF/classes. I tried various methods (including
drag-drop) but deploytool just wouldn't let me put my
webmessage property files under WEB-INF/classes. Any
ideas? By the way, how does the server know how to
find text and property files anyway?

Similar Messages

  • Using ResourceBundle class

    Hi
    How to use ResourceBundle class for fetching data from properties file.
    Thanks & Regards
    Mallik

    it is explained in the java tutorial, here 's the url :
    http://java.sun.com/docs/books/tutorial/i18n/resbundle/propfile.html

  • How to use resourceBundle in Catalog Definition

    hi all,
    I am using wc11g, I need to use resourceBundle to display different title for different languages, according to the following doc:
    The name of the resource bundle to be used for obtaining translated attribute values, where <attribute.... isKey="true"/>. The resourceBundle attribute can also be used at lower levels in the document, such as on individual attributes elements. Refer to the XSD for further details.
    I defined resourceBundle in the following element level in DefaultGroupSpaceCatalog.xml,
    catalogDefinition,attributes,attribute, definition like this:
    <resource id="task-flow-definition_hotNews"
    repository="application.classpath"
    path="adflibWcSvcApp.jar/ADF_TaskFlow/WEB-INF+task-flow-definition_content.xml#task-flow-definition_hotNews">
    <attributes resourceBundle="com.uaes.portal.service.resource.UaesServiceBundle">
    <attribute value="TITLE.HOTNEWS" attributeId="Title" isKey="true" resourceBundle="com.uaes.portal.service.resource.UaesServiceBundle"/>
    <attribute value="DESC.HOTNEWS" attributeId="Description" isKey="true" resourceBundle="com.uaes.portal.service.resource.UaesServiceBundle"/>
    <attribute value="key" attributeId="Subject" isKey="false"/>
    <attribute value="hotnews" attributeId="WEBCENTER_SERVICE_ID" isKey="false"/>
    <attribute value="/adf/webcenter/events_qualifier.png" attributeId="IconURI"/>
    <attribute value="height:331px" attributeId="attr.contentStyle" isKey="false"/>
    </attributes>
    </resource>
    While what ever UaesServiceBundle_xx_xx.properties I put, catlalog composer does not recognize the title, just showed "TITLE.HOTNEWS".
    Noticed that a XTRS file should be used to generate .class, but how to do it?
    Best regards

    Wow, had hoped to get something!
    Anyway, what I ended up doing was to bundle the xsd/wsdl/generated java bindings into a jar that I included in the web server. Not the ideal solution when need to share between other services. However, no success any other way!

  • Getting String using ResourceBundle and XLIF resource bundle.

    Hello,
    I am using Jdev. 11.1.1.2.0. I am trying to use XLIFF resource bundle in the Model project and trying to get string from the bundle using following code. I am getting MissingResourceException. if I use Property Bundle, it works fine.
    public String getMessage(String code)
    return ResourceBundle.getBundle("model.ModelBundle").getString("MESSAGE1");
    Any help to make it work with XLIFF resource bundle will be appreciated.
    Thanks,
    Amit
    Edited by: Amit Patel on Apr 1, 2010 10:23 AM

    To get the values from the resource bundle, you use the <fmt:message> tag
    <fmt:message bundle="${appbundle}" key="lbl.accountnum"/>

  • Using ResourceBundle and Locale in an Applet

    hello,
    i worked out a little application to use with multilanguage support.
    i wrote two classes so i can start the application within a jar file located on my computer and anotherone to launch it as an applet...
    for development i use Eclipse; when i try to run it in eclipse everything works fine (although i limit the access of the applet!)
    when i try to run the applet in IE i get the error message:
    java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)i did not use the function "System.getProperty("user.dir")" in MY code which is referred!
    so i guess its one of the included packages:
    ResourceBundle | Locale
    how can i solve this problem as its working in the limited access applet in eclipse??
    thanks in advance

    note: i do load the .properties file from the JAR package, not from hdd!
    here is my code
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class Xlocale {
         private Locale locale = Locale.ENGLISH;
         private ResourceBundle thisLocaleRB;
         public Xlocale(String aXlocaleName, String aLocale) {
              setLocale(getLocale(aLocale)); //if you leave this line it won't work *hmm?*
              if (thisLocaleRB == null || getLocale() != thisLocaleRB.getLocale()) {
                   try {
                        thisLocaleRB = ResourceBundle.getBundle(aXlocaleName, getLocale());
                   } catch (Exception e) {
                        //System.err.println(e.getLocalizedMessage()+" ["+System.getProperty("user.dir")+"\\"+aXlocaleName+"_"+getLocale()+".properties]\n");
         public String getString(String key, String dv) {
              String val = thisLocaleRB.getString(key);
              if (val == null)
                   return dv;
              else
                   return val;
         public void setLocale(Locale l) {
              this.locale = l;
         public Locale getLocale() {
              return this.locale == null ? Locale.ENGLISH : locale;
        public static Locale getLocale(String loc)
            if(loc!=null && loc.length()>0)
                return new Locale(loc);
            else
                return Locale.ENGLISH;
    }

  • How to use ResourceBundle

    I have a piece of code which tries to read a property file like this:
    ResourceBundle bundleHandle = ResourceBundle.getBundle("Example");
    Here Example.properties is a file located in another directory which is dynamically constructed
    during deployment. So I don't want to put it within the package.
    My question is: Will the above code work? When running under debugger, this line always fails to
    find the Example.properties even it is there?
    Thanks you your help!

    Here Example.properties is a file located in another directory which is dynamically constructed The following should provide some examples.
         // Method: demonstratePropertyAbsolute()
         * Demonstrates how a property file is used via absolute naming
         * Because the file name starts with a forward slash this
         * will use an absolute path (in the context of the java application)
         private static final
              String MAIN_FILE_ABS = "/BlueGnome/demos/Properties/DemoPropertiesFile.properties";
         static void demonstratePropertyAbsolute() throws Exception
              aProperties = new Properties();
              // Demonstrate what the name is
              // Notice that we use the Properties for the the class
              // reference.  It does not matter what class we use.
              java.net.URL url = Properties.class.getResource(MAIN_FILE_ABS);
              System.out.println("Absolute: resolved name = " + url);
              // Get a stream so we can read it.
              java.io.InputStream is;
              is = Properties.class.getResourceAsStream(MAIN_FILE_ABS);
              if (is == null)
                   throw new Exception("Resource File "
                        + MAIN_FILE_ABS + " not found.");
              // Load the stream
              aProperties.load(is);
              System.out.println("  This is a value from the properties file"
                             + " name = <"
                             + aProperties.getProperty("a.value")
                             + ">");
         // Method: demonstratePropertyPath()
         * Demonstrates how a property file is used via path
         * The file name is basically a system file path (unlike the previous two)
         private static final
              String MAIN_FILE_PATH = "./BlueGnome/demos/Properties/DemoPropertiesFile.properties";
         static void demonstratePropertyPath() throws Exception
              aProperties = new Properties();
              // Demonstrate what the name is
              java.net.URL url = ClassLoader.getSystemClassLoader().getResource(MAIN_FILE_PATH);
              System.out.println("PATH: resolved name = " + url);
              // Get the file.
              // We could just use FileInputStream here.  Then we would have
              // to provide a path that was meaningful to the system like
              //     c:\java\BlueGnome\demos\Properties\DemoPropertiesFile.properties
              // Doing it this way allows us to use generic directory
              // seperators and allows for it to search for the file using
              // the CLASSPATH.  That also allows for it to be in a jar file.
              java.io.InputStream is;
              is = ClassLoader.getSystemClassLoader().getResourceAsStream(MAIN_FILE_PATH);
              if (is == null)
                   throw new Exception("Resource File "
                        + MAIN_FILE_PATH + " not found.");
              aProperties.load(is);
              System.out.println("  This is a value from the properties file"
                             + " name = <"
                             + aProperties.getProperty("a.value")
                             + ">");
         }

  • Use resourceBundle properties file from KM

    Hi,
    I have a properties file called com.mycomp.apps.phonebook.properties in the KM Content of the portal in KM Content => root => mycomp => apps => phonebook => customizing
    Now I'm developing a new LinkCommand service for the UserDetails.
    http://help.sap.com/saphelp_nw04/helpdata/en/65/29b24053c13f5fe10000000a155106/frameset.htm
    The already existing LinkCommand "Send E-mail..." is read from the original resourceBundle com.sap.ip.collaboration.gwui.api.wdf.mail.SendTo
    For my new LinkCommand I would like to use the existing properties file. How do I have to define this file in the uicommand xml or properties xml sheet?
    Can anybody help me?
    With the local project resourceBundle it's working, but I would like to use the file in the KM. Andy ideas?
    Regards,
    Stefan

    Hi Praven,
    Copying all existing SendTo properties file to my project would be an option but I wouldn't win anything.
    I'm quite happy with the existing SAP collaboraton properties files using e.g. for "Send e-mail".
    I won't change this existing ones. I created a new LinkCommand. And for this new LinkCommand I'm looking for a solution how I can handle the translation for it.
    I would prefer e using my existing file which is located in the KM. The reason why it's located in the KM is, if I need to change a translation or add a new translation properties file I only need to change it in the KM. If it's a part of the project I need by every change to deploy the project new.

  • How can I use ResourceBundle's property file in Chinese

    Hi,
    I want to internationalize my web application using utils's ResourceBundle I created property files for each languages. The problem is I can't retrieve the Chinese word from the bundle and tit get changed.
    messageBundle.properties
    Hello = &#25105;&#20204;&#27426;&#36814;&#24744;&#26469;While displaying it in JSP page it shows
    æ&#136;&#145;们欢è¿&#142;æ&#130;¨æ¥ Is there any conversion needed. If it is so Where I have to convert whether in JSP page or in property file

    Properties files are defined to be in the ISO-8859-1 encoding (long story, stupid decision, never was changed).
    All characters that can't be represented in ISO-8859-1 (which includes all chinese Unicode glyphs) have to be represented by Unicode escapes (i.e. "\uXXXX", where xxxx is the Unicode codepoint of the character you want to represent in hexadecimal).
    You can either
    1.) get an editor that understands the properties file format and writes it correctly or
    2.) Use the native2ascii tool to convert your properties files into the correct format

  • Can you use ResourceBundle with resrouce that are grouped within folders?

    Hi I'm trying to internationalize my program by using the java ResrouceBundle.
    Is there a way to use it with resources that have been grouped into folders?
    For example, instead of using locale to specify the resource name as MessageBundle_en_US.properties, I would like to specify the locale name as the resource folder name like this:
    resources_en_US/MessageBundle.properties
    or resources_fr_FR/MessageBundle.properties etc.
    Is there something already available for this in the API that i'm not aware of or, if possible, is there a way to overwrite the ResrouceBundle package to handle this?

    Hi Simon,
    Yes, I understand people would expect it to work on the emulator too, but the point of Scout is really to provide you information about the real performance (on the device and in production) to be really accurate and reflect the reality.
    Having it work with the emulator would always be an approximation, which could still maybe be valuable, but we thought we would focus on production code.
    But thanks for bringing this up, it is valuable feedback about your experience.
    Thibault Imbert
    Sr. Product Manager | Adobe Scout

  • Should I use ResourceBundle for this?

    I have an app that displays some static data (Earthquakes in California from 1970 to 1980). Right now this data in the form of an ASCII CSV file is read in using a hard coded location /javaprojects/EQ/data/CA.1970-1980.txt.
    I am wondering if Resource bundle is a better way to do this. Any suggestions? I am assuming that the app and the data will eventually be put in a jar for distribution, in which case should I do something different?
    Thanks

    ResourceBundles are used to handle localization issues which isn't what you described.
    You asked for any suggestions so here's one. Since the data is never going to change you could consider creating a class to access its contents and put the data right in the code. Something like this:
    public class EarthquakeData {
      static List data = new ArrayList();
      double mag;
      Date when;
      String where;
      public EarthquakeData(double mag, Date when, String where) {
        this.mag = mag;
        // and so on
      public double getMagnitude() {
        return mag;
    // then load the data right into the program statically:
      static {
        data.add(new EarthquakeData(4.5, new Date("June 2 1977"), "Los Angeles");
    }This example uses a List. You might want an array or Map or whatever.

  • How to create SAP RAR file using NWDS 7.31: ResourceBundle issue

    Hello everybody,
    I successfully create SAP JCA Connector project for .java / .class files.
    When I try to use ResourceBundle in connector project, it isn't exported to JAR / RAR / EAR files.
    What should I do?
    The only builders are:
    * org.eclipse.jdt.core.javabuilder
    * org.eclipse.wst.common.project.facet.core.builder
    * org.eclipse.wst.validation.validationbuilder
    When I try to export connector project to SAP RAR file, I can switch between binary-only or binary with sources, not any checkbox for *.properties.
    Thank you in advance for any point.

    Here patching info.
    Source getting script:
    echo off
    set JN=com.sap.ide.j2ee.servicelayer_1.0.1.140801063136.jar
    set JAR=C:\NWDSsp12.p3\plugins\%JN%
    set FERN=C:\sap\fernflower.jar
    set UNZIP="C:\Program Files\7-Zip\7z.exe"
    java -jar %FERN% %JAR%  .
    mkdir src\com\sap\ide\j2ee\servicelayer\archive
    %UNZIP% x %JN% com\sap\ide\j2ee\servicelayer\archive\BuildRar*java
    move com\sap\ide\j2ee\servicelayer\archive\BuildRar*java src\com\sap\ide\j2ee\servicelayer\archive\
    rmdir /s/q com
    echo **************************************************************************
    echo *                                                                        *
    echo *                                                                        *
    echo *                                                                        *
    echo * Now fix BuildRar.createArchiveDescriptorForProjectWithPattern() method *
    echo * look for "if(sAddJavaFiles)" condition                                *
    echo *                                                                        *
    echo * if (sAddJavaFiles)                            =: if (true)            *
    echo * IPattern javaPattern = Pattern.getPattern(2); =: .getPattern(3)        *
    echo *                                                                        *
    echo **************************************************************************
    pause
    Classpath file:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.jobs_3.4.100.v20090429-1800.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.resources_3.5.2.R35x_v20091203-1235.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_3.5.0.v20090525.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.servicelayer_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.ra_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.extensionpoints_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.util_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.web_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.tssap.util.core_2.0.0.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.tssap.util.trace_1.0.0.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.tssap.tools_2.0.0.140801063136/lib/com.tssap.tools_api.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.core_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.eclipse.jarsap_2.0.0.140801063136/lib/com.sap.ide.eclipse.jarsap_api.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ear_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.client_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ejb_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.client_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.cmpejb_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.core_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.ear_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.ejb_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ext.web_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.adapter.ra_1.0.1.140801063136.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ide.j2ee.ui_1.0.1.140801073130.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.tssap.util.sdk.ui_2.0.0.140801063136/lib/com.tssap.util.sdk.ui_api.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jdt.core_3.5.2.v_981_R35x.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jst.j2ee_1.1.302.v201004131604.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jem.workbench_2.0.201.v200911302230.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jem.util_2.0.201.v201001252130.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench_3.5.2.M20100113-0800.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jst.j2ee.core_1.1.301.v200911302230.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface_3.5.2.M20100120-0800.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ltk.core.refactoring_3.5.0.v20090513-2000.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.wst.common.modulecore_1.1.301.v201001252130.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.wst.common.project.facet.core_1.4.1.v200911141735.jar"/>
    <classpathentry kind="output" path="bin"/>
    </classpath>
    Patching:
    @echo off
    set JN=com.sap.ide.j2ee.servicelayer_1.0.1.140801063136.jar
    set JAR=C:\NWDSsp12.p3\plugins\%JN%
    set ZIP="C:\Program Files\7-Zip\7z.exe"
    set BLD=bin\com\sap\ide\j2ee\servicelayer\archive
    copy/b %JAR% .
    cd bin && %ZIP% a ..\%JN% com\sap\ide\j2ee\servicelayer\archive\*class
    echo **************************************************************************
    echo * Now replace:
    echo * %JAR%
    echo * with with .\%JN%
    echo **************************************************************************
    pause
    Attached: some scripts and project files.
    Also see NWDS_PatchRAR at google disc.

  • - Use of ResourceBundle without Locales

    Hello!
    I'm trying to use a ResourceBundle to store properties that arn't locale-specific - its a sort of look-and-feel type arrangement. The way more specific ResourceBundles inherit properties from more general ones would be really useful, but since its not a locale that's used to pick a particular bundle I'm having trouble working out how I can use it for this purpose.
    Has anybody used ResourceBundles for non-locale specific uses before, or does anyone know of anything else that might be more appropriate?
    Thanks loads for any help!!
    Nicola

    Hello!
    I'm trying to use a ResourceBundle to store properties
    that arn't locale-specific - its a sort of
    look-and-feel type arrangement. The way more specific
    ResourceBundles inherit properties from more general
    ones would be really useful, but since its not a
    locale that's used to pick a particular bundle I'm
    having trouble working out how I can use it for this
    purpose.
    Has anybody used ResourceBundles for non-locale
    specific uses before, or does anyone know of anything
    else that might be more appropriate?
    Thanks loads for any help!!
    NicolaYes, you make up your own Locales with anything you want in place of the language, country, and variant. As long as you're not setting the Locale, it works great!
    ResourceBundle laf = new ResourceBundle.getBundle("skins.properties", new Locale("flavor", "chocolate",""));will get all resources in skins.properties and over-riding entries from skins_flavor_chocolate.properties".

  • Query in reg the use of ResourceBundle and Properties in my webapplicatiom.

    I have property file which have some values. I use ResourceBundle to get values by passing the key to getString method. But the problem for me is that my webapplication is running in tomcat server. When i add a new value in property file i could not get that value. I want know which method is used to reload the property file which has changed without restarting my tomcatserver.
    Regards
    Richard

    Question 1: Yes I have done this.
    Question 2: Yes, but you would need to configure you DHCP server to hand out the additional option 150 address.
    Question 3: Yes the .xml files for phones will be.  The default firmware will be as well. If you upgraded firmware from the default you will need to upload it on that server as well.
    Question 4 :If the TFTP server does not respond, the IP phone falls back to the last
    used configuration stored in NVRAM. 

  • How to realize czech texts with ResourceBundles

    Hi!
    I have got a big problem trying to make one of our german applications available in czech.
    We are using ResourceBundles with .properties files for our texts and have now translated them into czech. When loading the bundle by calling:
    ResourceBundle rb = ResourceBundle.getBundle("x.x.x.BundleName", locale);all seems to work and there is no exception thrown.
    But when i try to get any text out of it i.e. by calling:
    rb.getString("name");i get an exception:
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key name
    I tryied to use native2ascii with several encodings (Cp1252, ISO-8859-1, ISO-8859-2, UTF-8, UTF-16, ...) but i never got one that realy works the way i want. Most of the encodings i tryied changes some of the special characters in the file but also left some of them so that i can get some translated texts but most of them with boxes or question symbols within. native2ascii with UTF-8 encoding only answers with a sun.io.MalformedInputException in the comand line. UTF-16 initially looked fine cause nearly all special characters was translated into \uXXXX escape sequences but also there i got a problem with one special character: � (hope it will be displayed correctly here). This character seems to annoy the native2ascii tool cause the following characters would also be translated into escape sequences even if this is not necessary. Also i got some question symbols in the GUI again (having the charset in the HTML/JSP file set to UTF-16).
    I don't know why the original translated property file could not be read in getting an exception only when trying to get a text not when loading the file. Another thing confusing me is that all encodings (except UTF-16) that i tryied for the translated file corrupted the file by seperating each character with a blank one (so i.e. name = jm�no appered as n a m e = j m \u00e9 n o).
    Some of the special characters in the translation are: � � � � � (and also some other characters with those symbols).
    Please can anyone help me or does anyone has experiences with translating a (web) project to czech or any similar/related language.
    Thanks a lot
    Juergen

    You also seem to have a problem with using native2ascii. You say that you tried to use it with Cp1252, ISO-8859-1 (among others), but how can you possibly have a Czech file in those code pages? They don't support the Czech characters set. You simply need to know which source code page your file is actually in, and then run native2ascii on the file specifying that encoding. I have never had a problem executing native2ascii on a Czech file, it seems to work just fine - as long as the correct source encoding is used.

  • How to use a config file?

    People,
    i have a basic question. How to extract the contents from a ".config" file?
    I have a config file with few sections and few global variables defined.
    how to extract these data; or how to use this file?
    a sample .config file, that i have is,
    # global variables
    pageTitle = "Main Menu"
    bodyBgColor = #000000
    tableBgColor = #000000
    rowBgColor = #00ff00
    [Customer]
    pageTitle = "Customer Info"
    [Login]
    pageTitle = "Login"
    focus = "username"
    Intro = """This is a value that spans more
    than one line. you must enclose
                   it in triple quotes."""
    # hidden section
    [.Database]
    host=my.domain.com
    db=ADDRESSBOOK
    user=php-user
    pass=foobar
    How would i extract these data; or how to utilize this file first of all?
    - Kumar
    [ [email protected] ]

    Hi Kumar,
    Instead of .config file you can use .properties file. Place the configuration part in that file. Use ResourceBundle class. This class have methods like getResourceString(String key) which reads the .properties file and returns a String as it's Value. I normally use the same. I have written one class for it. C if you can use it. The keys are case sensitive. initialize is a directory in which i am keeping my Config.properties file.
    import java.util.*;
    import java.text.*;
    import java.net.*;
    import javax.swing.*;
    public class ReadConfig
    public static ResourceBundle resources;
    * This is responsible for getting data from Config.properties for setting properties externally.
    static
    try
    resources = ResourceBundle.getBundle("initialize.Config", Locale.getDefault());
    catch (MissingResourceException mre)
    JOptionPane.showMessageDialog(new JFrame(), "initialize/Config.properties not found.\n Please report it to administrator.");
    System.err.println("initialize/Config.properties not found");
    System.exit(1);
    }//static
    public ReadConfig()
    System.out.println(getResourceString("DatabaseName"));
    System.out.println(getResourceString("JDBCDriver"));
    System.out.println(getResourceString("DSN"));
    System.out.println(getResourceString("ConnectionString"));
    }//constructor
    public String[] tokenize(String input)
    Vector v = new Vector();
    StringTokenizer t = new StringTokenizer(input);
    String cmd[];
    while (t.hasMoreTokens())
    v.addElement(t.nextToken());
    cmd = new String[v.size()];
    for (int i = 0; i < cmd.length; i++)
    cmd[i] = (String) v.elementAt(i);
    return cmd;
    * A method takes string as parameter and reference of ResourceBundle.
    * It is used with <b>Resources Bundle</b> i.e. with .properties file.
    * When value of particular string from .properties file has to retrive.
    public String getResourceString(String nm, ResourceBundle resources)
    String str;
    try
    str = resources.getString(nm);
    catch (MissingResourceException mre)
    str = null;
    return str;
    * A method takes string as parameter. It is used with <b>Resources Bundle
    * </b> i.e. with .properties file. When value of particular string from .properties
    * file has to retrive.
    public static String getResourceString(String nm)
    String str;
    try
    str = resources.getString(nm.trim());
    catch (MissingResourceException mre)
    str = null;
    return str;
    }//getResourceString(String nm)
    * This method takes string as parameter and returns corresponding <b>URL</b>.
    * If key is <b>null</b>, then will return <b>null</b>.
    public URL getResource(String key)
    String name = getResourceString(key);
    if (name != null)
    URL url = this.getClass().getResource(name);
    return url;
         return null;
    }//getResource(String key)
    public static void main(String[] args)
    new ReadConfig();
    }//main
    }//class
    Hope this will be helpful to you.
    Kind Regards
    Sandeep

Maybe you are looking for

  • RE: What's database field are used in crystal report file?

    Hi all Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail sectio

  • STO from Depot to Plant

    Hi stock transfer has done from plant to depot, now the same stocks have to be returned from depot to plant, now whether stock transfer has to be done or returns process has to be done? If stock transfer has to be done how to capture excise i.e after

  • Excise distibute in Batch wise

    Dear MM Gurus, One of my client required Excise distributed in Batch wise. Eg. At the Time GR they select only capture excise invoice & Material qty. is 1500 Kgs. They took Batch externally for 500 kgs each batch. at down side they required all heade

  • Slow memory card raw import speed (~20MB/s with USB3.0)?

    Hi all, For a long time now, I have been experiencing painfully slow (copy) import speed from memory cards to Lightroom. For example, importing a fast CF card full of Canon 1D mark4 raw (cr2) photos yields a raw transfer speed of about 18 MB/s . This

  • Mail account that will not be removed

    I have installed work mail on my phone. it created profiles that can not be removed and now the mail can not be remved too. what do i do?