Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

problems with jsp bean

  Asked By: Carole    Date: Sep 11    Category: Java    Views: 520
  

i created beans in jsp ,but as i m retriving the values it is giving "null"
i dont know where i m lacking

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Dinh Tran     Answered On: Sep 11

Sounds like you have some uninitialized variables. Try
making a constructor for your bean  then inialize the
variables there. In addition to that, you might want
your accessor functions (getters) to do something like
this.

public void setSomeValue(String str){
if(str == null) someValue = "";
else someValue = str;
}

 
Didn't find what you were looking for? Find more on problems with jsp bean Or get search suggestion and latest updates.




Tagged: