Can the below way be implemented to store data in a DTO and access it from any where in the application rather than going for a context?
===

Can the below way be implemented to store data in a DTO and access it from any where in the application rather than going for a context ?

Please provide suggestions !!!

    public class DummyDTO {
     private String name = null;  
     private String age = null;     
     // getters and setters     
     public String getName() { 
        return name;  
     }  
    public void setName(String name) {       
    this.name = name;   
    }     
     public String getAge() {       
    return age;   
    }      
    public void setAge(String age) {       
    this.age = age;     }
    }   

    public class MyServletClass extends HttpServlet {  
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws ServletException,             IOException {
    DummyDTO dummyDTO = new DummyDTO();       
    dummyDTO.setName(request.getParameter("name"));   
    dummyDTO.setAge(request.getParameter("age"));
    AnotherClass.setValues(dummyDTO);  
    }       
  
    public class AnotherClass {       
    String name = "";    
     String age = "";    
      public static void setValues(DummyDTO dummyDTO) {       
       name = dummyDTO.getName();          
      age = dummyDTO.getAge();         
    }   
    }    