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


Please Help Members By Posting Answers For Below Questions

Write a servlet to upload file on server.

835


What is Request Dispatcher?

1091


why we should override only no-agrs init() method.

901


Write a hello world program using servlets.

809


What is the inter-servlet communication?

941


What do you mean by httpservlet?

779


How do you deal property files in servlet?

813


Explain the difference between servlet and cgi?

840


What are the type of protocols used in httpservlet?

830


What are the different ways we can maintain state between requests?

800


Explain the differences between jsp and servlet.

746


What are the steps involved in placing a servlet within a package?

843


What do you mean by interservlet communication?

808


Tell us something about servletconfig interface.

784


Which are the different ways you can communicate between servlets?

763