Reputation: 195
I'm new to servlet programming and I have written a simple servlet running on Apache Tomcat 9.0.39. The logic in the doPost()
and the doGet()
methods are different from each other. I can simply invoke the doGet()
as follow and receive an accurate response from the servlet:
localhost:8080/myservlet/load?id="4"
The doPost()
method is sending two parameters "author" and "title" to the servlet to store. Ultimately, I'd like to keep this simple and not to develop an Html form to submit the values for the "author"
and the "title"
to the servlet. Is there a way I can invoke the doPost()
from the browser as I had for the doGet()
method?
Thanks in advance.
Upvotes: 0
Views: 1255
Reputation: 58
Actually it does not matter if it is servlet or not. The problem area is regarding Http protocol. From your browser you can send post request, of course.
Upvotes: 2