|
|
|
Spring3 And Hibernate 4 |
Step 10: Create and start HSQLDB database
To configure and run HSQLDB follow this link
Create table EMPLOYEE_DTL
CREATE CACHED TABLE PUBLIC.EMPLOYEE_DTL(EMP_ID INTEGER PRIMARY KEY,FIRST_NM VARCHAR(15),LAST_NM VARCHAR(15),DT_OF_BIRTH DATE,HIRE_DATE DATE)
Create sequence CREATE SEQUENCE employee_seq START WITH 1 INCREMENT BY 1 NO CYCLE;
Create test data
EMP_ID FIRST_NM LAST_NM DT_OF_BIRTH HIRE_DATE
------ -------- ------- ----------- ----------
1 Donald Duck 1976-01-02 2009-08-12
2 Micky Mouse 1976-01-02 2008-08-12
3 Pluto Dog 1990-05-06 2008-08-12
7 Bat Man 1990-05-06 2009-08-12
8 Bat Man 1990-05-06 2009-08-12
To run it in Tomcat follow this link
Now launch employee maintenance page
URL http://localhost:8080/Spring3/employee/list
Mapped in web.xml and @RequestMapping
Click on insert button. URL http://localhost:8080/Spring3/employee/insert
Mapped in web.xml and @RequestMapping
Click on update button. URL http://localhost:8080/Spring3/employee/update
Mapped in web.xml and @RequestMapping
Click on delete button. URL http://localhost:8080/Spring3/employee/delete
Mapped in web.xml and @RequestMapping
View logs in TOMCAT/bin/logs/spring3app.log
Following section describes various errors you may encounter while using this tutorial
org.apache.jasper.JasperException:
According to TLD or attribute directive in tag file, attribute items does not accept any expressions
Resolution : Check <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> line in your JSP. It should be
uri="http://java.sun.com/jsp/jstl/core" and not uri="http://java.sun.com/jstl/core"
org.apache.jasper.JasperException:
The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or
the jar files deployed with this application
Resolution : If you are running it in Tomcat check standard.jar and jstl.jar is either available in applications /WEB-INF/lib/ directory
or put it in TOMCAT classpath.
org.apache.jasper.JasperException:
org.hibernate.util.JDBCExceptionReporter: logExceptions():
Cannot create PoolableConnectionFactory (java.net.ConnectException: Connection refused: connect)
Resolution : Check HSQLDB is up and running and see port, db name are correct in springapp-servlet.xml
java.lang.ClassNotFoundException:
Resolution : Check all jars mentioned on page 1 are in /WEB-INF/lib folder
Request processing failed; nested exception is org.springframework.validation.BindException
rejected value []
Resolution : Pass true to CustomDateEditor : binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
|
|
|
| How to loop arraylist JAVA6 Syntax
|
| How to iterrate through ArrayList and display multiple rows using for loop JAVA6 syntax..
|
| Java JSP |
2010-Oct-12 |
| How to loop arraylist
|
| How to iterrate through ArrayList and display multiple rows using for loop, JSTL tags..
|
| Java JSP |
2010-Oct-12 |
| Consumer using JAX WS Dispatch API and DOM parser 1
|
| Access/Consume Webservice using Servlet, JAX-WS Dispatch API dynamic client and parsing SOAP response using DOM parser...
|
| Java Webservice |
2010-Sep-20 |
| Simple Java first CXF Webservice 4
|
| Building Simple Java first CXF webservice using CXFServlet, Spring, jaxws:endpoint, @WebService, @SOAPBinding, @WebResult
|
| Java Webservice |
2010-Sep-19 |
| Simple Java first CXF Webservice 3
|
| Building Simple Java first CXF webservice using CXFServlet, Spring, jaxws:endpoint, @WebService, @SOAPBinding, @WebResult
|
| Java Webservice |
2010-Sep-18 |
| Simple Java first CXF Webservice 1
|
| Building Simple Java first CXF webservice using CXFServlet, Spring, jaxws:endpoint, @WebService, @SOAPBinding, @WebResult
|
| Java Webservice |
2010-Sep-18 |
| Simple Java first CXF Webservice 2
|
| Building Simple Java first CXF webservice using CXFServlet, Spring, jaxws:endpoint, @WebService, @SOAPBinding, @WebResult
|
| Java Webservice |
2010-Sep-18 |
| Encoding special characters in userinput or on server
|
| Encoding can be done either in Javascript or JAVA encodeURIComponent, escape, java.net.URLEncoder..
|
| Java JSP |
2010-Aug-09 |
| Jstl fmt tag i18n formatdate formatcurrency
|
| fmt:setBundle, native2ascii.exe, fmt:message, fmt:setLocale, fmt:formatDate, fmt:formatNumber type=currency..
|
| Java JSP |
2010-Aug-05 |
| How to read and write a file
|
| How to read and write a file java.io.BufferedReader,java.io.FileReader, InputStreamReader ...
|
| Java J2SE |
2010-Aug-04 |
| jQuery validate form using ajax 2
|
| How to validate/submit form using ajax and jQuery input#, ($.ajax)..
|
| Javascript |
2010-Jul-23 |
| jQuery validate form using ajax 1
|
| How to validate/submit form using ajax and jQuery ($.ajax)..
|
| Javascript |
2010-Jul-23 |
| How to create datasource in RAD Websphere
|
| Create JDBC provider, datasource and JAAS security setup, JDBC connection URLs
|
| Servers Websphere |
2010-Jul-08 |
| Get Started 4
|
| Struts2 framework structure, how various components fit together
|
| Java Struts2 |
2010-Jul-07 |
| How to populate a form when JSP is called first time
|
| This is achieved throught setting bean in request, using frameworks like Struts2, Spring3..
|
| Java JSP |
2010-Jul-07 |
| Spring3 And Hibernate 4
|
| Spring3 and Hibernate 3.5.3 working together @Controller, @RequestMapping, @InitBinder, HibernateTransactionManager, LocalSessionFactoryBean, HibernateTemplate
|
| Java Spring |
2010-Jul-07 |
|
|