This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 12759
    
    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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
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