Hi Kiran!
You can do this by using SSI (Server-Side Includes). In SSI, you call the
servlet by using the following:
<script language=JavaScript>
<!--
<servlet code=MyServlet>
</servlet>
//-->
</script>
So, the output of the servlet "MyServlet" is at your disposal.
Suppose you have a string of concatenated values (that may be the result of
servlet quering the Oracle database in your case) myString=a#b#c...
In the servlet you embed the following:
PrintWriter out= HttpServletResponse.getwriter()
...
out.println("var javaScriptVariable=\""+myString+"\"");
Done... you can now get the elements by tokenising the string
javaScriptVariable.
Hth,
Manish

Kiran Badhe wrote:

> Hi,
>
> I have a javasccript to accept the certain parameters. This script passes
> these parameters to the servlets and input. The servlets in turn retrieves
> the data from Oracle database.
>
> Now I want my servlet to return this resule back to JavaScript so that I can
> display it on the same page. May I know how to achieve this?
>
> Thanks.
> Kiran
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

--
---------------------------------Live-Your-Dream--------
Manish Bhatnagar
Software Engineer
Accord Software & Systems Pvt. Ltd.
37, Krishna Reddy Colony
Domlur Layout
Bangalore - 560 071
India
Telephone: +91-80-5560105 x 248
Fax: +91-80-5562723

Obstacles are things a person sees when he takes his eyes off his goal.
                                                             -E. Joseph Cossman
---------------------------------Live-Your-Dream--------

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to