Write a java program using servlet for e-mail registration with user-id, password, name, address, field & display the details on next page.
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ResgServlet extends HttpServlet { public void doPost(HttpServletRequest r1,HttpServletResponse r2)throws ServletException,IOException { String s1,s2,s3,s4,s5; s1=r1.getParameter("uid"); s2=r1.getParameter("pwd"); s3=r1.getParameter("uname"); s4=r1.getParameter("uadd"); s5=r1.getParameter("filds"); r2.setContentType("text/html"); PrintWriter pw=r2.getWriter(); pw.println(" pw.println(" pw.println("Information of E-mail Registration"); pw.println(" "); pw.println(" User ID :"+s1); pw.println(" "); pw.println(" User Password :"+s2); pw.println(" "); pw.println(" User Name :"+s3); pw.println(" "); pw.println(" User Address :"+s4); pw.println(" "); pw.println(" User Fields :"+s5); pw.close(); } } /* ResServlet.html */ method="post" action="http://localhost:8080/uttara/ResgServlet"> User ID: Password: User Name: User Address : User Fields:
Write a java program using servlet for e-mail registration with user-id, password, name, address, field & display the details on next page.
Reviewed by
on
April 27, 2015
Rating: