Monthly Archives: October 2007

Straight to the Log4j (1)

Installation   The current version could be downloaded from http://logging.apache.org/log4j/   If you are using Maven for your project            <dependency>                   <groupId>log4j</groupId>                   <artifactId>log4j</artifactId>                   <version>1.2.14</version>            </dependency>   Configuration   Log4j looks for a file named log4j.xml and … Continue reading

Posted in Java Utilities | 9 Comments

Struts (work with basic coding)

Struts Tags       As mentioned earlier, to apply struts tag in the page, you got to declare the following line  <%@ taglib prefix="s" uri="/struts-tags" %>   Resource links <link href="<s:url value="/css/tutorial.css"/>"   rel="stylesheet" type="text/css"/>   Direct links <li><a href="<s:url action="Register"/>">Register</a></li>   … Continue reading

Posted in Struts | Leave a comment

Introduction to Sitemesh

Why Sitemesh The easiest possible solution is to let each of your web applications create plain HTML content without knowing about how it is being decorated, and only then have something else choose and apply appropriate decorators. This is precisely … Continue reading

Posted in Style Control | 2 Comments

Create new connection as SYSDBA with Oracle

Create new connection as SYSDBA   Create and delete user     Grant privileges You grant user privileges either by system or object GRANT system_privileges TO username GRANT system_privileges ON objectname TO username   Create database for user as SYSDBA … Continue reading

Posted in Database | Leave a comment

Struts (Start with Maven Jetty + Eclipse)

Create maven structure Using the following command to create the structure:   mvn archetype:create -DgroupId=hongliang.com.firstHibernate  -DartifactId=strutsApp -DarchetypeGroupId=org.apache.struts  -DarchetypeArtifactId=struts2-archetype-starter -DarchetypeVersion=2.0.5-SNAPSHOT -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository   http://maven.apache.org/plugins/maven-archetype-plugin/usage.html   Go to the project directory and input command mvn eclipse:eclipse Build the project to Eclipse Import the … Continue reading

Posted in Struts | Leave a comment

Introduction to Hibernate 1

Persistence and Hibernate Persistent means stored in some kind of non-volatile storage medium, so typically on a disk. The idea is that turning off the machine doesn’t result in your data being lost although persistence alone doesn’t cover recovery or … Continue reading

Posted in Hibernate | Leave a comment

C2 Using Maven (Cont.)

Using AxisTool plug-in Create a folder to hold the WSDL.  Create another two folders within it to hold the artifacts that will be generated for client and server side respectively. Create pom.xml for each folder including the parent folder. (The … Continue reading

Posted in Maven | 1 Comment