hi, i have difficulty to understand of concept SetAttribute and getAttribute , can anyone please show me some sample code how is it work ? thank you very much for your time !!
class MyObject { String name; int count; MyObject(String n, int c) { name = n; count = c; } }
in your servlet: MyObject myObj = new MyObject(one, 1); request.setAttribute("MyObj", myObj); //now myObj is available in request //get the request dispatcher and forward or include to your jsp