java.lang.NullPointerException

hi

'm gettin this error

java.lang.NullPointerException

at com.att.adv8.servlets.cis.RequestHandler.doPost(RequestHandler.java:27)

n line 27 of my program is

request.getRequestDispatcher("../cis/add_"+fname+".jsp").forward(request, response)

kindly help me to debug th error .

[322 byte] By [anmolgrada] at [2007-10-2 20:02:53]
# 1

Put this line before the current line #27System.out.println("request "+request+"\ndispatcher "+

request.getRequestDispatcher("../cis/add_"+fname+".jsp"));

One of those will display null. Then figure out why it is null.

atmguya at 2007-7-13 22:42:50 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
i cant do this since this is inside a servlet ...1)its workin absolutely fine on a standalone machine but when i deploy it on a server this gives NULL pointer exception2) the error is with getRequestHandler function . this func is not returnin a valid object
anmolgrada at 2007-7-13 22:42:51 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
I would not be surprised if this were null:request.getRequestDispatcher("../cis/add_"+fname+".jsp")
BIJ001a at 2007-7-13 22:42:51 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4

> I would not be surprised if this were null:

> > request.getRequestDispatcher("../cis/add_"+fname+".jsp

> ")

>

this code works fine on a standalone system .. y its an error when deployed on a server n accesed by a client ?

plz clarify y u wont b surprised ?

anmolgrada at 2007-7-13 22:42:51 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...