Re: [java-list] 500 Servlet Exception
AparentementetabUsuarios éuma instância privadade um objeto da classe Usuarios. Declare-a pública. Um abraço, Lincolm - Original Message - From: José Maria de Oliveira - Depto. Informática To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 12:41 PM Subject: [java-list] 500 Servlet Exception Quer ter seu próprio endereço na Internet? Garanta já o seu e ainda ganhe cinco e-mails personalizados. DomíniosBOL - http://dominios.bol.com.br Boa tarde, Alguem pode me dizer o que eh o erro abaixo ? Fiz um teste enviando os dados para o console, deu certo, porque no JSP nao ? Obrigado... 500 Servlet Exception/formUsuarios.jsp:24: Variable tabUsuarios in class DadosUsuarios not accessible from class _jsp._formUsuarios__jsp. Usuarios.tabUsuarios.PosPrimeiroRegistro(); ^ /formUsuarios.jsp:26: Variable tabUsuarios in class DadosUsuarios not accessible from class _jsp._formUsuarios__jsp. while ( Usuarios.tabUsuarios.PosProximoRegistro() ) { ^ 2 errors []s,
Re: [java-list] 500 Servlet Exception
Talvez esta variável seja private ou protected. Coloque como public. -Ecil C. TeodoroSoftware ArchitectE-Cube SystemsBanking SolutionsSão Paulo - Brazilmailto:[EMAIL PROTECTED]- - Original Message - From: José Maria de Oliveira - Depto. Informática To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 12:41 PM Subject: [java-list] 500 Servlet Exception Boa tarde, Alguem pode me dizer o que eh o erro abaixo ? Fiz um teste enviando os dados para o console, deu certo, porque no JSP nao ? Obrigado... 500 Servlet Exception/formUsuarios.jsp:24: Variable tabUsuarios in class DadosUsuarios not accessible from class _jsp._formUsuarios__jsp. Usuarios.tabUsuarios.PosPrimeiroRegistro(); ^ /formUsuarios.jsp:26: Variable tabUsuarios in class DadosUsuarios not accessible from class _jsp._formUsuarios__jsp. while ( Usuarios.tabUsuarios.PosProximoRegistro() ) { ^ 2 errors []s,---Outgoing mail is certified Virus Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.380 / Virus Database: 213 - Release Date: 24/07/2002
[java-list] 500 Servlet Exception
Boa tarde, Alguem pode me dizer o que eh o erro abaixo ? Fiz um teste enviando os dados para o console, deu certo, porque no JSP nao ? Obrigado... 500 Servlet Exception/formUsuarios.jsp:24: Variable tabUsuarios in class DadosUsuarios not accessible from class _jsp._formUsuarios__jsp. Usuarios.tabUsuarios.PosPrimeiroRegistro(); ^ /formUsuarios.jsp:26: Variable tabUsuarios in class DadosUsuarios not accessible from class _jsp._formUsuarios__jsp. while ( Usuarios.tabUsuarios.PosProximoRegistro() ) { ^ 2 errors []s,
Re: [java-list] 500 Servlet Exception
Title: Rosangela, desobri o meu erro:eu estava fazendo um calculo na chamada da função é isto está errado, ocorreto é eu fazer o calculo dentro da função.Ou seja, código correto é:!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"htmlheadtitleUntitled/title/headbody%! 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 %brbr10 elevado ao quadrado = %= Math.pow (10,2) %brbrPI * 10*10 = %= Abc(10) %/body/htmlRosangela obrigado pela ajuda.Obrigado também a todos que me ajudaram.[] 'sKleber Rodrigo de CarvalhoSoftware Engineer - Original Message - From: Rosangela Aparecida Leal To: '[EMAIL PROTECTED]' 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
Re: [java-list] 500 Servlet Exception
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 titleUntitled/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 %brbr 10 elevado ao quadrado = %= Math.pow (10,2) %brbr 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 titleUntitled/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] -
[java-list] 500 Servlet Exception
PessALL !!! Tenho o seguinte codigo em JSP: html head titleUntitled/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] -
RES: [java-list] 500 Servlet Exception
Title: 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
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 titleUntitled/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] -
Re: [java-list] 500 Servlet Exception
So pra voltar na discussão sobre XP este código fede: result = Math.PI * Math.pow (x,2) throws IllegalArgumentException { if ( (x 0 ) || ( x 20) ) fede aqui. Sempre use {} aode pode ter um compound statement (leiabilidade do código) throw new IllegalArgumentException(Out of range.); else if (x==0) return 1; fede aqui: sempre coloca o statement do if numa outra linha. O depurador somente para uma vez e não se sabe de passou ou não passou. else return x *(x+1); } % porem: result = Math.PI * Math.pow (x,2); try{ if ( (x 0 ) || ( x 20) ){ throw new IllegalArgumentException(Out of range.); } else if (x==0) { return 1; } else { return x *(x+1); } } catch (Exception ex){ ex.printStackTrace() } -- 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] -