Here's the situation: I practiced creating a mini blog application. I used Strut's EventDispatchAction to handle all post related methods like updating and listing posts.
I have an update() method (http://mywebsite/post?update) that updates the database and then if it's successful it forwards to the same action class but I used a different method to handle it, the list() method (http://mywebsite/post?list) which lists all the posts of the current user. The problem is it doesn't work and throws up a:
javax.servlet.ServletException:
The server side component of the HTTP Monitor has detected a java.lang.StackOverflowError. This happens when there is an infinite loop in the web module. Correct the cause of the infinite loop before running the web module again.
Do you guys have any idea on how to fix this? Any help would be greatly appreciated!
EDIT: I solved it guys. I just need to put value in the parameter of my forward, in my case I have to do: post?list=list instead of just post?list (the normal way). The method is ignored I guess if it doesn't have a value. It's really weird why Struts is behaving like this. Maybe someone can shed some light on this?