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 is servlet api used for conneting database?
What is the difference between encodeRedirectUrl and encodeURL?
What are the types of Session Tracking ?
How do you get the ip address of the client in servlet?
What do you mean by httpservlet and how it is different from the genericservlet?
Differentiate between the web server and application server?
How do we call one servlet from another servlet?
How can we invoke another servlet in a different application?
What is a java servlet?
What is the purpose of inter-servlet communication?
Describe some assignments that are executed by servlet container?
Can we use the constructor, instead of init(), to initialize servlet?
What do you mean by web applications? Explain web application directory arrangement?
Explain the difference between jsp and servlet?
Explain the lifecycle of a servlet?