I am testing out a simple webapp conforming to MVC. I suspect that I might be having a possible problem with the getRequestDispatcher() method. The files used are: 'bookingForm.jsp', 'bookingconfirmed.jsp', 'bookingFormServlet.java' and 'bookingFormBean.java'.
The user fills up the 'bookingForm.jsp' with the value 'jack' and clicks on submit button. The 'bookingFormServlet.java' servlet manages to call the 'setName' method of the 'bookingFormBean.java' and passes the value 'jack' to it. This much works fine, I confirmed this by doing a print statement in the setName method just after the 'this.Name = Name' assignment, and the value 'jack' is printed out in the stack trace.
However the user is getting a 'Http status 500' error in the browser after filling up the form and clicking submit, that says:
'org.apache.jasper.JasperException: PWC6054: Cannot find any information on property 'Name' in a bean of type 'com.ProjecteBooking4.controller.bookingFormBean'' .
The stack trace says:
and clicking on them brings me to the following lines in the servlet:
The print statement I placed just above request.getRequestDispatcher("bookingconfirmed.jsp").forward(request, response); never gets printed, I belive this means, the program for some reason dosent get further than this due to some error. I am not sure what is causing the error, I hope someone can help. All the source code is mentioned below:
Really hope someone can help put out to me what is wrong. Thanks.