If you use beans that are not in a Java package, you have to explicitly
import them.  When your bean is in a package and you use the fully
qualified name (strongly recommended), this is not needed.

Craig


On Fri, 10 Aug 2001, [EMAIL PROTECTED] wrote:

> BeanTest.jsp
> ============

Add here: <%@ page import="SimpleBean" %>

> <jsp:useBean id="test" class="SimpleBean" />
> <jsp:setProperty name="test" property="message" value="Hello WWW" />
> <H1>Message: <I><jsp:getProperty name="test" property="message"
> /></I></H1>
> 
> 
> SimpleBean.java
> ===============
> public class SimpleBean {
>   private String message = "No message specified";
>   public String getMessage() {
>     return(message);
>   }
>   public void setMessage(String message) {
>     this.message = message;
>   }
> }
> 
> ---------------------------------------------
> 
> I've got 'BeanTest.jsp' on 'webapps/ROOT', and 'SimpleBean.java' and
> 'SimpleBean.class' on 'webapps/ROOT/WEB-INF/classes'.
> 
> But I get this message:
> 
> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> What am I doing wrong?
> 
> 
> ---------------------------------------------------------
> This mail was sent through Eoffice: http://www.eoffice.dk
> 
> 

Reply via email to