The example that I picked from WROX's Professional Java Server Programming did
neither, that is it did not extend a class nor implemented an interface.
Any other thoughts, anyone?!
Thanks,
Jean
"Noren, Patrik" wrote:
> I havn't worked that much with EJB but shouldn't your Bean extend or
> implement some class or interface...?
> /paTRiK
>
> -----Original Message-----
> From: Jean Bresse [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 16, 2000 3:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: JSP, invoking a method, syntax
>
> Patrik, thank you for your reply.
>
> I tried removing the super() in the constructor, but same result.
>
> The error I get on the browser is the following:
>
> Error during JSP page processing
> java.lang.NoSuchMethodError: classwave.remedy.server.beans.DBManager: method
> getTheTruth()Z not found
>
> I know that invoking getMore() works with the following jsp code:
>
> <%= db.getMore()%>
>
> So why would <% if (db.getTheTruth()) { %> not work???
>
> I understand from the error that it cannot find the method, but I simply
> don't
> know what I'm doing wrong... I have no explanation either for the
> additional
> "Z" in the error.
>
> ANY guesses would be most appreciated...
>
> Regards,
>
> Jean
>
> "Noren, Patrik" wrote:
>
> > I dont know but u call super() in your bean but the class DBManager doesnt
> > extend anything...could it be this?
> > /Patrik
> >
> > -----Original Message-----
> > From: Jean Bresse [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 15, 2000 6:57 AM
> > To: [EMAIL PROTECTED]
> > Subject: JSP, invoking a method, syntax
> >
> > Hi everyone...
> > I am just getting my feet wet with JSP, so please bare with me with the
> > following question!
> >
> > This is my bean:
> >
> > package classwave.remedy.server.beans;
> >
> > public class DBManager {
> >
> > public DBManager() {
> > super();
> > }
> >
> > public boolean getTheTruth() {
> > return true;
> > }
> >
> > public String getMore() {
> > return "this is good!";
> > }
> > }
> >
> > And this is my JSP page:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>
> > Logon Page for Remedy
> > </TITLE>
> > </HEAD>
> > <BODY>
> > <%@ page language="java" %>
> > <jsp:useBean id="db" scope="session"
> > class="classwave.remedy.server.beans.DBManager" />
> > <% if (db.getTheTruth()) { %>
> > THE TRUE IS HERE
> > <% } else { %>
> > NO TRUTH AT ALL
> > <% } %>
> > This is my second jsp... and there is more : <%= db.getMore()%>
> > wow!
> > </BODY>
> > </HTML>
> >
> > The page won't work as it fails on the following line:
> > <% if (db.getTheTruth()) { %>
> >
> > My first guess was the syntax was wrong but if so couldn't come up with
> > the right one. If someone would be so kind as to put me on the right
> > track, I would really appreciate it!
> >
> > Regards,
> >
> > Jean
> >
> >
> ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
> ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html