Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check null field

 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");}
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 291
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much Bill I solved my program.
Sorry for late reply...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic