Win a copy of Functional Reactive Programming this week in the Other Languages 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic