Hi.

Assuming i have this king of bean:

public class MyJavaBean implements Serializable{
 public HashMap values = new HashMap();
  
 public String get(String name){
  String value = (String) values.get(name);
        if (value == null) {
            throw new NullPointerException
                    ("No mapped value for '" + name);
            }
        return value;
 }
 
 public void set(String name,String value){
  if(name == null){
            throw new NullPointerException
                    ("No name given");  
  }
  if(value == null){
   value="";
  }
  values.put(name,value);
 }
}

--->
during my action for example i did:
MyJavaBean obj = new MyJavaBean();
obj.set("test","Hope this work");
HttpSession session = request.getSession()
session.setAttribute("obj",obj);

now, my question is how will i be able to get the value i set
for test? is that possible?

is there other way i can get to the hashmap values directly from struts?

thanks a lot...

Reply via email to