Selasa, 15 November 2016

How can we retrieve parameters in Java Servelets

It is common in web applications to pass data or parameters from one to another page. To retrieve the values of various elements in a HTML form or from another page, we can use the following methods which are available in HttpServletRequest object: String getParameter(String  name) Enumeration getParameterNames() String getParamterValues(String  name)   Following example demonstrates retrieving data from a login page to a servlet: login.html 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://ift.tt/2ewFFOU; <html> <head> <meta http-equiv=“Content-Type” content=“text/html; charset=ISO-8859-1”> <title>Login</title> </head> <body> <form action=“auth.html” method=“get”>

The post How can we retrieve parameters in Java Servelets appeared first on Coding Security.


How can we retrieve parameters in Java Servelets
read more

Tidak ada komentar:

Posting Komentar