User 08026ff1f0
22-10-2004 17:11:49
Hi ,
I am writing a JSP code to retreive a particular compound from Oracle database and display its structure.I am able to retreive the cd_structure of the compound but i am not able to display it using the applet.Can anyone pls tell me in detail how to display the compound structure using the applet and also how to initialize it.
Bhargav
ChemAxon 43e6884a7a
22-10-2004 19:15:26
User 08026ff1f0
22-10-2004 21:40:02
Hi,
I have actually seen the JSP code in the examples . When I am trying to run the JSP file it says java.lang.ClassNotFoundException: JMView..This class is not being loaded...One more thing, in the developers section in
www.jchem.com, u have given a code to which performs SQL querying on database and retrieves the structure and then displays it..In that u have used the function DatabaseTools.readLongColumn(rs,2).While compiling there is an error which says that the class DatabaseTools doesnt have this function.
I have checked out the API of this class and it doesnt contain the function readLongColumns...Please help me out..Its sort of urgent.Thanks ..
User 08026ff1f0
24-10-2004 19:56:50
Hi ,
Thanks for the reply. Now i am able to display the applet using my JSP page but it is not displaying the structure inside it. I am using jchem 2.2.1 which doesnt have the function 'readBytes' in it. So I am using
String dbMolfile = new String(rs.getBytes("cd_structure"),"ASCII");
%>
mview_param("cell 1",
"|<%= HTMLTools.convertForJavaScript(
dbMolfile) %>");
<%
to convert it into string instead of
String dbMolfile = new String(readBytes(rs,2),"ASCII");
%>
mview_param("cell 1",
"|<%= HTMLTools.convertForJavaScript(
dbMolfile) %>");
<%
will the above thing work..Since my page is displaying the applet clearly and all the functions that we can perform on the applet like animation etc are working..But the structure is not getting displayed inside ..So I think that there is some problem with the above part where we extract the cd_structures column from the database and convert into a string to display in the applet..Please help me out ASAP. Thank u
Bhargav
ChemAxon 9c0afc9aaf
25-10-2004 11:22:06
User 08026ff1f0
25-10-2004 14:57:42
Hi,
Thank You very much. I got the problem fixed up. I shud have used cell0 instead of cell1. Its working now.
Bhargav
User 08026ff1f0
28-10-2004 17:06:06
hi,
Can you please tell me how to pass the structure that has been drawn in marvin sketch
to another JSP page so that it can be used to perform queries and display the structures (using html forms and not Java Script). Also please tell me how to retrieve the drawn structure in the other JSP page.
Thanks.
Bhargav
ChemAxon 9c0afc9aaf
29-10-2004 07:37:20
Hi,
The source of this example is available in the JChem package:
http://www.jchem.com/examples/jsp1_x/index.jsp
The source is under jchem/examples/jsp1_x/
Retrieving the structure is done in the query.jsp by JavaScript, and posted in a form's hidden input
(JavaScript is a necessary thing here, otherwise the structure cannot be retrieved):
Code: |
form = document.queryForm;
form.action = "initsearch.jsp" + location.search;
form.molfile.value = document.[b]msketch.getMol('mrv');[/b]
if(checkForm())
form.submit();
|
The form definition:
Code: |
<form method="post" name="queryForm">
<input type="hidden" name="molfile">
|
The posted value is retrieved in initsearch.jsp:
Code: |
String molfile = (String)request.getParameter("molfile");
|
User 08026ff1f0
29-12-2004 20:08:55
Hi,
I am using Jchem 2.2.1. I am writing code in JSP that performs substructure searching . As a result I get all the compound ids whose structures have the drawn structure as a part of them. What should I do if i want to get only compound ids that have molecular wt(or compound id) greater than or less than some number .
Bhargav
ChemAxon 9c0afc9aaf
04-01-2005 13:58:40