Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
I have modified an example to make it even more easier for newbeis like me to get into Hibernate (for dummies :P )
First download the example
http://chulian1819.googlepages.com/sample1.war
Open "hibernate.cfg.xml" in "java resources" and configure your DB conection, and this project to your EAR,
create the table using "table.sql" for ORACLE, chek "serverConfig.JPG" to set properly your server configuration
and run on server the file "AddContact.jsp"
this uses struts so if you want to add or change things you also have to modify "struts-config.xml" on WEB-INF folder
Code:
CREATE TABLE "CONTACT"
( "ID" VARCHAR2(4000 BYTE) NOT NULL ENABLE,
"FIRSTNAME" VARCHAR2(4000 BYTE),
"LASTNAME" VARCHAR2(4000 BYTE),
"EMAIL" VARCHAR2(4000 BYTE),
CONSTRAINT "CONTACT_PK" PRIMARY KEY ("ID") ENABLE
) ;
Remember to put this libraries in ur lib folder
Code:
antlr.jar
cglib.jar
asm.jar
asm-attrs.jars
commons-collections.jar
commons-logging.jar
hibernate3.jar
jta.jar
dom4j.jar
log4j.jar
its made for WSAD 5.1 (websphere) on a ORACLE database
if you can make the example even more easier or has changes like conections to other DB or working on other IDE (JBoss, Eclipse, etc ), plz post it and share it
hope it works