1

I am trying to include a jsp page which contains huge content into a content area, I am getting this error :

constant string too long , unable to compile class for jsp.

Any work around this problem ?

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61
  • 1
    This might help http://stackoverflow.com/questions/14263158/jsp-constant-string-too-long – Sachin Thapa Sep 24 '13 at 18:46
  • 1
    There is a limitation for string literals in java, if your string constant's length is more than 65535 then the class win not compile. see this [SO question](http://stackoverflow.com/questions/8323082/size-of-initialisation-string-in-java) and especially the link to the the [jvm specs](http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4.7) – A4L Sep 24 '13 at 18:53

1 Answers1

0

The most simple solution for your problem could be splitting this huge content into multiple jsp pages and including them dynamicly (using <jsp:include>) into one single jsp.