Hello all,
I'm doing this exercise about jsp and beans. Let's get to the point.
Here is part of my java bean code:
I compiled this and everything was fine.
Then, here is my jsp code:
Then I run this bean code in browser, which I found the following error message:
java.lang.NoClassDefFoundError: DateFormater
The DateFormater.java is saved under the same directory as DateAnzeige.java. The beansTest.jsp is in another directory. The beansTest_3.java (the Jasper Engine) only has:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
There is no import DateFormater;
Can anybody help me? Any hint will help!
Thanks soo much!
Andre
I'm doing this exercise about jsp and beans. Let's get to the point.
Here is part of my java bean code:
Code:
package beans;
import java.util.Calendar;
import java.util.Date;
import DateFormater;
public class DateAnzeige extends Object {
...// rest of the code here
}
I compiled this and everything was fine.
Then, here is my jsp code:
Code:
<html><head><title>beansTest</title></head>
<body>
<%@ page info="JSP bezieht Anrede aus Bean, Version 1.0, © Michael Siebert" %>
<jsp:useBean id="anrede" scope="page" class="beans.DateAnzeige" />
<jsp:setProperty name="anrede" property="anrede" value="Dies ist eine Anrede,<br><blockquote> die der Bean aufgezwungen wurde." />
</blockquote>
<jsp:getProperty name="anrede" property="anrede" />
<%@ include file="/templates/copyright.html" %>
</body></html>
Then I run this bean code in browser, which I found the following error message:
java.lang.NoClassDefFoundError: DateFormater
The DateFormater.java is saved under the same directory as DateAnzeige.java. The beansTest.jsp is in another directory. The beansTest_3.java (the Jasper Engine) only has:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
There is no import DateFormater;
Can anybody help me? Any hint will help!
Thanks soo much!
Andre