I have a piece of Java code in a simple blogging servlet being used in Apache Tomcat. I have page being generated based on a form in the previous page, among this is a link to publish the post. I would like the user clicking that link to call a method later in the class. Is this possible and, if so, how?
Share
Yes. The link can point back to that servlet (or to any servlet), and when you process the request, call whatever method you like.