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 in your jsp, something like this:
//may need to import MyObj class definition...
<% MyObj myObj = (MyObj)request.getAttribute("MyObj"); %>
//Now you have access to the myObj object!!