But their are two method for sending value to servlet:1.by using hidden form elementlike <input type="hidden" name="name" value="value">2.or by simple NameOfServlet?name1=value&name2=value2 Source: CoolInterview.com

Using form can send request to the servlet. Form attributes are name,nethod(post or get),action(servletpath/servletname). Then request can be got by using request.getParameter("name of the parameter(eg : text box name to get text box vale in servlet from html)").the return value is string. Source: CoolInterview.com

The values can be passed to the Servlet from HTML by various forms:1. Submitting the Form Data using submit button in HTML page2. Submitting the form Data using javascript (document.forms[0].submit();)3. appending the values to Action Attribute of Form Tag Source: CoolInterview.com

We can pass values from a servlet to HTML page or JSP using request.getParameter(String[]); If you are using Struts Framework then we need to do some changes in StrutsConfig.xml while after global actions and Action Mapping tags we need to properly match Bean values i.e. Getters and setters and depending upon the Request on client side we can enhance our code and produce desired result. Source: CoolInterview.com