Tuesday, November 25, 2008

Creating simple web project using maven

we can use mvn archetype:generate command to generate java web appication using maven. Afterthat,
cd testweb
mvn idea:idea

useful link:
http://books.sonatype.com/maven-book/reference/web.html

Friday, November 14, 2008

JSF (JavaServer Faces)

JavaServer Faces technology simplifies building user interfaces for JavaServer applications.
JavaServer Faces technology includes:

* A set of APIs for representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility.
* A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page.

Links:
http://java.sun.com/javaee/javaserverfaces/overview.html
http://en.wikipedia.org/wiki/JavaServer_Faces

log4j

This is the way of using log4j in java.

import org.apache.log4j.Logger;

private static Logger log = Logger.getLogger(ExternalAdvertiserAccountAssembler.class);

if (log.isDebugEnabled()) {
log.debug("User [id:"+ currentUser.getId() + "] is authorized to set the Trusted state.");
}

Links:
http://logging.apache.org/log4j/1.2/index.html