u can use any thing u have declared or defined(variables or method) in <%! %> by calling the namein <%= %>e.g:<%! public String getName() { return name; } %><html><body><%= getName(); %></body></html>