I'm tryng to write a Front Controller which can process my urls like this: http://url/controller/method The idea is ot intercept all the URLs in the web.xml and to route them to the FrontController. Then, the FrontController would call the right method in the right controller (servlet) and pass them the ServletContext and the response et request object.
I've wrote this implementation of my idea:
The issue here is, whenever I call the forward method in my Foo controller, I've got a so big stack trace that I cannot have the original exception...
It looks like this:
Any help would be nice, or if you have a better method to implement my idea I'd be glad to hear it but I don't want to use any framework, i's for purpose learning only. Of course, in a real application I'd use a framework.
But you're running this front controller in some kind of container, right? (Tomcat, JBoss, Websphere...) So configure that to write logs to a file. In fact it may already be configured that way and you just have to find the log files.
posted 9 years ago
I think it has something to do with my web.xml because I solved the issue.
Here is my latest implementation, please tell me what do you think about it.