7)A web application that takes name and age from HTML page. If the age is less than 18,it should send a page with “hello <name>,you are not authorized to visit this site” message, where<name> should be replaced with the entered name.
In order to develop any web application we are required to follow some directory structure.Although you can implement the same concept using IDE like Netbeans or Eclipse, as a beginner it is best to follow manual procedure.
This is the content of WEB-INF folder:
The application in tomcat is as follows:
In order to develop any web application we are required to follow some directory structure.Although you can implement the same concept using IDE like Netbeans or Eclipse, as a beginner it is best to follow manual procedure.
These are the files of src folder:
index.html file
p.java servlet where we actually implement the logic.
This is the content of WEB-INF folder:
The classes folder consist of compiled java code:
This is the deployment descriptor where we specify the details of servlet mapping.
The application in tomcat is as follows:
No comments:
Post a Comment