[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
RE: Bean not working
> -----Original Message-----
> From: bernie@career.gjt.org [mailto:bernie@career.gjt.org]On Behalf Of
> Bernie
> There are no errors in any of the logs. I've included my attempt
> at a "bean" below. I know I'm not using get/set methods, but
> was just trying to get ANY method to work. The TestBean.class
> file is included in a wrapper.classpath= statement in my config
> file, although it's not in a jar.
That doesn't /sound/ right, surely you will want to specify the *directory*
where the class is in the classpath not the name of the file itself (maybe
you meant that).
In often use the following to track down problems in JSP pages:
<%
try
%>
...All your (service) JSP code and HTML goes in here...
<%
} catch( Throwable t )
t.printStackTrace();
t.printStackTrace( new PrintWriter( out ) );
}
%>
This catches all possible errors and exceptions and writes a stack trace to
the stderr stream (probably the error log file of your servlet engine) and
to the browser.
This should give you a clue as to what is going on ( I suspect your bean
isn't actually a bean :-) ).
HTH,
Steve
> //TestBean.java
> import java.util.*;
> import java.io.*;
>
> public class TestBean {
>
>
> public TestBean() {
>
>
> }
>
>
> public int SetVar(int NumVar)
> {
> return(NumVar + 5);
> }
>
>
> }