Hi! Solution needed
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sainath_Mahadevan
Posted On:   Tuesday, June 6, 2006 12:36 AM

Solution Hi I created a servlet which changes ownership of the file across files. But the servlet when deployed on TomCat5.0 shows the error java.lan.NullPointer Exception. Kindly advise the solution I have pasted the line where the error has occured!!! for furher querries please conatct me at pm.sainath@polaris.co.in or prav_veen@yahoo.com please help me as it is very urgent. There is a deadline to be complied with. If i fail, i will not be alive to see the next day. The following is the line where the error has occured: String s = httpservletrequest.getParameter("MasterShipFile").trim();    More>>

Solution


Hi I created a servlet which changes ownership of the file across files.
But the servlet when deployed on TomCat5.0 shows the error java.lan.NullPointer Exception.

Kindly advise the solution
I have pasted the line where the error has occured!!!
for furher querries please conatct me at pm.sainath@polaris.co.in
or prav_veen@yahoo.com
please help me as it is very urgent. There is a deadline to be complied with.
If i fail, i will not be alive to see the next day.

The following is the line where the error has occured:

String s = httpservletrequest.getParameter("MasterShipFile").trim();



   <<Less

Re: Hi! Solution needed

Posted By:   Byron_Tymvios  
Posted On:   Tuesday, June 6, 2006 02:26 AM


There probably a parameter in the request named MasterShipFile, before you perform a trim on your String you should first check for null as request.getParameter("paramName") will return null if there is no parameter with paramName in the request. And as you know you can't trim null.

About | Sitemap | Contact