File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Challenging real time question.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Challenging real time question.." Watch "Challenging real time question.." New topic
Author

Challenging real time question..

Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
Hello Friends,

We have a small applet applet application, which we want to intergrate in another application, called PAYMENT .

Applet application(applet contains 3 buttons in there ) call goes in this way
*Jsp to Javascript to applet
*applet to Javascript to Jsp

PAYMENT Application few text fields and 2 buttons)
*works with jsp servlets.

Lets say in portal container, we are going to put this applet iframe on top of the page and below that this payment process jsp will be there, both of them in the same page.

1) If I push one of the button in the applet (which is in the top of the page), i want to disable one button in the payment application( which is at the bottom of the page. is it possible to do that?

2) I want to do it in the otherway too..call from Payment application to applet..

2) how can i do that? what are all the possible ways to do that?

please help me out in this
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
The only way for applets and JavaScript to communicate directly would be through LiveConnect, but it's always a gamble whether or not that works on any given browser/JVM combination. If this is an intranet setting -where some control over that can be exercised- it may work.

If not, the only would be that both communicate with the web server via HTTP (the applet via the HttpUrlConnection class, JavaScript via the XMLHTTPRequest object), and you come up with some way to synchronize that.


Ping & DNS - my free Android networking tools app
Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
Ulf,

Already I have done the aplet to javascript communication part using JSObject.

what I want is

call from applet application to another application's jsp, both application running in a portal container, in same page.

please help me.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
I'm not quite following. An applet (which runs on the client) can't "call" a JSP (which runs on the server). It can either call into the HTML page that is generated by the JSP via LiveConnect, or it can make an HTTP connection to the JSP page. Is that what you're trying to do?
Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
Ulf,

there are two application one is applet applicatiom(iframe) which consist of (jsp,javascript,applet) another one application which contains (jsp,servlets)

both jsp'es are integrated in Main page(1 top, another bottom), in a web portal

lets say both the applications contains 2 buttons each,

If I push one of the button in the applet jsp page(which is in the top of the Main page), i want to send / initiate control to the other application jsp( which is at the bottom of the Main page. is it possible to do that?

How?

I hope gives you clear picture.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
Well, you said earlier that you had gotten LiveConnect to work - why wouldn't it work here, assuming both frames can be made to accommodate it by including the appropriate JavaScript handlers and HTML constructs?
Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
Ulf,

Thats was in the same Applet application, but now

I want to call from applet application to Payment application jsp in the same page.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
I'm not clear on what constitutes an "application" since both are on the same web page, and thus I don't see how that case would be different from the one were you successfully used this technique. Keep in mind that we don't see what you have in front of you, and don't know how the page is stuctured.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Challenging real time question..