This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android 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: 12761
    
    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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Check null field
 
Similar Threads
Variable type question?
How to write to new table?
Where I have to mention my template in XML?
Need help! Request Headers!
Exception in Servlet