Editing eclipse classpath file


While creating a project in Eclipse, by default it creates a .classpath file in the project directory. That file will be usedfor storing file names and other dependent files needed in the classpath to compile and execute the project successfully. Normally this file will be updated automatically when ever you update the project libraries here […]

Basic steps to configure Log4j using xml and properties file


This example demonstrated how to configure Log4j setup using the Properties file and XML file. These are the two most widely used techniques for configuring the Log4j for your application. But, in the recent days configuring with properties files are considered to be old technique and recommended using XML. This example program uses simple standalone […]

Batch insert in Hibernate


This example program shows how to insert multiple rows using the batch processing in hibernate. when there are thousand of rows to be persisted, everytime iterating and inserting will cause the memory problem. Hibernate stores all the persisted objects in the memory. To avoid this problem use batch processing in the hibernate. also read: Introduction […]

Hibernate basic configuration example


Hibernate Configuration This example demonstrates how to configure hibernate framework for running a simple standalone program. Here the sample program uses programmatic configuration to set all the properties required for running hibernate. Also the example uses derby as the database to connect and update the values. This is not the big change, you only have […]

Accessing Managed Bean methods programmatically in JSF 1.1


Access Managed Bean methods As we know JSF managed beans are mostly access only through the JSP pages are faces-config.xml.But, there is some schenarios where you will need information stored in the managed beans for the business logic in some other beans. JSF provides API to access those values where ever you want. also read: […]

How to use Managed Bean reference inside faces-config.xml?


Managed Bean in JSF can refer another managed bean inside the faces-config.xml. There is no restriction for the type of bean can be refered. But, JSF does not support the cyclic dependencies for Managed Bean reference. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF For example, you cannot refer […]

How to initialize List property in Managed Mean?


List property in Managed Mean JSF Managed Beans can initialize its List properties in the faces-config.xml. There is a property in the faces-config.xml as list-entries. This cane be used for initializing the values and can be accessed directly through the Managed Beans in any JSP pages. also read: Introduction to JSF JSF Interview Questions Request […]

Lists and Maps as Managed Beans in JSF


This tips explain how to use List and Map classes directly as Managed Beans. Here notice that you cannot use List and Map interfaces directly as Managed Beans, you can use only the implementations classes like ArrayList, Map, etc. There is no way to call constructor in the interfaces if you use List or Map […]

Publish and Subscribe messages using JMS Topic in JBoss Server


Publish and Subscribe using JMS Topic This tips gives overview on how to write Java Messaging Service(JMS) code for creating Topic in the Tomcat server. This is very basic example and only show how to get started instead of looking into the advanced concepts in JMS technology. also read: Java EE Tutorials Java EE 7 […]

How to use h:selectOneRadio inside h:dataTable in JSF?


h:selectOneRadio and h:dataTable This tips explains how to use the h:selectOneRadio tag inside h:dataTable iteration tag. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF Using h:selectOneRadio is not straight forward since JSF doesn’t provide easy mechanism for toggling the radio button selections. Programmer has to write the manual script […]