Communicating from java script to java

E

Evrim

Dear All

I am using JDK 6 , Tomcat 6 and Jena 2.5.2.

I would like to use javascript on my jsp page to pass the values of text
boxes to a java function I have. This java function uses the Jena library to
extract some info from OWL file based on parameters passed to it . I'd
extremely apprecite you help :

Assuming my jsp page is in folder [Tomcat] \webapps\mytest and Jena
libraries are in [Tomcat] \webapps\mytest\WEB-INF

1. Where (which folder) should I store my java class (java function) ?

2. How can I use javascript to call the Java function and pass values to it
(to invoke it so that it can proceed with what it is supposed to).



I am deeply grateful for your help

Evrim
 
O

[on]

Dear All

I am using JDK 6 , Tomcat 6 and Jena 2.5.2.

I would like to use javascript on my jsp page to pass the values of text
boxes to a java function I have. This java function uses the Jena library to
extract some info from OWL file based on parameters passed to it . I'd
extremely apprecite you help :

Assuming my jsp page is in folder [Tomcat] \webapps\mytest and Jena
libraries are in [Tomcat] \webapps\mytest\WEB-INF

1. Where (which folder) should I store my java class (java function) ?
Depends on the Webserver, never used Tomcat myself. Maybe check their
forum ?
2. How can I use javascript to call the Java function and pass values to it
(to invoke it so that it can proceed with what it is supposed to).
Just pass "get" parameters to the "page", http://whateverdomain/servlet/ReadOWL?username=Kang
Then read the "username" parameter from your Request object.
I am deeply grateful for your help

Evrim

Your questions really doesn't have much to do with JavaScript, other
then maybe dynamicly create the URL used to pass whatever information
you have to the Servlet.

This might not have been what you wanted, guess I could have found
some links to Tomcat or retell whatever information I found in this
post.
But I'd suggest you ask on a Tomcat related Forum/UsenetGroup.

// [on]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top