Can I run an ASP file from a Java Applet Button?

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Dec 2006
Posts: 35
Reputation: rwagnes is an unknown quantity at this point 
Solved Threads: 0
rwagnes's Avatar
rwagnes rwagnes is offline Offline
Light Poster

Can I run an ASP file from a Java Applet Button?

 
0
  #1
Dec 11th, 2006
Hi. I have a Java Applet with an assortment of buttons that is loaded onto an html web page. I would like any given button to run my ASP code which returns a web page containing results from a database query. But I can't figure out how to link the button to my ASP file. Any suggestions?

Thanks, Elise
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Can I run an ASP file from a Java Applet Button?

 
0
  #2
Dec 11th, 2006
You can't run ASP inside a JVM.
You can make an HTTP request to the server from which you got the applet, calling the ASP, and do something with the result.
Assuming of course you're hosting your applet on a server that can execute ASP.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 35
Reputation: rwagnes is an unknown quantity at this point 
Solved Threads: 0
rwagnes's Avatar
rwagnes rwagnes is offline Offline
Light Poster

Re: Can I run an ASP file from a Java Applet Button?

 
0
  #3
Dec 11th, 2006
Originally Posted by jwenting View Post
You can't run ASP inside a JVM.
You can make an HTTP request to the server from which you got the applet, calling the ASP, and do something with the result.
Assuming of course you're hosting your applet on a server that can execute ASP.
I am hosting my applet on a server that can execute ASP. How do I make an HTTP request to the server?
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 35
Reputation: rwagnes is an unknown quantity at this point 
Solved Threads: 0
rwagnes's Avatar
rwagnes rwagnes is offline Offline
Light Poster

Re: Can I run an ASP file from a Java Applet Button?

 
0
  #4
Dec 11th, 2006
Hey. I figured it out. I used the showDocument method of the AppletContext Interface.

Thanks jwenting for your help.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC