Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
JSP Script Tag usage in remote production server which has no internet connection

I am working with a dynamic web project, where some of my JSP files need to use Jquery scripts.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>

As seen in the above tags, i use absolute URLs that points to scripts from web(googleapis site). I use the jquery scripts mainly to achieve autocomplete feature for one of the fields. The relevant js file for autocomplete is as follows

<script type="text/javascript" src="resources/script/jquery.autocomplete.js"></script>

As seen in the above tag, the script src is relative URL, where i have already downloaded the script from the web(https://pengoworks.com/workshop/jquery/lib/jquery.autocomplete.js)

My questions are,

  1. Will the absolute URLs in the scripts tag (referring jquery.min.js and jquery-ui.min.js) work perfectly and serves it purpose when my web application is deployed as .war file into the production server remote, where there is no internet ?

  2. I also tried downloading the jquery.min.js and jquery-ui.min.js into my relative folder paths resources/script, and gave the script tag as

    <script type="text/javascript" src="resources/script/jquery.min.js"></script>
    

But this is throwing the error in chrome's developer console as below

> jquery.autocomplete.js:257 Uncaught TypeError: Cannot read property 'msie' of undefined
    at receiveData (jquery.autocomplete.js:257)
    at Object.success (jquery.autocomplete.js:329)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at y (jquery.min.js:4)
    at XMLHttpRequest.c (jquery.min.js:4)
  1. Is there any restriction that makes such jquery scripts will work only when it is referred from its absolute source? but not when i download it to local folder ?

Suggestions for best practices in these cases, is also welcome.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

  • If you include ALL the jQuery files in the war, your relative URLs should work offline

  • Your jQuery is ANCIENT

  • The pengoworks autocomplete is using $.browser.msie which has been removed from jQuery - but it should still be there in 1.3

This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.

  • You can add it back using a $.browser polyfill or remove it by using another autocomplete

  • Since you use jquery.ui, you have one available: https://jqueryui.com/autocomplete/

I recommend

  • get rid of the pengoworks
  • update your jQuery to 3.6 and ui to 1.12
  • use the autcomplete from jQuery.ui if you are using other parts of jQuery.ui, if not, perhaps find a newer autofill
  • download and include ALL files used by the project
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!