You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Gresh <dg...@lle.rochester.edu> on 2007/02/12 22:22:12 UTC
Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and JSP
compilation errors
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
Re: Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and
JSP compilation errors
Posted by Daniel Gresh <dg...@lle.rochester.edu>.
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Daniel,
>
> Daniel Gresh wrote:
>
>> 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.
>>
>
> It might not be.
>
> How did you install Tomcat? If you used a version from a Linux
> distribution (you didn't specify what "UNIX" meant) then the
> installation paths can be all kinds of screwed up.
>
> If you installed it yourself from a package from apache.org then you
> /should/ have a bin directory as you describe.
>
> Another possibility is that you are looking at CATALINA_BASE instead of
> CATALINA_HOME and you are using a shared binary installation but looking
> at the part that should be application-specific (see RUNNING.TXT in your
> installation directory and read the "Advanced" section to understand
> what I'm talking about).
>
>
>> If so, should I re-install Tomcat (and update to Tomcat 6.0 while I'm at it)?
>>
>
> Since you are just starting out, I highly recommend getting either the
> latest stable version (5.5) or the latest unstable version (6.0 --
> apologies to the authors if 6.0 /is/ considered stable) and start there.
>
> Unless there is a very compelling reason to stick with a version that
> old, I'd advise you to upgrade.
>
>
>> 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.
>>
>
> Wow, I've never see that before. I assume that you are using a rather
> new version of Java (maybe JDK 1.5 or 1.6) with Tomcat 4.0. Tomcat 4.0
> uses the old javac compiler and the newer ones use something else. It's
> possible that if you are using Java 5 (JDK 1.5) or Java 6 (JDK 1.6) that
> support has actually be completely removed for the old compiler invocation.
>
> An upgrade to a move recent version of Tomcat will certainly help if I
> have correctly identified the problem.
>
>
>> 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?
>>
>
> You can't change the CLASSPATH used by Tomcat (well, you /can/, but
> there's no reason to do so). I think that your Tomcat version is killing
> you, here.
>
> Upgrade and try again. If you have problems at that point, feel free to
> post another question.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF0N1X9CaO5/Lv0PARAsWYAKCZpgQlv/yHXkWOdRco5NRNr/EM0ACgivnB
> RGUigcc+9EA4lNNJKakg6+o=
> =XRRR
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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
>
>
>
Hi, thanks for the replies.
Reading RUNNING.txt was very helpful, as the problem with not finding
the /bin directory and a problem I experienced after I found the bin
directory was due to the presence of a CATALINA_HOME and a
CATALINA_BASE. I found my /bin directory in CATALINA_HOME, and used
shutdown.sh to shutdown Tomcat. More on that later, as that lead to a
problem.
The reason I have Tomcat 4.0.5 is that my server admin is very busy and
therefore won't have time to upgrade to a more recent version for
awhile. So, I'm stuck with Tomcat 4.0.5 for awhile unless I have a
compelling reason to upgrade. Although in the replies I have gotten
upgrading is highly recommended, I want to first sort out the problem I
just got after using shutdown.sh. Then once the server isn't causing me
any more problems with that and if it IS causing me problems with my
JSP, I will most certainly upgrade; I'm not disregarding anyones advice.
Anyway, I used shutdown.sh to shutdown Tomcat. I waited for a minute,
then I used startup.sh to start Tomcat again. However, when I navigate
to my localhost:8080 directory to view my index.jsp page, I get the
following error:
Apache Tomcat/4.0.5 - HTTP Status 404 -
/var/apache/tomcat/work/Standalone/localhost/_/index$jsp.java
(Permission denied)
------------------------------------------------------------------------
*type* Status report
*message* _/var/apache/tomcat/work/Standalone/localhost/_/index$jsp.java
(Permission denied)_
*description* _The requested resource
(/var/apache/tomcat/work/Standalone/localhost/_/index$jsp.java
(Permission denied)) is not available._
I'm not sure what this is telling me. It says permission denied, but in
the description, it says the resource is not available. This may be
something that would be more appropriate for me to ask my system admin,
but I figured I would post here first, just to see if it is a problem I
can solve on my own. Is there any log file I could post that might give
more information, or is this pretty much a problem I need to resolve
with my system admin?
Thanks for the help,
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
Re: Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and
JSP compilation errors
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel,
Daniel Gresh wrote:
> 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.
It might not be.
How did you install Tomcat? If you used a version from a Linux
distribution (you didn't specify what "UNIX" meant) then the
installation paths can be all kinds of screwed up.
If you installed it yourself from a package from apache.org then you
/should/ have a bin directory as you describe.
Another possibility is that you are looking at CATALINA_BASE instead of
CATALINA_HOME and you are using a shared binary installation but looking
at the part that should be application-specific (see RUNNING.TXT in your
installation directory and read the "Advanced" section to understand
what I'm talking about).
> If so, should I re-install Tomcat (and update to Tomcat 6.0 while I'm at it)?
Since you are just starting out, I highly recommend getting either the
latest stable version (5.5) or the latest unstable version (6.0 --
apologies to the authors if 6.0 /is/ considered stable) and start there.
Unless there is a very compelling reason to stick with a version that
old, I'd advise you to upgrade.
> 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.
Wow, I've never see that before. I assume that you are using a rather
new version of Java (maybe JDK 1.5 or 1.6) with Tomcat 4.0. Tomcat 4.0
uses the old javac compiler and the newer ones use something else. It's
possible that if you are using Java 5 (JDK 1.5) or Java 6 (JDK 1.6) that
support has actually be completely removed for the old compiler invocation.
An upgrade to a move recent version of Tomcat will certainly help if I
have correctly identified the problem.
> 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?
You can't change the CLASSPATH used by Tomcat (well, you /can/, but
there's no reason to do so). I think that your Tomcat version is killing
you, here.
Upgrade and try again. If you have problems at that point, feel free to
post another question.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF0N1X9CaO5/Lv0PARAsWYAKCZpgQlv/yHXkWOdRco5NRNr/EM0ACgivnB
RGUigcc+9EA4lNNJKakg6+o=
=XRRR
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
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
RE: Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and JSPcompilation errors
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Daniel Gresh [mailto:dgresh@lle.rochester.edu]
> Subject: Tomcat 4.0 on UNIX: no /bin directory in
> $CATALINA_HOME, and JSPcompilation errors
>
> 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)?
You may well have some bizarre 3rd-party packaging of Tomcat, which
frequently makes a mess of the installation. Since 4.0.5 is over four
years old, you should definitely upgrade. 6.0 is still beta, but if
you're just using it to learn, it's probably a good choice. Use 5.5.20
if you want a more proven version.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
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