• Posts Tagged ‘Java’

    Executing private methods in Java

    by  • April 21, 2012 • Java • 0 Comments

    Normally, private methods in a class are not visible to other classes and cannot be executed. However, through reflection, which enables dynamic retrieval of classes and data structures by name, you can still access and execute private methods in another class. Consider the following class, which defines a public method called getValue1 and a...

    Read more →

    Resolving NoClassDefFoundError Errors in WebSphere ear Files

    by  • January 9, 2012 • Java, WebSphere • 0 Comments

    In some odd cases, the ear file that you have deployed to WebSphere may at some point throw a java.lang.NoClassDefFoundError runtime error even though you are certain that the ear file contains all the proper jar files and they are located in all the right places. For instance: java.lang.NoClassDefFoundError: org.apache.woden.resolver.URIResolver This problem may be...

    Read more →

    Use Global properties Files in WebSphere

    by  • January 9, 2012 • Java, WebSphere • 0 Comments

    There are certain cases where you need to use a properties file (ResourceBundle) that can be used in one or more WebSphere Enterprise Applications. One example would be to allow the Application Manager to manage and control properties such as database passwords or other sensitive information that should not come bundled inside various ear/war/jar...

    Read more →

    Bulk Update of DB Password in Crystal Reports

    by  • October 4, 2011 • Crystal Reports, Java • 0 Comments

    If you need to update the database password for large amount of Crystal Reports, the Crystal Management Console may be too time consuming to change the password for each individual report. A programmatic approach may be more helpful, in that case. On the Crystal Reports server, reports and other objects such as paths, are...

    Read more →

    Using Servlet filters in Java web applications

    by  • June 17, 2011 • HTML, Java • 0 Comments

    As of the Java Servlet specification version 2.3, a component type, called a filter, can be used in your Java web applications. A filter dynamically intercepts requests and responses and is most often used to transform the information contained in the requests and responses. One good example of a filter is an XSLT transformation...

    Read more →

    A complete AJAX example

    by  • June 16, 2011 • HTML, Javascript, JSP • 0 Comments

    There are several third party libraries that simplify the programming that is needed to make your web pages communicate with the server more dynamically, and without doing complete page reloads. However, some of you may be interested in knowing how exactly AJAX functionality can be added to your web sites and without involving any...

    Read more →

    Java Programming Tips

    by  • June 14, 2011 • Java • 0 Comments

    Tip #1 – Avoid NullPointerException situations When comparing strings against specific values in Java, you can easily avoid the java.lang.NullPointerException problem by specifying the string constant as the first value, and the variable as the parameter. Consider next typical situation: When you swap the constant “John” with the variable firstName, you won’t need to...

    Read more →