struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Raquepo" <>
Subject getting hash map values
Date Mon, 14 Jul 2003 03:37:26 GMT

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){

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

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...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message