A
as314
Hello,
the following example worked fine with Tomcat 4.0.4 but I encounter
problems using Tomcat 5.0.19:
"Dirkie.jsp" in TOMCAT_HOME\webapps\ROOT:
----------------------------
<%@ page language="java" contentType="text/html" %>
<%@ page import="Dirkie" %>
<html>
<head><title>Use external Java class</title></head>
<body>
Test<br><br>
<% Dirkie d = new Dirkie();
out.println(d.getMessage()); %>
</body>
</html>
----------------------------
"Dirkie.class" in TOMCAT_HOME\webapps\ROOT\WEB-INF\classes:
----------------------------
public class Dirkie {
public String getMessage() {
return "Hello Dirkie!";
}
}
----------------------------
When calling "http://localhost:8080/Dirkie.jsp" I get the following
error messages:
----------------------------
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
C:\java\tomcat\work\Catalina\localhost\_\org\apache\jsp\Dirkie_jsp.java:6:
'.' expected
import Dirkie;
^
----------------------------
What is the problem?
I hope, this is the right group for such problems.
Please send eMail to "(e-mail address removed)" if possible.
Thanks for your help!
Regards, Alfred
the following example worked fine with Tomcat 4.0.4 but I encounter
problems using Tomcat 5.0.19:
"Dirkie.jsp" in TOMCAT_HOME\webapps\ROOT:
----------------------------
<%@ page language="java" contentType="text/html" %>
<%@ page import="Dirkie" %>
<html>
<head><title>Use external Java class</title></head>
<body>
Test<br><br>
<% Dirkie d = new Dirkie();
out.println(d.getMessage()); %>
</body>
</html>
----------------------------
"Dirkie.class" in TOMCAT_HOME\webapps\ROOT\WEB-INF\classes:
----------------------------
public class Dirkie {
public String getMessage() {
return "Hello Dirkie!";
}
}
----------------------------
When calling "http://localhost:8080/Dirkie.jsp" I get the following
error messages:
----------------------------
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
C:\java\tomcat\work\Catalina\localhost\_\org\apache\jsp\Dirkie_jsp.java:6:
'.' expected
import Dirkie;
^
----------------------------
What is the problem?
I hope, this is the right group for such problems.
Please send eMail to "(e-mail address removed)" if possible.
Thanks for your help!
Regards, Alfred