HiCan any one suggest how to write validation and bussiness logic in servlet for jsp form. Our Simple Java class which contains variable declaration and getter and setter method with no argument constructor that is our POJO class.
So servlet serve as Controller.
Java Class represent Business logic. Jsp contains view Part.
Hi Nitin, If you want to suggestion for business logic then use same way as Ankit Garg says. Make object of that class and call method which contains all your business logic.
So, that is good practice for development and you are using MVC architect for development. Then don't use HTML code in your Servlet make one separate jsp which contains basically your view part. From the servlet make one requestdispatcher object and call forward method which pass your request to jsp and display it. You may find this article useful to get some basic ideas out: Hi Nitin, Welcome to javaranch.
HiCan any one suggest how to write validation and bussiness logic in servlet for jsp form I want to validate data which are entered from form in Jsp and do validation of input data in servlet and please suggest what is pojo classes. For more specific validation concerns, you should perhaps consider to use a validation framework, e.
Please suggest how to insert data from jsp form. As in the tutorial no jsp page is given. As in the tutorial no jsp page is given Hi any one please suggest how to insert data from jsp form via using this example tutorial As no jsp page is given. Maybe you didn't read it carefully.
The JSP page is given here: Server Side validation - what kind of work flow have to follow?