I am new to web development. I have an external JavaScript file which has a function to show a prompt with error details. I need to pass the error message to the function. I
It is not possible to call a java script function from a servlet. Rather, you can print javascript code using
response.getOutputStream().println("[javascript code]");
into the browser and then the javascript function will be executed in the browser.