Use of CatalogTools property file

Hi All,
When we can configure everything about a repository in it's properties file, what is the use of CatalogTools.properties file iin ATG.
Please give us the brief description.
Thanks,
Kushal.

CatalogTools.properties defines the component that is used to access the properties of your catalog.
It points to a class which contains the functions for access methods for the catalog properties.
Ideally all the methods which directly communicate with your catalog should be in this component.
As the ATG commerce programming guide describes it - "The tools component that performs low-level operations on the catalog repository"
Prakhar

Similar Messages

  • 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 = 我们欢迎您来While displaying it in JSP page it shows
    我们欢迎您来 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

  • Validation Using a MessageResources Class Instead of a Property File

    We have a WL 8.1 portal application that performs XML-based validation as described here:
    http://e-docs.bea.com/workshop/docs81/doc/en/core/index.html
    It works fine. Each jpf specifies the validation error messages like this:
    * @jpf:message-resources resources="Validation.Validations"
    This pulls the error messages from the Validations.properties file, as expected.
    We'd like to move the validation error messages out of the property file and into the WL content store.
    Has anyone successfully done something similar with a portal application?
    I've done some research and there are a number of examples that show how to do this with a Struts application. For example, the DBMessageResources looks like a step in the right direction.
    http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=49385
    Modifying those files to produce ContentMessageResourcesFactory and ContentMessageResources gives us access the WL content store.
    The piece that I'm missing is this:
    How can we get the XML-based validation to get its messages using ContentMessageResources rather than the property files specified by the @jpf:message-resources annotation?
    According to the documentation (and just to show that I made an attempt to read the fine manual), both the @jpf:message-resources annotation and the netui-data:declareBundle tag can be used to reference property files. I'm looking for instructions on getting XML-based validation to use a MessageResources class, instead.

    Problem solved. Here's the solution in case someone else has a similar question in the future.
    I added the following to strutsValidator-merge-config.xml and confirmed that constructors for both ContentMessageResources and ContentMessageResourcesFactory are called when the application is accessed for the first time.
    <message-resources
    factory="com.carlson.lss.common.util.ContentMessageResourcesFactory"
    key="org.apache.struts.action.MESSAGE"
    parameter="300"/>
    Using a key of "org.apache.struts.action.MESSAGE" is critical to making this work. I found that tidbit here:
    http://forums.bea.com/bea/click.jspa?searchID=600352721&messageID=600044412
    I removed the @jpf:message-resources annotation but left the following annotation in the JPF:
    * @jpf:controller nested="true" struts-merge="/WEB-INF/strutsValidator-merge-config.xml"
    Triggering a validation error results in calls to the getMessage method in the ContentMessageResources class.
    W^5 (which was what we wanted)

  • How to use/read a property in a WSDL file?

    Hello list,
    Does anybody know how to use a property (e.g. myapp.host.name) in a WSDL file to dynamically switch between a certain host through the use of a property file?
    My property file would look like this:
    myapp.host.name=<some-ip-address-or-dns>
    myapp.host.port=1234
    I would save this property file as myapp.properties.
    In a WSDL file that I receive from a 3rd-party I want to remove the hardcoded hostname and replace it with my property. For instance, something like this:
    <port binding="tns:DoSomething" name="DoSomething">
        <soap address location="http://abcdks02:1234/avb_xsd/start.edw?MySource=WebService></soap:address>
    </port>{code}
    should be replaced by this:
    {code}<port binding="tns:DoSomething" name="DoSomething">
        <soap address location="http://${myapp.host.name}:${myapp.host.port}/avb_xsd/start.edw?MySource=WebService></soap:address>
    </port>Is there a fast, efficient and clean way to do this? I do not want to use maven2 filtering, because that forces a new re-deployment every time you change the value of the property. I also want to avoid Spring, because we're trying to get rid of Spring in our project.
    What else can I use? I am sure there is a fast and efficient way to do this.
    Any help is appreciated!
    Thanks,
    Gian

    Hi biblio,
    I have used the method you have mentioned to change the target end point. And that was successful. Thank you. Apart from this I have another issue. I want my web service read some database related values from properties file only when the web service is deployed. Currently the java application read the database related values in a static block. I have made this java application to a web service. I am new to java and thought of there may be something like ServletContextListener where I can read properties file. This allows me to read properties file only when the web application is deployed.

  • UTF-8 encoded property files with RessourceBundle

    Hello everybody!
    Is there a way to force RessourceBundle to use a specific kind of encoding for the property files I've defined?
    I plan to encode the property files for my application using UTF-8. This will avoid problems, when e.g. the labels for some buttons will get names in Spanish, German, Frensh etc..
    Problem: the class RessourceBundle seems to use an InputStream and not a Reader. Therefore I have problems forcing the encoding UTF-8 used in my property files.
    Is there any solution to this?
    Kind regards and thank's for your response,
    Marcus.

    Hi Marcus,
    You should be able to do what you're trying. Instead of backing your resource bundle with properties files, use a ListResourceBundle and back it with the corresponding class files. Create your *.java files in UTF8 and use the -encoding UTF8 argument to javac. Any *.java files you've previously created in ASCII will compile correctly using -encoding UTF8 (one of the nice features of UTF8).
    see here: http://java.sun.com/docs/books/tutorial/i18n/resbundle/list.html
    Also, see the following 1.4 Java docs for internationalization:
    start here: http://java.sun.com/j2se/1.4/docs/guide/intl/index.html
    and follow links, especially the link to the internationalization tutorial:
    http://java.sun.com/docs/books/tutorial/i18n/index.html
    to the encoding document:
    http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html
    and the link to the internationalization FAQ
    http://java.sun.com/j2se/1.4/docs/guide/intl/faq.html
    regards,
    Joe

  • Best practice for property file

    I am trying one small code which uses values from property file.
    public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, java.io.IOException
          InputStream inputStream = servletContext.getResourceAsStream(/WEB-INF/test.properties);
          PrintWriter out         = response.getWriter();
           Properties prop = new Properties();
           prop.load(inputStream);
           inputStream.close();
          String nameprop = prop.getProperty("name");
          out.println(nameprop);
       }I am getting the value from property file, It's perfectly ok as far as test code is concerned. Above will open the inputStream for each thread, which is not needed so i modified it and put in inside init() method. That is also working, i believe this will give me some better performance.
    But can i extend it further? I load property file at application level and all my servlets make use of it?
    What is normal practice to read property file to get good performance? I serached forum, i found some info there but could not figure out exactly how people are doing it.
    Thanks in advance,
    regards
    Manisha

    Thanks to all posters,
    As mentioned by duffymo, I tried some code which i tested on my m/c and working fine. But just want to confirm, what i understood and wrote is correct.
    I wrote 1st servlet to get the property file and store into servlet context, 2nd servlet is just to test it.
    1st Servlet:
    package common;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class TestPropertyfiles_1 extends HttpServlet
    public void init(ServletConfig config) throws ServletException
       super.init(config);
       try{
            String PF_PATH = "/WEB-INF/test.properties";
            Properties prop = new Properties();
                            InputStream inputStream = config.getServletContext().getResourceAsStream(PF_PATH);
           prop.load(inputStream);
           inputStream.close();
           getServletContext().setAttribute("pf", prop);
       }catch(Exception e){}
    public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, java.io.IOException
            PrintWriter out         = response.getWriter();
            Properties tmpprop = (Properties) getServletContext().getAttribute("pf");
            String nameprop = tmpprop.getProperty("name");     
                out.println("name from property file" + nameprop);     
    }2nd servlet:
    package common;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class TestPropertyfiles_2 extends HttpServlet
         public void init(ServletConfig config) throws ServletException
            super.init(config);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, java.io.IOException
            PrintWriter out         = response.getWriter();
            Properties tmpprop = (Properties) getServletContext().getAttribute("pf");
            String nameprop = tmpprop.getProperty("name");
                            out.println("name from property file - no 2" + nameprop);
    }This was initially giving problem if I access 2nd servlet first before accessing 1st servlet. I did some changes inside web.xml
    <servlet>
    <servlet-name>common.TestPropertyfiles_1</servlet-name>
    <servlet-class>common.TestPropertyfiles_1</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    And then all was ok.
    One thing came to my mind. I can have one common servlet just for all initialisation, this will not have any doGet/doPost.
    regards
    Manisha

  • Problem set parameters of PS (queries stored on a property file)

    I am wrinting a small jsp application and storing the queries that it will use in a property file. Some fields on the main form are optional. How I can "build" the query correctly (leaving out the conditions that weren't filled in the form)?
    I know it is trivial when you have the query on the page or class, but I can't think of a solution to keep storing the "dynamic" queries on a property file.
    Any ideais?

    I wanted to store all queries on the same file.
    I don't need to retrive the query, I already have it but based on the user decisions it will change. Consider a form with 3 fields: name, id and number, all of them are optional. If the user fills all fields the query will be:
    "SELECT id, nm, number
    FROM a_table
    WHERE id = 10
    AND nm = 'foo'
    AND num = '843'
    ORDER BY nm
    If the user fills only the "name" field the query will be:
    "SELECT id, nm, number
    FROM a_table
    AND nm = 'foo
    ORDER BY nm
    As I said in my first post, it is trivial to this when storing the query on a jsp page or class file, but is it possible to with a property file?
    thank you.

  • How to use an equal sign as a part of the value in a property file

    say I have this line in a properties file:
    args = -Xms512m -Xmx512m -XX:MaxPermSize=256m
    obviously I can't use the (=) as is. What should I do to make it work?
    I tried to use \= and \:, but it doesn't work as well.
    thanks.

    A property file contains "key" lines or "key=value" lines the '=' character loses its special meaning after a key is read so you can use '=' characters in the 'value' part of a property.
    kind regards,
    Jos

  • How to use property file - sql query define in property file

    Hi All,
    Anybody please tell me how to use property file.
    I have placed sql query in propery file and I have to access this in my file.
    well so far this is my code but don't know how to implement in the following ...
    pstmt = con.prepareStatement("select * from registration where username=?");
    instead of writting the query I want to use the property file.
    so far I have developed the following code...
    FileInputStream fis = new FileInputStream("querysql.property");
    Properties dbProp = new Properties();
    dbProp.load(fis);is the code correct... or is there another way to access property file
    Please help.
    please reply soon....
    Thanks

    Before answering, check if it's already been done here http://www.jguru.com/forums/view.jsp?EID=1304182

  • [svn:bz-trunk] 17010: Bug: Watson #2652870 - use a property file to drive the custom configuration tokens as opposed to setting it in the command line

    Revision: 17010
    Revision: 17010
    Author:   [email protected]
    Date:     2010-07-22 02:52:41 -0700 (Thu, 22 Jul 2010)
    Log Message:
    Bug: Watson #2652870 - use a property file to drive the custom configuration tokens as opposed to setting it in the command line
    QA: Yes
    Doc: Yes - in custom tokens section, talk about the new token.file option
    Checkintests: Pass
    Details: Changed TokenReplacer to look for a token.file JVM option. If it's specified (eg. -Dtoken.file=/User/matamel/Desktop/token.properties), then TokenReplacer looks for a properties file where token name and values are specified. This allows someone to specify a file for custom tokens. Custom tokens can still be specified as straight JVM option and in case where a token is defined both as a JVM option and in a token properties file, JVM option takes precedence.
    Modified Paths:
        blazeds/trunk/modules/common/src/flex/messaging/config/TokenReplacer.java

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • How to know if a property file that I use in my program is updated

    Hi everyone,
    I was wondering how my program can know as soon as the property file/any file that I'm intersted in, has been updated at runtime. Something like JBoss descriptor etc, as soon as we make a change the app server knows of that change ?
    I need this technique for updateing my static variables in memory as soon as there was a manual change to any properties at runtime.
    Any help will be appreciated.
    Thanks,
    - Liju P.Oommen.

    One way to do it would be to wrap the process used to update the property file itself. For example if you provided a GUI that people used to change the properties and this GUI also notified your program when the properties changed you could maintain consistency.

  • Using Property files in Apache Axis

    Hi guys...
    I have done a lot of search, but i cant figure out where to place the property files in Axis Application..
    I deployed my web service application as a JAR file in lib directory of Axis.. everything is working fine.. now i want to add property files and wanna use ResourceBundle..
    anyone has any idea where should I place my Property files?
    Thanks in advance..

    anyone??

  • How to use h:message to display HTML code in message from property file

    I am using <h:message for="somecomponentid"/> to display the error message for a validator attached to a component and the error message which resides in message property file contains HTML elements like <br> and
    The HTML doesnt get displayed properly and the code <br> etc is displayed instead.
    Is there a method to get h:message to display HTML elements correcly.
    [I know there is an h:outputFormat which has an escape parameter to allow HTML to be rendered correcly but it has no for parameter to specify the component id whose validation error message I want to display]
    eg.
    <h:message for="somecomponentid"/>
    to display from errormessages.properties
    com.somecompany.thevalidationerrormessage=You have an error<br> Please click here to return to homepage

    Hello Ivan,
    Fortunately I have just recently found a solution to my problem by using code by a developer who had already had this problem in the past and who provided a patch on the Apache MyFaces jira site.
    See following link for the solution I downloaded and then used :
    http://issues.apache.org/jira/browse/MYFACES-155
    I believe they are intending to eventually release this in a future release of MyFaces extensions on this site.
    I used the escape attribute on the tag to allow 'escaped' html code in error messages to be used.
    Hope it solves your problem too..
    Suhel

  • Where to put property files used by XSLT extensions?

    Still fighting with Java XSLT extensions. I have narrowed the
    problem down: my XSLT extension cannot find its property file,
    which I use to store JDBC connect strings etc.
    What is the proper directory to put this file so the XSLT
    extension class can find it? I am using Oracle HTTP Server with
    XDK 9.0.

    Thanks for the answer, Steve!
    Depends on what call you're using in your extension function to
    read your properties.Maybe I tried a too simplistic approach. I'm just using this:
    Properties props = new Properties();
    try {
    props.load(new FileInputStream("/foo.properties"));
    etc.
    This (with the slash) works if the properties file is in the root
    directory of the filesystem, but it's a kludge.
    If you read your properties as a resource using
    getResourceAsStream(), then where the classloader expects to
    find your file depends on the resource name that you specify.So maybe I should use getResourceAsStream() then? What if I put
    the properties file inside the JAR with the extension classes?
    Or is there any way to reference the web root?
    --Jere

  • Error Reading Property File in Portal Component

    Hello,
    I have created a portal component that calls an api that is located in a jar file.  The documentation on the Portal Component Structure specifies putting the jar file in the PORTAL-INF/lib directory, which I have done.  The problem is, my jar file reads a property file using ResourceBundle, but it doesn't find the property file.  I have placed the property file in the jar file, and throughout the portal component structure, but it just can't find it.  Has anyone else done something similar?  If so, where did you put your property file(s) for external jars that are used in the portal component.
    EP6 SP2 Patch27
    thanks,
    Keith

    Hi,
    I had similar issues and moved the property files to PORTAL-INF/classes.
    Best Regards
    Frank

Maybe you are looking for

  • PC Suite 6.86.0 No Connections listed

    Hi All, I was using PC Suite 6.85 with an N80 phone on a Bluetooth connection until two days ago, when I received a message that an update of PC Suite 6.86.9 was available. I downloaded this and installed it. Since then I am unable to use the combina

  • Unit Test Framework for 8.6

    Hi all, Do we have Unit Test Framework Toolkit for LabVIEW 8.6? We have unit Test Framework Toolkit for LabVIEW 8.6.1(Uit Test Framework Toolkit 1.0) Thanks, Suresh Kumar.G

  • Add new field in detail table control MIGO

    Hi Gurus, We are able add the new(custom) field in MSEG table and it is able to view at line item lebel in transaction MIGO. However the user requirement is he need the field shoud be in detail table control. Could you please help me out. Thanks in a

  • Command Line and Resource Manager

    When using the command line to compile a Robohelp project, is there a way to update the shared resources within the project before generation? For example, say you have Project1 and it is using snippet1 in that project. However, snippet1 has been mod

  • How to purchase? Pay-per-use?

    We've developed an application with our free $15 a month developer account, and we're planning to use it in a big webcast event next week. There will be over 1000 contributer in the event so, we'd like to purchase more credits. But we couldn't find h