tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gresh <dgr...@lle.rochester.edu>
Subject Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and JSP compilation errors
Date Mon, 12 Feb 2007 21:22:12 GMT
Hi list,

I'm running Tomcat 4.0.5 on UNIX and I am experiencing compilation 
errors when trying to compile a simple index.jsp file, which is only 
twenty lines or so, as I'm trying to learn JSP and starting small. First 
however, I'd like to get this question out of the way:

I've searched the web for information on Tomcat's directory structure. 
According to one page I found, Tomcat should have a /bin directory, 
which contains binary executables, such as startup.sh, which I can use 
to restart Tomcat. When I navigate to my Tomcat installation, I can find 
no /bin directory. The only directories I have are conf, work, logs, and 
webapps. I assume this is a major problem. If so, should I re-install 
Tomcat (and update to Tomcat 6.0 while I'm at it)?

I believe that problem leads to my JSP compilation errors problem. After 
posting my Java errors on a Java forum for JSP, a user replied that once 
I set the JAVA_HOME environment variable (it was set incorrectly and I 
had to set it to the proper path), I need to restart Tomcat. However, 
from what I've read online, I cannot restart Tomcat without executing 
the commands from the /bin directory.

I'm going to post my JSP errors if that is alright, just in case the 
problem is not based on the first one. If it is, please disregard this 
part, as I will revisit it later.

I have a small index.jsp file, and I have a small scriptlet in it that 
sets up an ArrayList<String>, for some basic tests. However, when I go 
to compile the file, I get an error. The relevant parts of my file are 
as follows:

<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title></title></head>
 
<body>
 
<%
    ArrayList<String> al = new ArrayList<String>();
    al.add("Row 1");
    al.add("Row 2");
    al.add("Row 3");
    al.add("Row 4");
%>
 
<TABLE BORDER=2>
    <%
        for (int i = 0; i < al.size(); i++) {
    %>
    <TR>
        <TD>Number</TD>
        <TD><%=al.get(i)%></TD>
    </TR>
    <%
        }
    %>
</TABLE>
 
 
</body>
</html>

The relevant part of the error message is:

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main
has been deprecated.


An error occurred between lines: 9 and 15 in the jsp file: /index.jsp

Generated servlet error:
/var/apache/tomcat/work/Standalone/localhost/_/index$jsp.java:68: '(' expected.
                    ArrayList<String> al = new ArrayList<String>();

Lines 9-15 are the lines in which the ArrayList<String> scriplet resides. I've checked
my JDK version to make sure it supports generics, which it does. If this problem is not related
to the first 
problem, I believe there may be a problem with my CLASSPATH variable. What exactly do I have
to set this variable to so Tomcat can
recognize the proper settings?

I hope this is not too much information. I will greatly appreciate any help that can be provided.

Thanks,
Dan


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message