Try putting the class in a package.

Mark

[EMAIL PROTECTED] wrote:
I'm attempting to get a very basic webapp up and running, but can't seem
to overcome this error:

org.apache.jasper.JasperException: /build/begin.jsp(1,1) The value for the
useBean class attribute Question is invalid.

I've made doubly sure that my class, Question, is declared public and has
a public default constructor.  The class files themselves are stowed in
the right place, so i'm stuck on what could possibly be wrong. Any help at
all, would be greatly appreciated!

 The jsp is as follows:

<jsp:useBean id="question" class="Question" scope="session"/>
<HTML>
<BODY>

<%

        //Display the Question
        Question q = new Question();
        String body = q.getBody();
        out.println(body);

%>

</BODY>
</HTML>

The web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>

<welcome-file>
  index.html
</welcome-file>

<session-config>
<session-timeout>54</session-timeout>
</session-config>

<servlet>
<servlet-name>Question</servlet-name>
<servlet-class>Question</servlet-class>
</servlet>

</web-app>

And the full error stack listing:

org.apache.jasper.JasperException: /build/begin.jsp(1,1) The value for the
useBean class attribute Question is invalid.
        
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
        
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
        
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
        
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
        org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
        org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
        org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
        org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
        org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
        org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
        org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
        org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
        
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to