I\'ve got a JSP page with a piece of Javascript validation code which limits to a certain amount of characters on submit. I\'m using a so I can
This isn't really a JavaScript (or Java) problem - both layers report an accurate length for the string they are dealing with. The problem in your case is that the string gets transformed during the HTTP transmission.
If you absolutely must ensure that the string doesn't exceed a certain length, you can mimic this transformation on the client by replacing every instance of "\n" with "\n\r" - but only for length verification purposes:
textarea.value.replace(/\n/g, "\r\n").length