You can do this:

1º define de function into tht tags <%! ... %> at the begining of your jsp
page, like this:

   <%!
      String func() {
         return "Hello";
      }
   %>

2º And use the function in your scriptled code:

   <%
      out.println (func());
   %>

Note:

  if you want to do a function like this:


   <%!
      func() {
         out.println ("Hello");
      }
   %>

  you must change the function definition to this:

   <%!
      func(JspWriter out) {
         out.println ("Hello");
      }
   %>

  or something simillar, becouse the implicit object out, is implicit only
into the tags <% ... %>.

Sergio Queijo Diaz.
Soluziona - ISF.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to