Posts

Showing posts from January, 2013

Struts 1.x Vs Struts 2.x

Struts 2.x is very simple as compared to struts 1.x, few of its excelent features are: 1. Servlet Dependency: Actions in Struts1 have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse objects are passed to the execute method when an Action is invoked but in case of Struts 2, Actions are not container dependent because they are made simple POJOs. In struts 2, the servlet contexts are represented as simple Maps which allows actions to be tested in isolation. Struts 2 Actions can access the original request and response, if required. However, other architectural elements reduce or eliminate the need to access the HttpServetRequest or HttpServletResponse directly. 2. Action classes Programming the abstract classes instead of interfaces is one of design issues of struts1 framework that has been resolved in the struts 2 framework. Struts1 Action classes needs to extend framework dependent abstract base class. But in case of Struts 2 Act

STRUTS2HIBERNATE2 ONE TO MANY ANNOTAION MAPPING

1.postgres sql query create database as student -- Table: result -- DROP TABLE result; CREATE TABLE result ( resultid bigserial NOT NULL, semester character varying(250) NOT NULL, mark character varying(250) NOT NULL, result_student_id integer, CONSTRAINT resultid PRIMARY KEY (resultid ) ) WITH ( OIDS=FALSE ); ALTER TABLE result OWNER TO postgres; -- Table: studentdetails -- DROP TABLE studentdetails; CREATE TABLE studentdetails ( studentid bigserial NOT NULL, studentname character varying(250) NOT NULL, studentgender character varying(250) NOT NULL, studentclass character varying(250) NOT NULL, studentdivision character varying(250) NOT NULL, CONSTRAINT studentid PRIMARY KEY (studentid ) ) WITH ( OIDS=FALSE ); ALTER TABLE studentdetails OWNER TO postgres; 2. web.xml <?xml version="1.0" encoding="UTF-8"?> <web-ap