Hello...

I done a function to split a string, and returns in a Vector. Well, as
an application, it works perfectly. Then I tried to put it in a file
.inc  But I don`t know why it isn`t working when I call this function in
my JSP file

The split.inc is:
------
<%
public Vector split(String myString, char caracter){
       Vector lista = new Vector();
       int ocorrencia = 0;
       int numero = -1;
       while ( (numero = myString.indexOf(caracter)) >= 0 ){
         lista.addElement(myString.substring(ocorrencia,numero));
            myString = myString.substring(numero+1,myString.length());
       }
        lista.addElement(myString);
  return lista;
}
%>
------

In the JSP file I call like this:
> split(string, "parameter");

Where parameter can be a #, for instance.

Can anybody tell me what`s is wrong.

Thank you,

   Guilherme dos Santos Tsubota
   _________________________________
   Perrotti Informatica - PerConsult
   Sao Paulo - SP - Brazil

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to