This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes Check null field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Servlets
Bookmark "Check null field" Watch "Check null field" New topic
Author

Check null field

Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
Hi friends,
I'm passing bdesc to the servlet with contain some text so why I hit the exception and gives me
"request parameter missing String bdesc"
Thanks,
Elahe
-code----
bdesc = req.getParameter("bdesc");
if( null == bdesc )
{throw new Exception( "request parameter missing");}


Thanks,
Elahe
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12888
    
    5
1. Exactly how are you passing this parameter?
2. Is this code in a doGet or doPost?
3. Are there other parameters that get passed correctly?
Bill
Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
Thank you so much Bill I solved my program.
Sorry for late reply...
 
 
subject: Check null field