Molecule from applet to the java part of a web application

User 151fddb1df

23-03-2011 09:10:26

Hi,


I use MarvinSketch applet to draw a molecule in a jsp page. I would like to have this molecule on the server side to apply java code on it. What is the best method to pass the molecule to the java part of my web application ?


I have already seen that I can export the molecule via javascript in sdf format, then I guess I can use the MolImporter class to have a Molecule object.


Another solution would be to use js2java as describe here :http://www.chemaxon.com/test/marvin//examples/applets/sketch/noliveconnect1.html.


Is there another solution ? which one is the best ? It does not seem possible to pass directly a Molecule java object from the applet to the java code of the web application, am I correct ? if not, how can I do that ?


thanks a lot for your help,


 


L.

ChemAxon 7c2d26e5cf

25-03-2011 12:24:18

Hi,


You can retrieve only the String representation of the structure from the applet. The Molecule class is not accessible in JavaScript.


The MRV format is the most descriptive format. It can also store display setting.


I recommend to retrieve the structure in MRV format and pass it to the server (instead of SDF).

User 151fddb1df

08-04-2011 13:23:45

Hi


 


thanks a lot for your help ! Now it works just fine.


 


L.