I m trying to call a servlet from a Swing object like a JButton in a frame. Please let me know how to call it. Thanks in advance.
posted 16 years ago
How you call a servlet depends on what you want to do with what it returns. If you don't care you can just open a URLConnection to the appropriate URL, which will run the servlet. If you want to do something with the result you will either need to parse the stream it sends back, or place it somewhere (a textfield etc.) for a user to see. What exactly do you need to do?