12:13 am - Monday June 25, 2018

Passing Input to Servlet from html

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

Servlet can communicate with html page using HttpServletRequest object, Value present in html text box can be retrived using getParameter method which accepts name attribute present in html code as an argument.

Html code:

<input type=”text” name=”username” />

Servlet code:

String name = request.getParameter(“username”);

 

BACK

Filed in: Z-A All Java Codes

No comments yet.

Leave a Reply