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
Differentiate between get and post?
What is the difference between a generic servlet and http servlet?
What is a servlet?
What exactly is a servlet?
Can filter be used as request or response?
What is servlet collaboration?
When should you prefer to use doget() over dopost()?
What are the jobs performed by servlets?
What is the use of request dispatcher interface?
How do you design microservices?
What is a servlet engine?
What are different ways for servlet authentication?
What exactly are the functions of servlet?
What is cgi and what are its drawbacks?
What’s the difference between forward() and sendredirect() methods?