Xlf files Vs constant class

Hi
There are xlf files which we use for internationalization of application.
All displayed text elements are kept in these xlf files and key values corresponding to text elements are used in jsp.
Now, suppose we do not have need for internationalization, but still we can maintain these xlf files because they give us centralized location to keep all text constants.
But, having said above statement what benefit this approach will give me, if I choose it ahead of maintaining a constant class in java ?
Please comment.
Thanking you in anticipation.

Is there an extra overhead when you are using java classes because every time you make changes in them, they need to be compiled first and then deployed in server.
But in case of xlf files no compilation is done !
There has to be another good reason on when to use java class and when to use xlf file ?

Similar Messages

  • ANT task to process properties-files into static class

    Hi,
    I think this problem is very interesting. I have a web application that needs various configuration. I'm using a properties file that is loaded into a Properties-class.
    The problem arrises when runtime exceptions are thrown (NullPointerException) by using:
    String value = props.getProperty("myProp");
    (In this case the entry "myProp" is not available.)
    The solution would be to process the properties file and put all keys and values into a class with public static attributes:
    class Props {
    public static String myProp = "123";
    This processing should be done with ANT! It shall create a JAVA file before the general compilation task. This would be great and runtime exceptions concerning a lack of propertie-keys are extinguished forever.
    Is there any tool for ANT that helps?
    Thanks in advance.

    Personally, I would not like it - I can't compile even parts of my code without running Ant to build the whole thing? Second, I do not want my build tool to alter or add any source files.
    IMO, you should instead simply go and check for null values before using them. I'd regard these NPEs rather as programming flaws - you already pointed out that their value may be null, so not checking is just wrong.
    Lastly, maybe you can create a tool yourself - generating a code like this is highly trivial. you only have to keep in mind that development will be a PITA because an IDE with incremental compile will always fail with compilation errors as long as it doesn't create that constants class Ant's supposed to create.
    Oh, and why not ask Ant-related questions in an Ant forum?

  • Com.sap.portal.directory.Constants Class

    Hi,
    I can not find a jar file containing the Constants Class of com.sap.portal.directory.
    Does anybody know in what application and jar file it is contained?
    And if someone has the coresponding jar file to send it to: [email protected]
    Best Regards

    Hi
    I have sent the required jar file to ur emailid.
    Regards
    (Rewards points if it helps)

  • File with constants declared?

    How do I create a file with some constants declared? Do I have to make a class out of them? Then, how do I import the file into other classes?

    Here's what I have:
    interface ConvertTypes
         public static final int IDC = 1,MDS = 2, IDC_AND_MDS = 3;
    class ctest implements ConvertTypes
         public static void main(String[] args)
              System.out.println(IDC);
    Here's the error I get after I compile ConvertTypes and ctest:
    Z:\ctest.java:1: cannot resolve symbol
    symbol : class ConvertTypes
    location: class ctest
    class ctest implements ConvertTypes
    ^
    Z:\\ctest.java:5: cannot resolve symbol
    symbol : variable IDC
    location: class ctest
              System.out.println(IDC);

  • Read out properties generated by XLF files

    Dear community,
    I have a problem reading out property files generated by Web Dynpros XLS (S2X-Editor). What I have to do is generate a printer-friendly version  of my Web Dynpro views to enable users to get a printable report.
    Now my problem is reading out the property-files generated by Web Dynpro with a java utility class.
    I think my attempt fails, because those property files for each view follow a naming convertion, which is like this:
    com.mypackage.mysubpackage.MyViewName.wdview_<Locale>.properties
    so when I try to access those property files with a call like
          Locale sessionLocale = WDResourceHandler.getCurrentSessionLocale();
          ResourceBundle resourceHandler = ResourceBundle.getBundle("com.mypackage.mysubpackage.MyViewName.wdview",sessionLocale);
    I guess the resourceHandler thinks "wdview" is the name of my resource and tries to resolve this name to a propery file such as wdview_de.properties.
    Am I missing something? Did anyone experience a similar behaviour or knows a working work-around?
    My SAP-solution would be to duplicate code (...) which is no fun and a real pain when application texts are changed on later development stages...
    Thanks for your support!
    regards,
    Christian

    Hi,
    found the solution myself, so here is my insight:
    The view-specific property-files generated by the XLF-files can not be accessed by Java as the  ResourceBundle.getBundle(...) method replaces all dots in the name of the Resource file according to this:
    It generates a path name from the candidate bundle name by replacing all "." characters with "/" and appending the string ".properties".
    (see SUN Java API docs [ResourceBundle|http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html])
    Thing is the generated property-files of the views get merged into property files for the component. So if your component sports 12 views with one xlf-  and property-file each, there is gonna be one big property-file for the whole component, that resides in your wdp folder.
    Accessing this file is pretty straight-forward, the naming is like "Resource" + <Name of Component> +".properties".
    Maybe someone else struggles with WDJ and needs this.
    regards,
    Christian
    Edited by: Christian Henn on Jan 17, 2008 6:01 PM
    Edited by: Christian Henn on Jan 18, 2008 11:06 AM

  • How to load a Jar file in the class path?

    How to load a Jar file which contains class files, images, etc.. in the classpath without using URLClassLoader.

    You don't "load" jars. If it's on the classpath, you can obtain individual resources from it using various methods on either Class or ClassLoader. Do you mean "how to add a jar to the classpath at runtime"? Can't be done without using a classloader, typically URLClassLoader or a subclass thereof. Why you want to not use the proven method is beyond me. Presumably because you don't understand classloading. In which case, forget it.

  • How can i use JWSDP1.6 from Ant tool to convert .wsdl file into Java class

    Hi All,
    i m very new in the development field.plese help me...
    i have a .wsdl file and i have to make some modification in the file and return this file with build file used in Ant tool.
    means my requirement is to conver the .wsdl file into java class,modify it and convert back to wsdl file.how can i do it using JWSDP1.6 and Ant tool.
    thanks in advance...
    Vikram Singh

    lemilanais wrote:
    hello!
    I have developpe an animation with flash. before give it to othe person in order to use it, i would like to secure it by integrated a security module inside the software.Secure it from what? Being played? Copied? Deleted? Modified?
    Because, i am a java developper, i have choose Netbeans 6.1 to secure it.That has to be the most random thing I've read in some time.
    do you know how can i do to integrate my animation .swf inside my java class?Java can't play SWF files and Flash can't handle Java classes, so what you're suggesting here doesn't make a lot of sense.

  • Error in opening a xlf file

    Hi,
    I am having a problem opening xlf documents.
    The error message I get is "Invalid version found 1.1.0.2. Xcelsius expects version 1.1.0.1.".
    I am using Xcelsius XL Standard / File version 1.1.0.1 / Application version 4.0.4.7.
    Those xlf documents were created by some colleagues of mine who are using professional version. Is there any limitation on that?
    How can I open these files?
    Thank you.

    Hi David,
    Xcelsius expects version 1.1.0.1, while Crystal Xcelsius expects version 1.1.0.2.
    It looks like you are using Xcelsius version 4.0 to open xlf files that your colleagues made using Crystal Xcelsius version 4.5.  As such, what you are seeing expected. 
    My only suggestion would be to upgrade to version 4.5 so that you can view the models your colleagues are producing.

  • Error while using .jar file instead of class file.

    Hello friends,
    I created a java class which are referred and called from other jsp\xml and java files. I compiled this java class and everything is working properly. However, I do not want to use class files but want to use jar files instead. So, I created a jar file of this class file by using the command "jar -cvf jarfilename.jar".I kept the jar file in its respective folder .Also, I removed the class file from its path, just to see that the jar file will work automatically.
    Unfortunately, I am getting an error:
    java.lang.RuntimeException: Component.createComponent(...) Component class not found: <java class path>. I also tried giving the path of this jar file in the classpath. This also does not seem working.
    How to solve this problem?
    Thanks,
    Ranjith M.V
    Edited by: RanjithM.V on May 11, 2008 10:34 PM

    You probably populated the jar file incorrectly.
    A common mistake is to include the path that you had on the classpath, in the jar file.
    So a person will have a classpath like this: /foo/
    And a class in a package bar, like this:
    package bar;So that other classes would include the file like this:
    import bar.TheClass;And the class file is on the filesystem like this:
    .../foo/bar/TheClass.classThen they'll create the jar file including the foo directory, so if they list the jar's contents, they'll see the above (/foo/bar/TheClass.class). But this is wrong. It should start off so that the jar entries start with the top-level package names (like /bar/TheClass.class).
    Maybe you've done that.

  • Help needed in URM German translation override with XLF file translation

    I have a problem in URM 11.1.1.3 German translation override through a custom component.
    I have a OOTB German context localization ww_strings.xlf file present in <oracle middleware home>/ucm/idc/components/Localization/lang/de in URM with a translation entry as
    <trans-unit id="wwWarehouse@002frm">
    <source>Warehouse</source>
    <target>Warehouse</target>
    </trans-unit>
    The Warehouse storage type name is referring to the key 'wwWarehouse' and so i see 'Warehouse' as name in the storage pages.
    when i am overriding this entry key using a custom component with the following entry it does not work and the original translation is shown in the page.
    <@de.wwWarehouse=Archiv@>
    I have checked that the loadOrder is not the issue here and issue is the presence of @002frm keyword.The entry <@de.wwWarehouse@002frm=Archiv@> also does not work
    Any Idea how can i override the translation key.
    Any help would be greatly appreciated.
    Thanks
    Ayaskant

    Are you trying to translate a BI report, or the string in the web interface?
    I have to ask first:
    - Have you enabled the German locale for Content Server?
    - In your user profile, have you selected German?
    Assuming both answers are yes...
    I wouldn't worry about the XLF/XLIFF file if you are changing the caption in a report - provided the caption can even be translated in the report. URM does some black-magic translation for "certain" select strings in reports. Not sure "Warehouse" is one of them, though.
    I'd avoid trying the <@lang_code.string@> route -- sometimes it works, sometimes not. In your custom component, create a folder structure like "resources/lang/de/ww_strings.htm", and put <@wwWarehouse=Archiv@> in that file.

  • Unable to view PDF files -application server class CL_GUI_PDFVIEWER- open_d

    Hi
    I have PDF files in application server and trying to display the PDF files by using class CL_GUI_PDFVIEWER->open_document but i am unable to view the pdf files.
    Please let us know any other alternative way to view the PDF files via application server.
    Regards
    G

    Hi,
    steps tu visualize PDF files from app server via html_viewer:
    1. Upload PDF file to table type x255. (using for ecampo FM SCMS_UPLOAD)
    2. Create container (TYPE REF TO cl_gui_custom_container),
        create html_viewer (TYPE REF TO cl_gui_html_viewer).
    3. Load data from ypur xsting table to url:
      CALL METHOD html_viewer->load_data
        EXPORTING
          TYPE                = 'application'
          SUBTYPE           = 'pdf'
         IMPORTING
           assigned_url     = url
        CHANGING
          data_table          =  data_pdf.  "line type x255
    4. Show data from url:
      CALL METHOD html_viewer->show_data
        EXPORTING
          url                    = url.
    Regards,
    MaryM

  • Error in File name or class name not found during Automation operation: 'CreateObj​ect'

    Hello Team,
    When I am trying to execute the below code i am getting the following error. Any help would be greatly appreciated.
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    If Not oFSO.FolderExists(SavePath) Then
    Set f = oFSO.CreateFolder(SavePath)
    Else
    End If
    53 4/11/2014 12:27:22 PM Error:
    Error in <NoName(4).VBS> (Line: 9, Column: 1):
    File name or class name not found during Automation operation: 'CreateObject'
    I have googled through the error and tried to re-register the scrrun.dll using regsvr32 eventhogh it is successfully registered, i am getting the following error. My PC is windows 7 32bit OS.
    any help is greatly appreciated.

    The following script class will write a log file entry. See if it will run for you.
    The script is using a class object that you might not have seen before. A little intro:  The top section is just for testing the class. Normally I just comment this out after the class is working well.  It should run right way. I would save the vbs file in the editor, That way when you are using autoactpath or currentscriptpath variables they will be able resolve the paths.
    Paul
    Attachments:
    LoggingCode_V2.VBS ‏5 KB

  • How to create a exe file of a .class file

    how to create a .exe file for windows .class file of java
    please answer this so that i can complete the project to be submited to collage

    There is a program called JET. Is enables you to create .exe files of .class files.
    This is the URL:
    http://www.excelsior-usa.com/jet.html
    Succes
    --=tReShR=--

  • Why java file name and class name are equal

    could u explain why java file name and class name are equal in java

    The relevant section of the JLS (?7.6):
    When packages are stored in a file system (?7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    When packages are stored in a database (?7.2.2), the host system must not impose such restrictions. In practice, many programmers choose to put each class or interface type in its own compilation unit, whether or not it is public or is referred to by code in other compilation units.

  • How to change translation text in XLF file without re deploying?

    Hi All,
    I want to change the translation text of WebDynpro application without using NWDS. The application is already deployed in Production. Is there any way to change the translation text directly from the server (without changing the message in XLF file through NWDS) and re deploying the applicaion?
    Thanks,
    Shilpa.
    Edited by: Shilpa KG on Aug 2, 2010 6:05 AM

    Hi All,
    I want to change the translation text of WebDynpro application without using NWDS. The application is already deployed in Production. Is there any way to change the translation text directly from the server (without changing the message in XLF file through NWDS) and re deploying the applicaion?
    Thanks,
    Shilpa.
    Edited by: Shilpa KG on Aug 2, 2010 6:05 AM

Maybe you are looking for

  • Passing Values to Child Forms

    I have a parent summary form. When the user presses a button, it pops up a detail form for the user to edit/fill in. How do I pass the initial values from the parent form to the child form and back? Where can I find an example of this?

  • IPhone SDK on PPC

    Hi, I am fully aware that the iPhone SDK is NOT supported on PowerPC based macs. I have read several tutorials on how to make it work (including http://3by9.com/85/), but I have found something quite annoying. All of the tutorials refer to a package

  • Can IREP can be utlized to "DEPLOY" web services in 11.5.10

    Hi IREP is a wonderful repository of all service endpoints or say compilation of all integrations for Ebiz suite. From R12 onwards it even helps deploy web services. But I can't seem to understand how in R11.5.10 could IREP help to deploy a web servi

  • Tablespace shrink.

    hi i m using oracle database 10gR2 one of my database size is 13GB and out of that used size is only 4GB. HWM has already reached to the end of datafile so i m unable to shrink the database upto 4GB(used space) General solution to this problem is to

  • Crossdomain.xml on non-port 80

    Help! I have an application that MUST go on a non-port 80 web server. Port 80 is used by an embedded security device and can't be altered. Regardless, the application must be served from a different port for other security reasons. I can't put a cros