instantiate an object within javascript
<pre><code>**&lt;%@ page import="com.ampliflex.commons.Ampliflex" %&gt;**
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Search Result  &lt;/title&gt;

&lt;style&gt;
img{ height: 150px; float: left; border: 3;}
div{font-size:10pt; margin-right:150px;
margin-left:150px; }
&lt;/style&gt;
 &lt;script type="text/javascript" src="jquery-1.6.1.js"&gt;&lt;/script&gt;
 &lt;script type="text/javascript"&gt;
$(document).ready(function(){
  **Ampliflex ms = Ampliflex.getInstance();
  String mailHost = ms.getMailServer();**
// This function get the search results from Solr server 
    $("#submit").click(function(){
        var query=getquerystring() ; //get the query string entered by user
</code></pre>

<p>Here in this, I imported a java class and instantiate its object. but object is not visible and script is generating an error "missing ; before statement
 Ampliflex ms = Ampliflex.getInstance();  "...i am not getting why so.</p>

<p><strong>EDIT:</strong></p>

<p>The problem is i need to access this mailHost with in javascript. if i instantiate object with in &lt;%.. %> then mailHost is local variable and am not able to access in javascript tag. is there any solution for it.</p>
