Is it possible to call servlet with parameters in the URL?
Answer Posted / muhammad farhaan
If HTML form submitted with Get request to servlet URL
which is defined in action attribute of HTML form then form
values are sent as a name value pairs appended at the end of
URL calling servlet. List of parameters is separated by ?
sign with rest of URL and paramter are append to the list of
paramter as name value pair separated by & sign. You can
manually attach the paramters as a list of name value pairs
separated by & sign at the end of query string followed by ?
sign.
The maximum length of URL changes across the browser
generally you can not send more than 255 characters long URL
string so keep in mind that when you send paramters with URL
string then whole length of URL must not be more than 255
character.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What do you mean by servlet?
What is the need of session tracking in web application?
What are the functions of Servlet container?
What is the difference between forward () and sendredirect () functions in servlet? Explain
What are the drawbacks of cgi?
Explain jsessionid and when is it created?
How does java thread pool work?
Which method of the httpservletrequest object is used?
What is the difference between CGI and Servlet?
Elucidate servlet attributes and its scope?
What is preinitialization of a servlet?
What is servlet and its life cycle?
Explain the difference between servletconfig and servletcontext in servlet?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
What is servlet container?