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’s the difference between sendredirect and forward methods

576


Which interface must be implemented by all servlets?

807


What are the functions of an intercepting filter?

503


What do you mean by deployment descriptor?

564


Are Servlets Thread Safe? How to achieve thread safety in servlets?

571






What are the disadvantages of storing session state in cookies?

637


What is cookie? Why is cookie used?

596


How do I use cookies to store session state on the client?

542


How can we invoke another servlet in a different application?

722


What is session?

651


Explain the difference between a web server and a web container?

525


Which protocol will be used by browser and servlet to communicate

586


what is multiple server?

1768


What is war file?

587


What are the types of servlet?

681