-----Mensagem original-----
De: Guilherme - PerConsult <[EMAIL PROTECTED]>
Para: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Data: Terça-feira, 21 de Dezembro de 1999 20:53
Assunto: function split doesn`t work


>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:

I think you must insert your code inside the tags:

<SCRIPT RUNAT="SERVER>

>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;
>}


</SCRIPT>

The JPS page is converted to a method _jspService() in a class.
Inserting your method in a JSP page is insert a method inside a
method, and it is illegal.

<SCRIPT RUNAT="SERVER> tag informs the JSP 'compiler' to place
the code 'out of' the method _jspService().

_____________________________________________________________________

Vinicios Torres                         [EMAIL PROTECTED]
ICHTUS Webmaster                             http://www.Ichtus.com.br

  ICHTUS - Edificando o Povo de Deus na Palavra de Deus na Internet
_____________________________________________________________________

===========================================================================
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