Title: RE: [enterprise-list] Classe objeto = null (erro em JavaBean com JSP)

Adicione seu bean a um package.

Olhe em http://java.oreilly.com/news/jsptips_1100.html na sessao 6.

T+

    -----Original Message-----
    From:   Airton [SMTP:[EMAIL PROTECTED]
    Sent:   February 26, 2003 15:59
    To:     [EMAIL PROTECTED]
    Subject:        [enterprise-list] Classe objeto = null (erro em JavaBean com JSP)

    Por favor, algu�m pode me ajudar com o problema abaixo? O exemplo � do livro
    Core Servlets and Java Server Pages, mas o erro aparece em qualquer
    tentativa de rodar um jsp com javabean.
    Os exemplos do Tomcat 4.1.18 funcionam normalmente, o que mostra uma
    instala��o saud�vel.


    No arquivo jsp:

    <jsp:useBean id="stringBean" scope="session" class="StringBean" />


    A classe StringBean:

    public class StringBean  {
        private String message = "Nenhuma mensagem especificada";

        public String getMessage() {
            return (message);
        }

        public void setMessage(String message) {
            this.message = message;
        }

    }


    Os erros na execu��o:

    StringBean$jsp.java [64:1] cannot resolve symbol
    symbol  : class StringBean
    location: class org.apache.jsp.StringBean$jsp
                    StringBean stringBean = null;
                    ^
    StringBean$jsp.java [67:1] cannot resolve symbol
    symbol  : class StringBean
    location: class org.apache.jsp.StringBean$jsp
                        stringBean= (StringBean)
                                     ^
    StringBean$jsp.java [72:1] cannot resolve symbol
    symbol  : class StringBean
    location: class org.apache.jsp.StringBean$jsp
                                stringBean = (StringBean)
    java.beans.Beans.instantiate(this.getClass().getClassLoader(),
    "StringBean");
                                              ^
    StringBean$jsp.java [94:1] cannot resolve symbol
    symbol  : class StringBean
    location: class org.apache.jsp.StringBean$jsp

    out.print(JspRuntimeLibrary.toString((((StringBean)pageContext.findAttribute
    ("stringBean")).getMessage())));
                                                            ^
    4 errors
    Errors compiling StringBean.




    ---------------------------------------------------------------------
    Para cancelar a subscri��o, envie mensagem para: [EMAIL PROTECTED]
    Para comandos adicionais, envie mensagem para: [EMAIL PROTECTED]


========================================================
CONFIDENTIALITY NOTICE

This message and its attachments (if any) may contain confidential,
proprietary or legally privileged information and is intended only for
the use of the addressee named above. No confidentiality or privilege
is waived or lost by any mistransmission.

If you are not the intended recipient of this message you are hereby
notified that you must not use, disseminate, copy it in any form or take
any action in reliance on it. If you have received this message in error
please delete it and any copies of it and kindly inform the sender of this
e-mail by replying or go to www.pirelli.com on "contact us".
========================================================

Responder a