• Post Reply Bookmark Topic Watch Topic
  • New Topic

invoking a servlet or jsp on clicking a button

 
Jack clouseau
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I want to know whether we can invoke a servlet or jsp on clicking a button (means to say, clicking a JBUTTON inside a JFrame). More clearly from the actionPerformed() method....any suggetions will be much appreciated.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call the web server and open the servlet / JSP from there. Check out java.net.URL and java.net.URLConnection for more info.

If you want to display the page then perhaps javax.swing.JEditorPane can help you. It's not a proper web browser though; if you need that then there are 3rd party libraries that can help you.
 
Jack clouseau
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks much for your reply
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!