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

How can you use a servlet to generate a plain text instead of html?

831


What do you mean by default initialization in java servlet?

830


Explain servlet.

763


What is the process for chaining servlet?

780


How to make sure a servlet is loaded at the application startup?

744


What is servlet lazy loading?

877


Why do you use session tracking in httpservlet?

827


What do you mean by session tracking?

890


What is a servlet context object?

849


What is servlet? Explain

760


How do you create a cookie using servlet?

815


What’s the difference between sendredirect and forward methods

798


Explain the features are in servlet 3?

794


How to get the server information in a servlet?

876


How can you create a session in servlet?

802