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 are the mechanisms used by a servlet container for maintaining session information?
Why don't we write a constructor in a servlet?
How httpservlet is different from the genericservlet?
What are the differences between the servletconfig interface and the servletcontext interface?
Which httpsession object is used to view and manipulate information about a session?
How can we upload the file to the server using servlet?
Explain the difference between a web server and a web container?
What is servlet and its types?
How forward () method is different from send redirect () method?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
Which java application server is the best?
Is tomcat a servlet container?
What is pure servlet?
What are the types of Session Tracking ?
Explain the custom jsp tags and the beans.