Include all the spring application jar for MVC and for sqlite sqlite-jdbc-3.7.2.jar Note : helloPage.jsp need some amendments to list and iterate the results from controller. /** * SqlLite_CURD.java */ package sample; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; /** * @author PraveenKumar * */ public class SqlLite_CURD { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //getConnection(); // create(); //populateData(); listAllValues(); } public static Connection getConnection(){ Connection connection=null; try{ Class.forName("org.sqlite.JDBC"); connection=DriverManager.getConnection("jdbc:sqlite:D:/Praveen/sw/SQL_LITE/test.db"); //String sql="SELECT name FROM sqlite_master WHERE type='table' ...
Difference between Model 1 and Model 2 architecture: Features of MVC1: Html or jsp files are used to code the presentation. To retrieve the data JavaBean can be used. In mvc1 archictecture all the view, control elements are implemented using Servlets or Jsp. In MVC1 there is tight coupling between page and model as data access is usually done using Custom tag or through java bean call. Features of MVC2: The MVC2 architecture removes the page centric property of MVC1 architecture by separating Presentation, control logic and the application state. In MVC2 architecture there is only one controller which receives all the request for the application and is responsible for taking appropriate action in response to each request. Struts framework provides three key components: A request handler provided by the application developer that is used to mapped to a particular URI. A response handler which is used to...
Comments