jump to navigation

Define function in jsp May 11, 2006

Posted by maxmil in : Java,jsp , trackback

Been working with some very long messy jsp's. In this environment using servlets or external classes was not an option but the least i could do was to try to extract methods from the mess… Heres how to define a method in a jsp. Include it at the bottom.

<%!
  public void btn_AddUpdate(HttpServletRequest request, JspWriter out)  throws java.io.IOException {
    //do your stuff here, normally involves out.print(…) 
  }
%>

Comments»

no comments yet - be the first?