Skip to main content

Posts

Spring MVC With Hibernate Example, Hibernate and Spring MVC Tutorials

Step1st:- Create Table:- CREATE TABLE Employee(    EMPID   INT NOT NULL AUTO_INCREMENT,    EMPNAME VARCHAR(20) NOT NULL,    EMPAGE  INT NOT NULL,    SALARY BIGINT NOT NULL,    ADDRESS VARCHAR(20) NOT NULL    PRIMARY KEY (ID) ); Step2nd:-  Create hibernate.cfg.xml Step3rd:-  Add Jar File under lib folder Step4th:-  Create Dispatcher servlet and add it into web.xml step5h:-Create EmployeeBean.java public class EmployeeBean {  private Integer id;  private String name;  private Integer age;  private Long salary;  private String address;  public Long getSalary() {   return salary;  }  public void setSalary(Long salary) {   this.salary = salary;  }  public Integer getId() {   return id;  }  public void setId(Integer id) {   this.id = id;  }  public String getName() {   return nam...

.NET Introduction,What is .NET? Scope of .NET

.NET is a common technology  and it support multiple framework that is used to create a different type of application using multiple programming languages . . NET is not a programming language , It provides a platform to compile and execute many programming languages including C#, VB, J#, F#, C++, etc. .NET was developed by Microsoft to enhance the VB6.VB language was platform-dependent and it is only for a desktop application. .NET was created to develop a desktop and web-based application that can easily work on intranet (LAN) and internet-based applications. .NET means network enable technology. now .NET supports 90+ programming languages using a single framework hence .NET is also called multilanguage technology. Type of application of .NET:- 1) Standalone application or Desktop application:-  This type of application will be installed separately for each machine and it works individually for each PC. 1.1)  Windows Forms Application: -  for normal desktop applica...

Job Opening for freshers on Java, QA, Angular and Python Developer on Infosys and many MNC Company

 Job Opening for freshers on Java, QA, Angular, and Python Developer:- Infosys company is hiring freshers candidate, many more companies are hiring right now, I have posted many Job post with the references of company JD, Linkedin Post Please view all posts and apply them.                                                                         Hello Sir/Ma'am, This is to inform you regarding our requirement for freshers in our company Oak Tree Software Pvt. Ltd.Since I have connected with you as many candidates have arrived recently to our organization for a walk-in drive for java developers who have learned from your institutes. We are having a walk-in drive in our organization this week  Date - 11th,12th 13th  Time -  01:30 PM Venue-   Location-Shekhar Central,  P...

Job alert for Java, Python, PHP, Angular and NET Profile

 Job alert for Java, Python, PHP, Angular, and NET Profile:-                              

Lambda Expression In Java, What is forEach() in java

 Lambda Expression In Java:- .................................................................................................................................................................. What is a lambda expression? It is a new feature of Java 8 that is used to define the method in a concise pattern. Lambda function uses an anonymous method to block to define functionality. if we want to implement the features under the method of interface or abstract class then we can use a lambda expression. Syntax of a lambda expression? ()->{ Expression } 1) Example of Lambda Expression without return type method package com.scs; interface A {     public void fun(); } interface B {     public  int fun1(); } public class LamdaExpression {     public static void main(String[] args) {         A obj = () -> {                 System.out.println("Lambda Expression A");        ...

Spring MVC With Hibernate Example, Database connectivity in Spring MVC + Hibernate + MYSQL

Step1s:- Create Database and Table. database name hiberdb and tablename employee(empid,empname,jo) Step2nd:- Create hibernate.cfg.xml:- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost:3306/hiberdb</property> <property name="connection.username">root</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <mapping class="com.scs.dao.Emp"></mapping> </session-factory> </hibernate-configuration> Step3rd:- Create POJO or BEAN Class under package com.scs.dao packag...

How to use HashTable in Spring MVC Web Application

  Code of  Controller Class:- package bao; import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller public class AdditionExample { @RequestMapping("/add") public String loadForm() { return "add"; } @RequestMapping("/addlogic") public ModelAndView addLogic(HttpServletRequest request, HttpServletResponse response) { int a = Integer.parseInt(request.getParameter("txtnum1")); int b = Integer.parseInt(request.getParameter("txtnum2")); Hashtable<String, Integer> ht = new Hashtable<>(); ht.put("num1",a); ht.put("num2",b); Set<Map.Entry<String,Integer>> se = ht.entrySet(); int sum=0; for(Map.Entry<String, Integer> me:se) {...