0

When I called JSP page at that time java file or servlet file call using javascript.

I mean to say When JSP page load event java or servlet code execute.

  • Please visit the [help], take the [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output. – mplungjan Jul 09 '18 at 11:38
  • How to call java class –  Jul 09 '18 at 12:05
  • Take the top and bottom duplicate and mix – mplungjan Jul 09 '18 at 12:06
  • `window.addEventListener("load", function load(event){ function updateDB() { var xhr = new XMLHttpRequest(); xhr.open("POST", "database/update.html", true); xhr.send(null); /* ignore result */ } )}` – mplungjan Jul 09 '18 at 12:08
  • It's not working in Java ,Because how to call java class method –  Jul 09 '18 at 12:19
  • You mean https://stackoverflow.com/questions/15944000/calling-a-java-method-in-ajax – mplungjan Jul 09 '18 at 12:24
  • yes, for example, add an item.jsp page load at that time item.java file and its method should be called using ajax or js –  Jul 09 '18 at 12:35
  • read the LINKS!!! – mplungjan Jul 09 '18 at 12:36
  • But here not trusted answer. –  Jul 09 '18 at 12:38
  • https://www.google.nl/search?q=Calling+a+java+method+in+aja – mplungjan Jul 09 '18 at 12:58
  • Your question as almost ZERO information. Please delete the question and come back with a researched and well defined question after reading the links I posted in my first comment. SO is not your private Google filter – mplungjan Jul 09 '18 at 12:59

0 Answers0