Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to compile classes for jsp

Status
Not open for further replies.

okprog

Programmer
Feb 3, 2003
3
DE
I've got the same message for NT / Linux - standard installation at both systems - by trying to start this jsp:

<html>
<head>
<title>title</title>
</head>
<body>
<%@ page language=&quot;java&quot; %>
<%@ page import=&quot;Berech&quot; %>
<% Berech berech = new Berech();
berech.start();
%>
bla, bla bla
</body>
</html>

MESSAGE:

.../index_jsp.java:7: '.' expected
import Berech;
^
.../index_jsp.java:51: cannot resolve symbol
symbol : class Berech
location: class org.apache.jsp.index_jsp
Berech berech = new Berech();
^

What's going wrong in my index.jsp

TOMCAT 4.1.18 / JDK 1.4.1_01
classpath & environment is set and checked

with TOMCAT 3.x it runs.

best regards ok
 
I ran into this problem when I tried to use a Java class that was not in a package. I added a package statement to my class and then imported it with a package name and the problem was solved.
 
the same way as i solved this problem, anyway is there a way to import only classes without making packages ??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top