This document describes a web application that contains code for a servlet class (SubmitSrv.java), an HTML file (Index.html), and a web application deployment descriptor (web.xml). The servlet handles requests from the HTML form and performs basic arithmetic operations or displays system properties based on the submitted parameter. The HTML form contains fields to accept two numbers and submit buttons to trigger addition, subtraction, or multiplication in the servlet. It also contains links to trigger displaying system properties or date in the servlet. The web.xml file maps the servlet class and URL pattern.
1 of 5
Download to read offline
More Related Content
Multiple Submit Button Test App
1. Multiple Submit Button Test App
Contains:
1. SubmitSrv.java
2. Index.html
3. web.xml
note: it is a web app so use the codes by forming web-modules and
paste the codes there and enjoy.
1. SubmitSrv.java codes
package com.nt;
importjava.io.IOException;
importjava.io.PrintWriter;
importjava.util.Date;
importjava.util.Properties;
importjavax.servlet.ServletException;
importjavax.servlet.annotation.WebServlet;
importjavax.servlet.http.HttpServlet;
importjavax.servlet.http.HttpServletRequest;
importjavax.servlet.http.HttpServletResponse;
/**
* ServletimplementationclassSubmitSrv
*/
@WebServlet("/SubmitSrv")
publicclassSubmitSrvextendsHttpServlet{
private staticfinal longserialVersionUID=1L;
/**