Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getParameter(String s)  RSS feed

 
Sarah Giles
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been programming in asp,but now i am trying to learn servlets,Allthough i know some java.
My question is about getParameter() method .
null is returned if there is no such parameterin the request,but what is returned if the the parameter exists but has no value.
thks
 
Amer Khan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An empty String is returned if the parameter exists but has no value,and yes 'null is returned if there is no such parameter in the request'.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!