Reputation: 21329
I was trying to implement a search bar in my web application:
<form method="get" action="NewServlet">
<input type="search" />
</form>
When I type something in this search bar and hit enter, then the URL changes from
http://localhost:8084/App-1/tester.jsp
to
http://localhost:8084/App-1/NewServlet?
Why don't I see the search query parameter in the URL?
Upvotes: 2
Views: 44
Reputation: 340933
You have to name your field:
<input type="search" name="query"/>
This will call:
http://localhost:8084/App-1/NewServlet?query=...
Upvotes: 3