Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem with http request and external javascript

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i had inserted javascript code in script tag in jsp file,it was working fine,but as soon as i cut the code and created new folder js and in that created a new index.js file and plced the javascript code my function in js file not working properly specially the htttp.responseText i get is empty in alert box,but my clear text functions are working fine.I get Http monitor error
that is

WARNING *********** NetBeans HTTP Monitor ************
The request cannot be recorded most likely because the NetBeans HTTP Monitor module is disabled. To fix this problem, go to the IDE and either set your server not to use the HTTP Monitor in the Server Manager or enabled the HTTP Monitor module in the Module Manager (under the Web module category).
NotifyUtil::java.lang.OutOfMemoryError: Java heap space



i hope i am giving the servelet path right in http.open method.
help needed .



my index.jsp where iam callin index.js



index.js in js folder





 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your server is not going to resolve

# var pidd=finalArray[j];
# var u1='<%=request.getContextPath()%>/DisplaySubCategaryForm?cateid='+pidd ;
# var newRow = tb1.insertRow(i);
# var newCell = newRow.insertCell(0);
# var link ='<%=request.getContextPath()%>/DisplaySubCategaryForm?cateid='+pidd;
# //alert("link"+link);
# var hyper =' ';
#

since you are not in a jsp, you are in a text file.

Eric
 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks removing request.getContextPath() helped solving my error.I am getting the output as expected.
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic