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

What is servlet and its life cycle?

825


What is http servlet?

791


Can we refresh servlet in client and server side automatically?

792


What is the process to implement doget and dopost methods?

732


Explain Action Servlet?

821


Who is responsible to create the object of servlet?

914


What is URL Encoding?

853


How to get the IP address of client in servlet?

827


What are sessions in servlets?

787


Explain the role of dispatcherservlet and contextloaderlistener.

876


If servlet receives multiple requests, how many objects will it create?

1070


What are the various ways of session supervision in servlets?

747


Tell the new features added in servletrequest interface i.e. Servlet 2.4

817


What is servlet attributes and their scope?

785


What is the directory structure of a war file?

901