can someone explain what is the difference between using
href=\"../usermanagement/search_user.jsp?\"
and
href=\"../usermanagement/search_use
It is a query to pass paramters. ?pagename=navigation
passes the value 'navigation' to the pagename
parameter.
Whenever we want to pass some parameter to jsp then we simply append "?" question mark after jsp url and after that we mentioned parameter name and its value.
"../usermanagement/search_user.jsp?
" means you did not get any parameter on this jsp.
"../usermanagement/search_user.jsp?pagename=navigation
" with this url you can get the value of pagename parameter on jsp as by using this syntax:
String pagenNameValue=request.getParameter("pagename");
you will get "navigation" as pageNameValue parameter value.
The href="../usermanagement/search_user.jsp?pagename=navigation" is a GET Method and will pass a key : pagename with value : navigation via URL.
Whereas href="../usermanagement/search_user.jsp? is a POST method and doesn't pass information about its variables via URL.
check out Difference between GET and POST method
Its name is Query string. After the question mark you can pass key-value pairs and use them server-side.
https://en.wikipedia.org/wiki/Query_string