sending an object to the applet through RMI

Hello,

this question might have lots of details but is really important for what I am trying to do. I was wondering if web start would have these features. This is what I'd like to do:

I have a plotting applet to which I send (through RMI) an object called DataTable which contains all the necessary information for plotting. I already have a web browser (that runs with php) where I choose which DataTables I want to plot. Once I have found some DataTable (in my web browser) I would like to have it so that once a button is pressed, the applet is downloaded onto the clients computer (which is a web start feature), open in a seperate browser and automattically send and load and plot the DataTable in the applet ( I don't know if web start can do this). Would it also be possible (since my applet has this option) to click on a new DataTable in my php web browser and have that new DataTable be automatically added to the apllet that is open in a separate browser (through RMI of course). So, can web start enable me to send Objects through RM to the applet from the web browser without me having to go directly to the applet and 'download' the object through RMI. And then, once the object is sent to the applet from the web browser where I was searching for DataTables, I can go to the applet and work on the plotting details.

I hope I gave enough details, if something is unclear, can you ask me?

If anyone can help me out thanks a lot

Ivan

[1494 byte] By [itucakov] at [2007-9-26 4:47:19]
# 1

I guess that when you say applet you mean application!!!!

I have done something similar. I nevertheless gave up with RMI and use now servlet which can do the same and is much easier with firewall.

what you should do is to create a dynamic JNLP file with a JSP page which contains as argument the element you want in your datatabe. Something like:

http://forum.java.sun.com/post.jsp?forumID=38

in your jsp file you have something like:

<application-desc main-class="yourApplication">

<argument><%request.getParameter("forumID") %></argument>

</application-desc>

In you application you read the argument and request the corresponding object using a servlet (or RMI if you insist).

Regards,

Benoit

marchb1 at 2007-6-29 18:36:59 > top of Java-index,Desktop,Deploying...
# 2

Thanks for the answer, there are a few questions that I have.

> In you application you read the argument and request

> the corresponding object using a servlet (or RMI if

> you insist).

Here you say: in the application. I wouldn't want to load the object from the application but from the web browser. I assume that would be the JSP page you were describing. So I would want to have a button in my web browser which would take the object and send it to my application (without me even accessing the application, the application wouldn't even have to worry about requesting anything, it would just wait for my web browser to send objects to it.. Is that possible?

Also, you are suggesting JSP files. The, thing is, all of the database and object searching has already been done in Php and I am supposed to add a button in a Php file which would do all the above mentioned things. Are all the things that you mentioned for JSP possible for Php too? Or can they be somehow mixed together?

SInce I don't want to alter what people have done before (if I don;t have to) but rather just add a button in an already existing page and build on that.

Ivan

itucakov at 2007-6-29 18:36:59 > top of Java-index,Desktop,Deploying...
# 3

Sorry to reply a bit late,

If you plan you have your application in an applet, then you don't need Java Web Start.

Java Web Start is only for application.

I unfortunately don't have experience generating jnlp file with php.

I would guess that you could have a php page that generate a dynamic applet page containing the reference to your object.

When executed your applet will request the object to the server thanks to a servlet and the reference.

You should not need Java Web Start.

Benoit

marchb1 at 2007-6-29 18:36:59 > top of Java-index,Desktop,Deploying...
# 4

> Sorry to reply a bit late,

>

> If you plan you have your application in an applet,

> then you don't need Java Web Start.

>

> Java Web Start is only for application.

You can use it for applets as well. You will benefit from caching, version updates and the security features (signing, requests for writes, ..)

Regards,

Marc

van.woerkom at 2007-6-29 18:36:59 > top of Java-index,Desktop,Deploying...