Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with http request and external javascript

 
supriya riya
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





 
Eric Pascarello
author
Rancher
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic