-1

I am getting an error like this:

JSP : Code too large in compilation of jsp page

I have around 500 lines of javaScript code in my JSP. Is it resolve if move script code to another JS file?

Jan Sršeň
  • 1,045
  • 3
  • 23
  • 46
  • 1
    why don't you try it and see? – Scary Wombat Oct 31 '18 at 08:29
  • "I have around 500 lines" amount of lines doesn't matter, it only shows how many line separator characters you used. It is length of entire code (in simpler terms how long are those lines) matters. Please see [JSP : Code too large in compilation of jsp page](https://stackoverflow.com/q/16707837) – Pshemo Oct 31 '18 at 08:51

1 Answers1

0

I think you should introduce js as an external js.

<script src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.js" type="text/JavaScript"></script>

Simon
  • 29
  • 7