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
What is preinitialization of a servlet?
How do we call one servlet from another servlet?
What exception should be thrown when servlet is not properly initialized?
What's the advantages using servlets than using cgi?
Explain load on start-up and its importance?
Which interface must be implemented by all servlets?
how many jsp scripting elements are there and what are those?
Define context initialization parameters.
Who is responsible for writing a constructor?
Why doesn’t a servlet include main()?
What is a servlet context object?
Explain the difference between get and post method in servlet?
What are session variable in servlets?
When should you prefer to use doget() over dopost()?
How can we upload the file to the server using servlet?