Page 1 of 1

About Question enthuware.jwpv6.2.736 :

Posted: Wed Mar 21, 2012 5:01 pm
by cengizc
I tried creating these 2 files in a Glassfish 3.1.2 Web application, container refuses to compile test2.jsp thus is does not include it while translating the test.jsp.

Checking the GlassFish server logs, a StackOverflow exception is thrown
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:161)
at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:394)
at org.apache.jasper.compiler.Parser.parse(Parser.java:185)
Exception in thread "http-bio-8080-exec-5" java.lang.StackOverflowError
at org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1777)
at org.apache.jasper.compiler.Parser.parse(Parser.java:135)
EDIT After returning to sanity: I included the page to the page itself, that caused StackOverflow.

No problems in the question.

Re: About Question enthuware.jwpv6.2.736 :

Posted: Wed Mar 21, 2012 7:40 pm
by admin
That is correct and is also noted in the detailed explanation provided with the question.
Note that if requested separately, test2.jsp will give an error while compilation because s is undefined.
test.jsp should compile fine.

HTH,
Paul.

Re: About Question enthuware.jwpv6.2.736 :

Posted: Thu Mar 22, 2012 6:55 am
by Guest
No, test2.jsp doesn't compile, it's not translated during deployment of the web app, thus could not be included in test.jsp.

I'm not requesting test2.jsp independently.

You can setup a web app project and try it yourself.

Re: About Question enthuware.jwpv6.2.736 :

Posted: Thu Mar 22, 2012 8:33 am
by admin
I just tested it of Tomcat 7.0.22 and it works as given. I am not sure why you are trying to compile test2.jsp. The question is about test.jsp, which compiles fine. Yes, test2.jsp will not compile and it is explained in the question why it will not compile. It is not expected to compile.

HTH,
Paul.

Re: About Question enthuware.jwpv6.2.736 :

Posted: Thu Mar 22, 2012 11:12 am
by cengizc
Well, I don't know what really caused those exceptions but I couldn't reproduce them today in a new app.

Maybe I stupidly included the page to itself.