How values can be passed from HTML page to servlet?

Answer Posted / dadhich

we can pass the values to servlet through from HTML Page as follows:-
create a form --> define <form action=Ser>

where Ser is a servlet java class in which we want to retrieve the value.in web-xml in <servlet> tag class name will be defined.

In Ser.java we can retrieve the value by writing as follows:

String login=request.getParameter("login");

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What must be implemented by all servlets?

574


why we should override only no-agrs init() method.

676


What is servlet api used for conneting database?

694


Which interface must be implemented by all servlets?

791


What if we pass negative value in load-on-startup?

798






Why the container loads server at the application startup and how?

579


Whether we can get deadlock situation in servlets?

572


Explain the features are in servlet 3?

599


What is difference between get and post method?

572


Explain the lifecycle of a servlet?

502


Write a simple servlet program to print the contents of html.

544


What are the difference between session and cookies in servlet? Explain

558


What is the workflow of a servlet?

719


How is a servlet implemented in code?

564


How do we translate jsp?

569