Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6049431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:34:35+00:00 2026-05-23T07:34:35+00:00

**<%@ page import=com.ampliflex.commons.Ampliflex %>** <html> <head> <title>Search Result </title> <style> img{ height: 150px; float:

  • 0
**<%@ page import="com.ampliflex.commons.Ampliflex" %>**
<html>
<head>
<title>Search Result  </title>

<style>
img{ height: 150px; float: left; border: 3;}
div{font-size:10pt; margin-right:150px;
margin-left:150px; }
</style>
 <script type="text/javascript" src="jquery-1.6.1.js"></script>
 <script type="text/javascript">
$(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

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.

EDIT:

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:34:35+00:00Added an answer on May 23, 2026 at 7:34 am

    You are trying to instantiate java object but, without a scriptlet

    it should be some thing like

    <%
    
      Ampliflex ms = Ampliflex.getInstance();
      String mailHost = ms.getMailServer();
    %>
    

    $(document).ready(function(){
    //Mail host
    var mailHost='<%= mailHost %>’;

    // This function get the search results from Solr server
    $(“#submit”).click(function(){
    var query=getquerystring() ;

    And, if you want to invoke method after page is loaded, try using ajax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import java.io.IOException; import java.net.MalformedURLException; import java.util.List; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlAnchor; import com.gargoylesoftware.htmlunit.html.HtmlButton;
hi friends i'm creating a php page to import the data from a csv
I have a page where a user can import data to the site. either
I'm trying to extract each page of a PDF as a string: import pyPdf
I have a jsp page, which imports another jsp. This import is wrapped into
import com.google.appengine.api.labs.taskqueue.Queue; import com.google.appengine.api.labs.taskqueue.QueueFactory; import static com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.*; // ... Queue queue = QueueFactory.getDefaultQueue(); queue.add(url(/worker).param(key,
I'm using Network.Browser 4000.0.9 to retrieve a web page: import Network.Browser import Network.HTTP main
import com.google.ads.*; import com.google.ads.AdListener; import com.google.ads.AdRequest; import com.google.ads.InterstitialAd; public class StartUp extends Activity implements
Hello I have the following simple QML app: import QtQuick 1.0 import com.nokia.symbian 1.0
I have below piece of code in one my JSP <%@ page language=java import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.