Title:
Rosangela, desobri o meu erro:

eu estava fazendo um calculo na chamada da fun��o � isto est� errado, o
correto � eu fazer o calculo dentro da fun��o.

Ou seja, c�digo correto �:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
 <title>Untitled</title>
</head>

<body>
<%!
    public double Abc(double x) throws IllegalArgumentException {
  double result;

     if ( (x < 0 ) || ( x > 20) )
      throw new IllegalArgumentException("Out of range.");
     else if (x==0) return 1;
     else

    result = Math.PI * Math.pow (x,2);
    return result;
  }
   } %>

 PI = <%=Math.PI  %><br><br>
 10 elevado ao quadrado = <%= Math.pow (10,2) %><br><br>
 PI * 10*10 =  <%= Abc(10) %>
</body>
</html>

Rosangela obrigado pela ajuda.
Obrigado tamb�m a todos que me ajudaram.

[] 's
Kleber Rodrigo de Carvalho
Software Engineer
----- Original Message -----
Sent: Wednesday, June 27, 2001 8:35 AM
Subject: RES: [java-list] 500 Servlet Exception

Kleber...

No caso do primeiro erro, vc esqueceu de colocar ; no final da declara��o das vari�veis:

<%! private int x=2, result;%>

J� o segundo erro, achei que h� algo de estranho.... N�o est� faltandfo o cabe�alho de alguma fun��o???

result = Math.PI * Math.pow (x,2);

AQUI??? throws IllegalArgumentException {


~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rosangela Ap. Leal
[EMAIL PROTECTED]
Centro de Tecnologia Copersucar

~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Responder a