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 the main purpose of java servlets?
Which exception is thrown if the servlet is not initialized properly?
If a servlet is not properly initialized, what exception may be thrown?
What is cookie in servlet?
List out the difference between ServletConfig and ServletContext?
What are the mechanisms used by a servlet container for maintaining session information?
How to upload a file to the server using servlet?
What is generic servlet class?
What is the life cycle of a servlet?
How do you define a servlet?
How to read request headers from servlets?
Where do you define dispatcherservlet?
What are the features added in Servlet 2.5?
What are the advantages of cookies?
Whether we can get deadlock situation in servlets?