title: How to call function of JavaScript from servlet
body: <p>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 have written contoller in servlet.</p>
  
  <p>How to call the function of that JavaScript file from my servlet.</p>