Oi pessoal,
estou tentando testar a utilização de um bean em uma página JSP. Utilizo o
Caucho Resin como servidor JSP.
Tenho o JSP helloBean.jsp
<html>
<body>
<jsp:useBean id="hello" class="HelloBean"/>
<jsp:setProperty name="hello" property="*"/>
Hello, <jsp:getProperty name="hello" property="name"/>!
</body>
</html>
e o Bean WEB_INF/calsses/HelloBean.java
public class HelloBean
{
String name;
public HelloBean ()
{
this.name = "World";
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name=name;
}
}
O problema acontece quando chamo o JSP. O browser me retorna o seguinte
erro:
500 Servlet Exception
/cpnet/HelloBean.jsp:3: Class _jsp._cpnet.HelloBean not found.
HelloBean hello;
^
/cpnet/HelloBean.jsp:4: Class _jsp._cpnet.HelloBean not found.
hello = (HelloBean) pageContext.getAttribute("hello");
^
/cpnet/HelloBean.jsp:6: Class _jsp._cpnet.HelloBean not found.
hello = new HelloBean();
^
/cpnet/HelloBean.jsp:5: Class _jsp._cpnet.HelloBean not found.
out.print(((HelloBean)
pageContext.findAttribute("hello")).getName());
^
4 errors
----------------------------------------------------------------------------
----
Resin 1.2.2 -- Tue Jan 16 09:53:18 PST 2001
O que pode e estar provocando este erro?
Obrigado
Filipe Almeida
------------------------------ 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]
-------------------------------------------------------------------------