Adelina, 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>

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

[] 's
Kleber Rodrigo de Carvalho
Software Engineer

----- Original Message -----
From: "Adelina A. Sesconetto Borges" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 8:43 AM
Subject: Re: [java-list] 500 Servlet Exception


>
>
>         Coloque sempre os ; onde voc� os colocaria em um programa JAVA
puro.
> Depois da defini��o dos atributos  x e result, por exemplo.
>
>                                 Adelina
>
> Kleber Rodrigo de Carvalho wrote:
>
> > PessALL !!!
> > Tenho o seguinte codigo em JSP:
> >
> > <html>
> > <head>
> >  <title>Untitled</title>
> > </head>
> >
> > <body>
> > <%! private int x=2, result%>
> >
> > <%
> >   result = Math.PI * Math.pow (x,2) throws IllegalArgumentException {
> >   if ( (x < 0 ) || ( x > 20) )
> >    throw new IllegalArgumentException("Out of range.");
> >   else if (x==0) return 1;
> >   else return x *(x+1);
> >  } %>
> >
> > </body>
> > </html>
> >
> > Mas ao executar este c�digo, d� o seguinte erro:
> >
> > 500 Servlet Exception
> > /krc/teste4.jsp:9: ';' expected.
> >    private int x=2, result
> >                           ^
> > /krc/teste4.jsp:13: ';' expected.
> >   result = Math.PI * Math.pow (x,2) throws IllegalArgumentException {
> >                                    ^
> > 2 errors
> >
> > Quem puder me ajudar, eu agrade�o.
> >
> > Muito obrigado
> >
> > [] 's
> > Kleber Rodrigo de Carvalho
> > Software Engineer
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> > ------------------------------ LISTA
SOUJAVA ----------------------------
> > http://www.soujava.org.br  -  Sociedade de Usu�rios Java da Sucesu-SP
> > d�vidas mais comuns: http://www.soujava.org.br/faq.htm
> > regras da lista: http://www.soujava.org.br/regras.htm
> > para sair da lista: envie email para
[EMAIL PROTECTED]
>
> -------------------------------------------------------------------------
>
>
> ------------------------------ LISTA SOUJAVA ----------------------------
> http://www.soujava.org.br  -  Sociedade de Usu�rios Java da Sucesu-SP
> d�vidas mais comuns: http://www.soujava.org.br/faq.htm
> regras da lista: http://www.soujava.org.br/regras.htm
> para sair da lista: envie email para [EMAIL PROTECTED]
> -------------------------------------------------------------------------


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


------------------------------ LISTA SOUJAVA ---------------------------- 
http://www.soujava.org.br  -  Sociedade de Usu�rios Java da Sucesu-SP 
d�vidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
para sair da lista: envie email para [EMAIL PROTECTED] 
-------------------------------------------------------------------------

Responder a