A variable wrote inside a JSP function is not recognized
===

this function is written inside the HEAD tag of a jsp file and i call it from inside the jsp BODY tag:

    <%!
    public void func1(String var1, String var2)
    {
        String Name = var1 + "," + var2;
    %>
        <input type='image' name=<%=Name%>
         src='somePath' onclick="submit()"/></br>
    <%!
    }
    %>

i'm getting an error message:
"cannot find symbol
symbol: variable Name
location: class SimplifiedJSPServlet"

any suggestion why Name is not recognized ? did i write it properly and placed it in the right place?