Enhancing The Application Flows

User 2f67f74af0

17-09-2008 22:45:47

Hi every one.


I'm trying to change the flow of the example so I can land on the query.jsp page rather than going through the seltable.jsp.


As I understood from this http://www.chemaxon.com/forum/ftopic1098.html&highlight=jsp+forward+query+jsp post the seltable.jsp do more than table selection. I joined part of seltable.jsp code mainly the part that do the initialization and connection with query.jsp code and rename it to seltable.jsp so I can land on query.jsp directely.


Attached is the modified query.jsp and the here is the error I get.





Any help will be appreciated.





Thanks





Stack trace:


------------








java.lang.NullPointerException


at chemaxon.jchem.db.TableInfo.getTableNameWithSchema(TableInfo.java:737)


at chemaxon.jchem.db.JChemSearch.getDissimilarityMetrics(JChemSearch.java:1123)


at org.apache.jsp.db_005fsearch.seltable_jsp._jspService(seltable_jsp.java:270)


at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)


at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)


at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)


at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)


at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)


at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)


at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)


at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)


at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)


at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)


at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)


at java.lang.Thread.run(Thread.java:619)

ChemAxon e08c317633

18-09-2008 06:58:04

The topic was moved to the "Structure search and chemical database" forum, my colleagues will answer you soon.





Zsolt

User 2f67f74af0

22-09-2008 16:45:34

Problem solved.


If any one interested in my solution I'm willing to share it. There might be better ways of course.





Thank you.





Saif

User dfd663fd5c

03-11-2008 09:53:48

sabayazid wrote:
Problem solved.


If any one interested in my solution I'm willing to share it. There might be better ways of course.





Thank you.





Saif
Hi Saïf,





Actually I am trying to do the same thing as you! Since I am not a java expert, could you please try to give me the solution that you have found?





Thanks.

User 2f67f74af0

03-11-2008 15:44:19

Hello





My solution was kind of a quick fix that kept me going.


I did some changes in seltable.jsp


Instead of selecting a table I hard coded my table name and get rid of part of codes that I don' need.


I made another copy of initsearch.jsp named it for example initsearch2.jsp


I believe this part could have been done in a better way by looking into the xml files of the software.


In this copy of initsearch2.jsp I add a line of code to forward the user query.jsp





Code:
<jsp:forward page="query.jsp" />






The pages I changed are attached.





As I said there should be a better solution that I will look into when I get time.


I'm involved in a lot other tasks now.


Hope this will help you and others.

User dfd663fd5c

04-11-2008 16:00:08

sabayazid wrote:
Hello





My solution was kind of a quick fix that kept me going.


I did some changes in seltable.jsp


Instead of selecting a table I hard coded my table name and get rid of part of codes that I don' need.


I made another copy of initsearch.jsp named it for example initsearch2.jsp


I believe this part could have been done in a better way by looking into the xml files of the software.


In this copy of initsearch2.jsp I add a line of code to forward the user query.jsp





Code:
<jsp:forward page="query.jsp" />






The pages I changed are attached.





As I said there should be a better solution that I will look into when I get time.


I'm involved in a lot other tasks now.


Hope this will help you and others.
Ok got it. Thanks for the tip!