File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet exception occurs at Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet exception occurs at "dispatcher.forward()"" Watch "servlet exception occurs at "dispatcher.forward()"" New topic

servlet exception occurs at "dispatcher.forward()"

tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
my code is :

whenever i am calling this servlet code from my jsp file :

it is showing "servlet exception"

showing this a 100-200 times then a "stackoverflow error".

if i put a stacktrace , it is giving :

is there a method to get the root cause of the servlet exception , how can i know the exact cause of the exception.
it looks as if a infinite loop is at line 10 in the servlet .
please help me.

Do Right , Fear No Man
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 802

@ tushar
Also give details of directory structure application and web.xml

SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12951
The significant point is:
showing this a 100-200 times then a "stackoverflow error".

You have created circular logic with your forwarding which just keeps calling recursively until the stack runs out of room.

veeresh soni

Joined: Dec 10, 2009
Posts: 12
I think you should use another way to get dispacher


try this
I agree. Here's the link:
subject: servlet exception occurs at "dispatcher.forward()"