Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Insert In SpringMVC
Insert In SpringMVC [message #878096] Mon, 28 May 2012 14:32
arian zand is currently offline arian zandFriend
Messages: 1
Registered: May 2012
Junior Member
Hi I have a Webapp and i want to insert a record in my db
This is my controller

public class ReservationController {
	private RoomDAO roomdao;
	private ReservationDAO reservationdao;
    public String ReservationFormulier(ModelMap model){
        Reservation reservation = new Reservation();
        model.addAttribute("dereservatie", reservation);
        return "/newReservation";
    public String ReservationMaken2(@ModelAttribute("dereservatie") @Valid Reservation reservation,
                                                        BindingResult result, ModelMap model){

        return "home";

this is my dao

public interface ReservationDAO 
	public Reservation saveReservation(int roomId, String firstname, String lastname, String arrival, String departure,String numNights,String numPersons,double price);


my daoImpl
public class ReservationDAOcoll implements ReservationDAO{
	private EntityManager em;
	public Reservation saveReservation(int roomId, String firstname,
			String lastname, String arrival, String departure,
			String numNights, String numPersons, double price) {

		Reservation reservation = new Reservation();
		return null;

When I press on save in my view it doensn't insert a new record in my db

I have no errors, the webpage goes back to my home.jsp...

Someone who knows what im doing wrong ?

Previous Topic:How to create a stateless session bean programatically..
Next Topic:Failing to create JVM, but I have more than enough RAM
Goto Forum:

Current Time: Sat Nov 28 20:26:59 GMT 2015

Powered by FUDForum. Page generated in 0.01632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software