Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling servlets from swing object ... urgent

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!