Friday, 17 March 2017

JSP AGE VALIDATION ALONG WITH CSS


A web application that takes name and age from an HTML page. If the age is less than 18 it should send a page with “Hello <name>, you are not authorized to visit the site “message, where <name> should be replaced with the entered name. Otherwise it should send “Welcome <name> to this site “message.

Below is the folder structure that is to be followed for every tomcat application


The html form nameage consist of the link to stylesheet along with the form details:


This is the jsp code for processing age criteria:

Once you start your application in tomcat automatically the corresponding class and java files are generated in the below folder:


Following are the output screens where in based on the age criteria the user will be prompted with the respective messages:








No comments:

Post a Comment