hi..i want to call a java method written in jsp page once a button is cliked..how can i do this??below is the sample code..thank u in advance...
<input type="button" name="btn1" value="Click">
<%! public void testMethod()
{%>
<select name="select2">
<%try{ session = request.getSession();
List v = (List)session.getAttribute("name");
for(Iterator it=v.iterator();it.hasNext()

{
Object[] row = (Object[])it.next();
out.println(row[0]);
out.println(row[1]);
str=(String)row[0];
%>
<option><%=str%></option>
<%}}
catch(Exception e)
{}finally{}%>
</select>
<%! }%>