• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to invoke client side applets from a server side web application?

 
Vincent Paranpan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I don't know if I'm in the right thread to post this but I figured that I should post it here since my question it involves Web technologies (HTML, JavaScript, JSP and such), but on the other hand maybe I'm supposed to post this in the Applet thread?..

Anyways, my question is...

How do I invoke client side applets from a web application? (Servlets)

Thanks,
Vince
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally, you can't. The applet needs to make contact with the server. What specific problem are you trying to solve?
 
Vincent Paranpan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lester,

Thanks for the quick reply, you see I've tried doing this with ActiveX and it works,
but our requirements changed so I no longer have the option to use IE as my web browser.

What other options could I use to replicate the behavior of ActiveX on other web browsers like Firefox and Google Chrome, any suggestions?

Thanks again,
Vincent
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ActiveX is a technology that allows you to run just about every code you want in an IE browser instance, generally without much in the way of security. If that's acceptable, then you can sign the applet and have it execute any code you want, including one that opens a ServerSocket and listens for incoming HTTP requests.

The difficulty, though, is how the web server will get to know the IP address of the browser - how did that work with whatever ActiveX control you were using? And, of course, the client machine -and any firewall in between client and server- must allow incoming connections.
 
Vincent Paranpan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, so If I embed a signed applet and use ServerSocket I'll be able to invoke applications (executable JAR for example) from the client side?

Here's the code I used back then when we were still testing ActiveX and when we were allowed to use IE:



As you can see I created a simple (just for testing) function call to a javascript just to invoke the JAR placed on the client side.

Thanks,
Vincent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic