• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • 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

Posts: 15385
  • 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.

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.
That's a very big dog. I think I want to go home now and hug this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic