Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting java.lang.StackOverflowError - HFSJ pg 379

 
K Bala
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do the exercise given in pg 379 - compose the EL for this output.

When I try to run the code, I am getting java.lang.StackOverflowError. I commented the EL code in my JSP and just put a template text and still got the same error.

What am I doing wrong? Pls. help.

I have the following code.

ELform.html



ELresult.jsp - You can see that I have commented the EL code and just put a template text for testing.



PersonServlet.java



web.xml

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are looping to ELresult.jsp, which will cause the StackOverflow.

ELform.html -submit-> PersonServlet -forward-> PersonServlet -forward-> PersonServlet -forward-> ......

Forwarding to the jsp file will cause the servlet to be called again and again. You should change your HTML action.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!