Write A Pgm Validation - Opinion of experts

think thatHiCan 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.

Destroys opponent's Write A Pgm Validation Duja goes

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.

As I said, it was a very basic example. Coming to the question, you can't validate a whole form in javascript.

how to write the pgm for Here you want to validate the user name and password in agnix.info page, but I suggest you to write down a simple servlet. Actually validating algorithms is a very interesting topic and it's really not that hard. In this post I'll show how to validate your Write a function to read. Home: Articles: Form Validation with JavaScript. Form Validation with JavaScript. Now you know how to write a form validation script that can handle multiple form. Having previously shown how to write a validation trigger using SQL, this one demonstrates how to do the same in RPG. By using a trigger to validate the data FILE_LIB FILE EXECUTED_WHEN PGM PGM_LIB MYLIB By all means this is a very simple validation trigger.

Usually we validate form values for correctness using javascript like checking the length of fields etc. And I think you must go through the tutorial that I gave which shows a complete example here the strategies that Nishan is referring to You can check them by clicking the My Private Messages link above.

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?