I
ian ward
Hello,
I'm getting more and more confused looking at old threads (and some are
very old) so I'll take the liberty of a new post for a very basic
question.
Why am I having a problem accessing my java class/bean from a jsp page
(which itself is running ok)? I'm running Tomcat 5 so I believe I need
a "myapp.xml" file in conf\catalina\localhost\ containing a context
element whose purpose is to associate an http call with the path of the
home directory where the class can be found (in \classes or in a jar in
\lib).
Then, in theory, 'jsp:usebean..etc.' will find the class I want.
Instead I get a stack trace including lines like this...
org.apache.jasper.JasperException: /jsp/listProgrammes.jsp(5,0)
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
(the top line is my jsp page which is trying to get hold of the bean)
Can anyone spell out the principles for me while I go away and check
for typos again? (Yes I have read some principles as explained in the
Tomcat docs but, well, it doesn't help for the moment.)
Many thanks
Ian
I'm getting more and more confused looking at old threads (and some are
very old) so I'll take the liberty of a new post for a very basic
question.
Why am I having a problem accessing my java class/bean from a jsp page
(which itself is running ok)? I'm running Tomcat 5 so I believe I need
a "myapp.xml" file in conf\catalina\localhost\ containing a context
element whose purpose is to associate an http call with the path of the
home directory where the class can be found (in \classes or in a jar in
\lib).
Then, in theory, 'jsp:usebean..etc.' will find the class I want.
Instead I get a stack trace including lines like this...
org.apache.jasper.JasperException: /jsp/listProgrammes.jsp(5,0)
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
(the top line is my jsp page which is trying to get hold of the bean)
Can anyone spell out the principles for me while I go away and check
for typos again? (Yes I have read some principles as explained in the
Tomcat docs but, well, it doesn't help for the moment.)
Many thanks
Ian