• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting java.lang.StackOverflowError - HFSJ pg 379

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic