Tomcat 6.0.9 not recognizing deletion of Applet class

2007-05-10 Thread Daniel Gresh

Hi,

I have a JApplet class in my $CATALINA_HOME/webapps/mywebapp directory 
called applet.NVACApplet. It is part of the applet package. I load this 
applet through NVAC.jsp.


I was making some changes to the class and recompiled. However, after 
reloading the webapp and making numerous changes, I began to notice the 
applet, when I navigated to it at 
http://localhost:port/mywebapp/NVAC.jsp was not changing at all. At 
first, I figured something was wrong with my Java code. However, that 
compiled fine and I was getting no errors at runtime, and the applet was 
apparently loading.


Finding this highly unusual, I deleted the entire applet package from 
$CATALINA_HOME/webapps/mywebapp, as well as the applet package from 
WEB-INF/classes. Then, I navigated to $CATALINA_HOME and did a find 
command, searching for NVAC*, and did not find any NVACApplet class 
floating around anywhere.


However, when I navigate to the JSP page, it STILL loads the Applet. If 
I change the name of the applet it is loading I obviously get a 
NoClassDefFoundError, which apparently means it is somehow finding 
applet.NVACApplet, which makes absolutely no sense to me.


I've shutdown Tomcat numerous times and rebooted. I've tried everything 
I can think of, but I'm completely clueless. Where on earth could it be 
finding this applet class? I've deleted every instance of 
applet.NVACApplet I could find from my entire computer. Is it storing 
the class in some directory somewhere?


Here is the JSP page code, if it helps:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html
titleNVAC Polling Controller/title
body
applet code=applet.NVACApplet width=200 height=100
Your browser does not support the applet tag.
/applet
%
//Service.init();
%
%
//out.print(Service.showString());
%
/body
/html

Thanks,
Dan

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



Re: Tomcat 6.0.9 connection stopped working and will not resume

2007-04-17 Thread Daniel Gresh

Rashmi Rubdi wrote:

On 4/16/07, Daniel Gresh [EMAIL PROTECTED] wrote:

Hi,

I was editing a JSP page. I saved the file, and refreshed the web page
at http://localhost:port/myapp/page.jsp. Apparently, this caused Tomcat
to shut down for some reason. I had this problem before, but I don't
remember how I solved it.


Try the settings mentioned under Preventing dB connection pool leaks
at 
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html 




Anyway when I had the problem previously I was
able to call startup.sh on the server to start it up again and tinker
with my jsp page. However, when I call startup.sh now, it seems to go
fine, but I'm getting a connection refused error in my browser. I can
call shutdown.sh fine as well after I call startup.sh, which is puzzling
to me.


Are there any specific and relevant error messages in Tomcat's log files?



Is there anything I can look at to help determine the source of this
problem? What could have gone wrong?


The Common Problems section:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Common%20Problems 


covers a few things to watch out.



Thanks,
Dan




-Rashmi

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



Hi,

I figured out what caused Tomcat to shut down; it had happened to me 
before. I had some:


System.exit(0);

calls in some of my .java files that I had forgotten to remove. I 
removed those calls, restarted Tomcat, and it seems to be working fine.


Thanks for the help,
Dan

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



Tomcat 6.0.9 connection stopped working and will not resume

2007-04-16 Thread Daniel Gresh

Hi,

I was editing a JSP page. I saved the file, and refreshed the web page 
at http://localhost:port/myapp/page.jsp. Apparently, this caused Tomcat 
to shut down for some reason. I had this problem before, but I don't 
remember how I solved it. Anyway when I had the problem previously I was 
able to call startup.sh on the server to start it up again and tinker 
with my jsp page. However, when I call startup.sh now, it seems to go 
fine, but I'm getting a connection refused error in my browser. I can 
call shutdown.sh fine as well after I call startup.sh, which is puzzling 
to me.


Is there anything I can look at to help determine the source of this 
problem? What could have gone wrong?


Thanks,
Dan

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



Re: Example of a build.xml File for Tomcat ?

2007-03-14 Thread Daniel Gresh

James Javaman wrote:

Hello,

I am trying to setup a build.xml file for a servlet.  I am using the
following 2 URL's as references:

http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant 



http://www.onjava.com/onjava/2003/01/08/examples/build.xml.html


So my problem is I don't understand how day-to-day development would work
using this build.xml file.  For example, let's say I change some code 
that

will run on the servlet in a file called: MyServlet.java.
What series of ant commands would I run to reflect the change? Would 
it be:

ant undeploy
ant deploy
ant gui

I'm just asking because it seems like 'ant undeploy' and 'ant deploy' are
time-consuming to run if all I'm changing is one file.  I kind of 
confused
on how 'ant reload' is supposed to be used in the context of these 
files.  I
guess for 'ant reload' I would have to manually copy the output of 
javac to
the tomcat folder?  Does anyone have a more elegant build.xml file (or 
have

a suggestion for creating one.)

Thank you very much.  A solution to this problem will no doubt save me 
a lot

of development time.

ant reload simply reloads a web application. Therefore, if you update 
MyFile.java and compile it to 
$CATALINA_HOME/webapps/myWebApp/WEB-INF/classes/MyFile.class, you can 
call ant reload on that specific web application to reload the web 
application so your changes take effect.


Dan

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



Re: Example of a build.xml File for Tomcat ?

2007-03-14 Thread Daniel Gresh

james.javaman wrote:

Hi Dan,

Thanks for your response.  Let me just make sure I heard you right:

So I have a javac target in my build.xml file.  It simply compiles code in
${source} and puts it in {$build}.  You are suggesting that I point {$build}
to the Tomcat directory?

For example, since I’m on Windows, {$build} might be:
C:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps\myWebApplication\WEB-INF\classes

So lets say I’ve changed some of my servlet code.  Could I then just do this
to see it reflected: ?

ant javac
ant reload
ant gui


Finally, is this the “official” (or good) way to do this? In other words,
this isn’t a “hack” or anything?  

  

  



No you can keep ${build} where it is, as the javac command does not matter.

ant reload, if i recall the technical definition correctly, reloads the 
context path of the web application. Therefore, rather than undeploying 
your webapp and deploying it again to see the changes reflected when you 
navigate to your webapp, you can call ant reload to reload the webapp 
in Tomcat (yes I know it's not good practice to use the word you're 
defining in the definition, but I don't know how else to put it). This 
will reflect the changes.


This is certainly not a hack, it's just a custom Ant task that you can 
use with Tomcat, such as ant stop, ant start, ant deploy, etc.


I have a build.xml file I'm using for my webapp that uses reload. I have 
it set up so if the compilation of my .java files is successful, it will 
reload the webapp so I don't have to do it manually. Here is what the 
relevant part of my build.xml file looks like:


!-- Compile the .java files in the src directory and output to the 
build directory --

   target name=compile depends=init
   !-- Compile the java code --
   javac srcdir=${src} destdir=${build} /
   /target

   !-- Reload the web application in Apache Tomcat to process changes --
   target name=reload depends=compile description=Reload web 
application
   reload url=${url} username=${username} 
password=${password} path=${path} /

   /target

Where ${url} is the URL of my manager webapp, ${username} and 
${password} are the username and password for my manager webapp, and 
${path} is the path of the webapp I am reloading 
($CATALINA_HOME/webapps/myWebApp).


You can cause it to reload by typing:

ant reload

from the command line;

ant javac

is not needed.

Dan

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



Re: Example of a build.xml File for Tomcat ?

2007-03-14 Thread Daniel Gresh

james.javaman wrote:

Hi Dan,

Sorry if I’m being dense here, but how does the newly compiled code get into
$CATALINA_HOME/webapps/myWebApp?

I don’t see the part in your build.xml where the new changes (newly compiled
changes) make it to the Tomcat directory.  


According to your response, ${build} can point anywhere.  I mean, lets say
${build} points to: C:\temp\nowhere_of_significance.  Wouldn’t this mess up
a reload? The only parameters I see in a reload are a username, password, a
manager url and path of the tomcat web app.  Won’t this just reload the same
thing (without our new change.)  Is there something happening under the
hood I just can't see here where the compiled code magically gets put into
the Tomcat directory?

Thanks for your patience.  

  

  



Yes ${build} can point to anywhere. I have ${build} in my build.xml file 
set to $CATALINA_HOME/webapps/myWebApp/WEB-INF/classes, so the newly 
compiled code simply goes to that directory.


Therefore, you specify ${build} to be where you want your compiled code 
to go in your webapp (most likely in the path I just showed). There is 
nothing else to it; the code gets compiled to your webapp directory, 
then you reload the webapp. Reload will not occur until your code is 
done compiling, as there is a depends parameter for the reload target.


The reason you can call

ant reload

without calling

ant javac

is because reload depends on javac in the example I provided; it will 
not happen unless javac happens. Therefore, calling


ant reload

will also cause the javac command to execute.

Dan

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



Re: Ant custom tasks: how to compile .java files and restart Tomcat(Tomcat6.0.9)?

2007-03-01 Thread Daniel Gresh

Caldarale, Charles R wrote:
From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
Subject: Re: Ant custom tasks: how to compile .java files and 
restart Tomcat(Tomcat6.0.9)?


Is webapps/[appname], where [appname]=ROOT a web application? 
If so, I can just use reload when I deploy new .class files

without ever having to restart Tomcat, right?



Correct on both counts.  Every directory or .war file immediately under
the Host appBase directory is a webapp, even if it doesn't have a
WEB-INF or other spec-defined structure.  Very useful for deploying
apps that are nothing but static content.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

Excellent, thanks a lot for the help.

I realize the other question I had which I posted in my previous reply 
is better asked in a new thread. I'll look into it more before I post it 
though to see if I can resolve it.


Thanks again,
Dan

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



Re: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)? [RESOLVED]

2007-03-01 Thread Daniel Gresh
Daniel Gresh wrote: 

Alright, here is where I am now.

I edited my build.xml file to include a reload command to reload my 
$CATALINA_HOME/webapps/ROOT path. I go to the directory where my .java 
files are and type ant reload. Everything in the build.xml file 
works fine until it reaches reload. Once it reaches reload, I get the 
following message:


reload:
   [reload] FAIL - No context exists for path 
/u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


BUILD FAILED
/u/dgresh/dev/kdb/src/kdb4/build.xml:44: FAIL - No context exists for 
path /u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


I do not understand this. In the example build.xml file provided on 
the Apache Tomcat website, it says this:


 The reload signals the specified application Tomcat 5 to shut 
itself down

 and reload. This can be useful when the web application context is not
 reloadable and you have updated classes or property files in the
 /WEB-INF/classes directory or when you have added or updated jar 
files in the

 /WEB-INF/lib directory.


I am updating classes in the /WEB-INF/classes directory, which is why 
I want to reload the application. Is there something I am missing? Is 
there something I need to include in $CATALINA_HOME/webapps/ROOT to 
make it a web application so Ant can recognize the context?


Thanks for the help,
Dan

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



Hi list,

I resolved this problem. It turns out that I shouldn't have specified 
the full path; I took another look at the Tomcat docs and the 
manager/html page, and realized that when I run a manager task it will 
automatically read from the $CATALINA_HOME/webapps directory. Therefore, 
I changed my path in build.xml to /, and voila -- it reloaded ROOT! 
Now I can create my own webapp separate from ROOT, and use Ant tasks!


Thanks a lot for the help you've been giving me as I'm getting familiar 
with Tomcat,

Dan

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



Re: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)?

2007-02-28 Thread Daniel Gresh

Caldarale, Charles R wrote:
From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
Subject: Ant custom tasks: how to compile .java files and 
restart Tomcat (Tomcat6.0.9)?


I have a src directory for my .java files that I wish 
to compile to .class files and simply store them on 
$CATALINA_HOME/webapps/ROOT for now.



Immediately under a webapp directory is not an appropriate location for
class files - ever.  They should go into
webapps/[appname]/WEB-INF/classes, as defined by the servlet spec.
  
Ah sorry about this - my files are under /WEB-INF/classes. I forgot to 
specify this.
  
However, I am not necessarily restarting an app; I 
wish to restart Tomcat.



Why?  There's no reason to do so, if all you're doing is updating the
app.  Restarting Tomcat requires running the shutdown and startup
scripts.
  
I know restarting Tomcat requires running the shutdown and startup 
scripts. The reason I want to restart Tomcat is because I will be 
deploying/updating  wait.


Is webapps/[appname], where [appname]=ROOT a web application? If so, I 
can just use reload when I deploy new .class files without ever having 
to restart Tomcat, right?


Wow, that realization just hit me like a truck.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

Alright, here is where I am now.

I edited my build.xml file to include a reload command to reload my 
$CATALINA_HOME/webapps/ROOT path. I go to the directory where my .java 
files are and type ant reload. Everything in the build.xml file works 
fine until it reaches reload. Once it reaches reload, I get the 
following message:


reload:
   [reload] FAIL - No context exists for path 
/u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


BUILD FAILED
/u/dgresh/dev/kdb/src/kdb4/build.xml:44: FAIL - No context exists for 
path /u/dgresh/apache-tomcat-6.0.9/webapps/ROOT


I do not understand this. In the example build.xml file provided on the 
Apache Tomcat website, it says this:


 The reload signals the specified application Tomcat 5 to shut itself down
 and reload. This can be useful when the web application context is not
 reloadable and you have updated classes or property files in the
 /WEB-INF/classes directory or when you have added or updated jar files in the
 /WEB-INF/lib directory.


I am updating classes in the /WEB-INF/classes directory, which is why I 
want to reload the application. Is there something I am missing? Is 
there something I need to include in $CATALINA_HOME/webapps/ROOT to make 
it a web application so Ant can recognize the context?


Thanks for the help,
Dan

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



The requested resource (/manager/) is not available.

2007-02-27 Thread Daniel Gresh

Hi list,

I'm trying to use the manager webapp for the custom Ant tasks on Tomcat 
6.0.9 with Sun Solaris 10. I've gone into the tomcat-users.xml file and 
created a username/password admin/admin that has the manager role. 
However, when I try to connect to the manager webapp by pointing my 
browser to http://localhost:port/manager, I get the error:


_The requested resource (/manager/) is not available.

_I know I must be missing something obvious. I've searched Google for 
suggestions and I've read the Manager How-To online but to no avail. 
Perhaps I am missing some directories in my Tomcat installation? When I 
try to navigate to http://localhost:port/tomcat-docs I receive the same 
error.


Is it possible I have a directory in the wrong place? I doubt that would 
be the case because I simply downloaded the Tomcat 6.0.9 core 
distribution and followed the instructions. Do I need the deployer or 
something?


Thanks,
Dan

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



Re: The requested resource (/manager/) is not available.

2007-02-27 Thread Daniel Gresh

Caldarale, Charles R wrote:
From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
Subject: The requested resource (/manager/) is not available.


However, when I try to connect to the manager webapp by pointing my 
browser to http://localhost:port/manager, I get the error:


_The requested resource (/manager/) is not available.



There is no mapping for just plain /manager.  Look in
webapps/manager/WEB-INF/web.xml to see what is there.  The typical ones
are /manager/html and /manager/status.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  
Ah I see now. This also helps me understand how the manager webapp will 
work with custom Ant tasks.


With the above explanation in mind, I saw why 
http://localhost:port/tomcat-docs was not working; it is now 
http://localhost:port/docs apparently.


Thanks a lot for the help,
Dan

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



Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat 6.0.9)?

2007-02-27 Thread Daniel Gresh

Hi all,

I've been reading through the documentation on using custom Ant tasks 
with Tomcat, but I am sorry to say that I am confused. This will most 
likely turn out to be a very basic question, but I'm not sure where to 
go with it.


I have a src directory for my .java files that I wish to compile to 
.class files and simply store them on $CATALINA_HOME/webapps/ROOT for 
now. I have a build.xml file in the src directory which I have been 
using to deploy the class files to the appropriate directory.


My question is, how would I use Ant custom tasks to restart Tomcat when 
I deploy the class files (please continue reading, as I will explain 
where I am confused)?


Looking at the manager-howto, I see there are custom tasks for Deploy, 
Reload, Start, Stop, etc that I should place in the build.xml file. I am 
unsure how to use these to restart Tomcat. For example, the Reload task 
looks like this:


 target name=reload description=Reload web application
 depends=compile
   reload  url=${url} username=${username} password=${password}
   path=${path}/
 /target

What would I specify for ${path}? In the example file provided in the howto, it 
says I should specify it to be myApp. However, I am not necessarily restarting 
an app; I wish to restart Tomcat.

Is it even possible to accomplish this? Did I miss something in the tutorial? 
If this is not possible, is there a better way I could be doing this? The 
reason I am compiling .java files and deploying them is simply to test a few 
things, as I am in the process of learning JSP and Tomcat.

Thanks for any advice you can give,
Dan



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



Re: Installing Tomcat 6.0.9 on Sun Solaris

2007-02-20 Thread Daniel Gresh

Caldarale, Charles R wrote:
From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
Subject: Re: Installing Tomcat 6.0.9 on Sun Solaris


When I try to setup a $CATALINA_BASE by moving the
aforementioned directories to $HOME/dtomcat, I get
the error I posted in my original message. 



The real question is:  why are you trying to do this?  Unless you intend
to run multiple instances of Tomcat simultaneously, the exercise is
pointless.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

Thanks for the replies guys.

I believe you're right Chuck. When I think about it, there is no need 
for a CATALINA_BASE. The reason I wanted to set one is because the 
previous two installations of Tomcat (4.0.5 and 5.5.9) both had one, so 
I figured it might be there for ease of use, security purposes, or 
something of the sort. However, I am the only one who will be using 
Tomcat 6.0.9, so there really is no point to it.


Anyway, I believe all my questions are now cleared up (unless of course 
I need to set up a CATALINA_BASE and have questions about the 
information from the server logs). I have Tomcat 6.0.9 running properly, 
and it can compile my JDK1.5 code and everything!


Thanks for the help,
Dan

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



RE: Installing Tomcat 6.0.9 on Sun Solaris

2007-02-20 Thread Daniel Gresh
Oh I see, thanks a lot.

On Tue, 2007-02-20 at 14:44, Caldarale, Charles R wrote:
  From: Daniel Gresh [mailto:[EMAIL PROTECTED] 
  Subject: RE: Installing Tomcat 6.0.9 on Sun Solaris
  
  The reason I was confused though is because the instructions 
  on the Tomcat site said I need to run autoconf from the jsvc-src
  directory, but I could not find any autoconf file anywhere.
  Therefore, I figured I unzipped it wrong or something.
 
 autconf is a GNU tool, not part of Tomcat.  You only need it for
 building jsvc if you intend to run Tomcat as a daemon.  If you run
 Tomcat using the shell scripts, you have no need for it.
 
  - 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Installing Tomcat 6.0.9 on Sun Solaris

2007-02-19 Thread Daniel Gresh

Hi all,

I was having some more problems with some older Tomcat installations, so 
I decided to upgrade to the newest release and download it fresh this 
time instead of using an existing build from awhile back.


I've been trying to set up Tomcat 6.0.9, but I'm afraid I'm having some
problems.

I've been following the installation instructions in RUNNING.txt.
Basically, it tells me to download the binary distribution, unpack it,
make sure JDK1.5 or greater is installed, and run the server. I also need to 
set up a CATALINA_BASE,

After downloading the binary distribution, I uncompressed it to $CATALINA_HOME. 
Then, I created a new
directory, and set that to be
$CATALINA_BASE. Then, I took the appropriate directories out of $CATALINA_HOME 
and put them in $CATALINA_BASE, according to RUNNING.txt. Then, I started
up the server and set it to use $CATALINA_BASE with
$CATALINA_HOME/bin/startup.sh -Dcatalina.base=$HOME/dtomcat. This
gave me the following output:

Using CATALINA_BASE:   /u/dgresh/dtomcat
Using CATALINA_HOME:   /u/dgresh/apache-tomcat-6.0.9
Using CATALINA_TMPDIR: /u/dgresh/dtomcat/temp
Using JRE_HOME:   /usr/local/jdk1.5.0_06

and then gave me a command prompt. So I navigated to http://localhost:8080,
and I got a connection failed error. I searched through the
documentation, and found that an issue with ports might be causing the
problem. I edited the $CATALINA_BASE/conf/server.xml file, and changed
the server port from 8005 to 8007, and the connector port from 8080 to
8082. Then, I navigated to http://localhost:8082, and got the
same connection failed error. 


Furthermore, I'm running into problems when I go to shutdown Tomcat.
When I run $CATALINA_HOME/bin/shutdown.sh, I get the following output:

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at
org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
   at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

I'm not sure what that means, even after a web search. 


There's one more thing that is confusing me. RUNNING.txt says that all I
need to do to install Tomcat is unpack it to a directory, have JDK1.5+
installed, and startup the server. However, the setup instructions at
the Tomcat website have something about running it as a UNIX daemon
(http://tomcat.apache.org/tomcat-6.0-doc/setup.html). I'm not exactly sure if 
this is needed, but I tried to follow the instructions, so I downloaded the
commnons-daemon file and placed the necessary files in
$CATALINA_HOME/bin. However, I cannot run tar xvfz jsvc.tar.gz, as the
-z argument is not being recognized. The directions said GNU TAR was
needed, so I searched the web for that, but I came to a confusing site
that said something about FTPing the GNU TAR files, and I didn't know
where to go from there.

So is there simply something I missed about configuring Tomcat for
proper use on my localhost? Or is this a problem with my Tomcat installation?

If you could offer any advice, I'd be very appreciative.

Thanks,
Dan



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



Re: Installing Tomcat 6.0.9 on Sun Solaris

2007-02-19 Thread Daniel Gresh
Hi thanks for the reply.

I cleared my CATALINA_BASE variable so it would take on the default
$CATALINA_HOME variable. I then moved my conf lib logs temp webapps work
directories back into $CATALINA_HOME. Then, I used startup.sh, and it
WORKED! Hooray! I can shutdown and startup the server when I do not have
a $CATALINA_BASE. When I try to setup a $CATALINA_BASE by moving the
aforementioned directories to $HOME/dtomcat, I get the error I posted in
my original message. 

Is there anything I missed when setting up $CATALINA_BASE?

I moved the conf, lib, logs, temp, work, and webapp directories to
$CATALINA_BASE. Should I have copied them, therefore leaving a copy in
$CATALINA_HOME? After that, I use startup.sh and supply the
-Dcatalina.base=$HOME/dtomcat argument to startup.sh, and it says it's
using the appropriate directory. However, startup.sh does not start the
server apparently; I cannot connect to it from a browser, and I get the
error I posted when I try to use shutdown.sh.

There's obviously something I missed. Do I need to edit some files or
something?

Thanks a lot,
Dan

On Mon, 2007-02-19 at 17:11, Hassan Schroeder wrote:
 On 2/19/07, Daniel Gresh [EMAIL PROTECTED] wrote:
 
  I've been following the installation instructions in RUNNING.txt.
  Basically, it tells me to download the binary distribution, unpack it,
  make sure JDK1.5 or greater is installed, and run the server. I also need 
  to set up a CATALINA_BASE,
 
 No, you don't. Until you've gotten the basic installation down, stay out
 of the advanced configuration section. :-)
 
 If you follow *exactly* the steps before that, it should just work. If it
 doesn't, e.g., you're still getting a connection failed error, check to
 see whether the process is running or not. If not, check the logs, and
 if so, check for firewall/iptables/whatever problems.
 
 Good luck,
 -- 
 Hassan Schroeder  [EMAIL PROTECTED]
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-16 Thread Daniel Gresh

Daniel Gresh wrote:

Daniel Gresh wrote:

APliszka-Public wrote:
Google for compilerSourceVM, and you should find examples of 
enabling 1.5.


Andrew Pliszka


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



Hi all, thanks for the fast replies.

I googled compilerSourceVM and came across this thread on the Java 
forums: 
http://forum.java.sun.com/thread.jspa?threadID=579806messageID=2928513


I followed the instructions there. I removed jasper-compiler-jdt.jar 
from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant 
version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not 
compatible with JDK1.5. Next, I added ant.jar to the 
$CATALINA_HOME/common/lib directory. Then, I edited my web.xml file 
in the $CATALINA_HOME/conf directory according to the thread on the 
Java forums and the Jasper how-to. Finally, I restarted Tomcat.


I am still getting a problem however, and I believe this deals with 
ant. When I try to compile code -- ANY code from ANY JDK -- even 
something like:


%
String s;
%

I get this error:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException

org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be 
causing the problem? Or is there something else I am missing?


Also, I accidentally clicked refresh on my browser after getting this 
error, and the page loaded. I hit refresh a few more times and it 
loaded. Then, it gave me the error again, and repeated. I doubt it's 
pertinent, but who knows.


Thanks,
Dan

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



Oh I should have mentioned that when I type ant -version I get the error:

Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/tools/ant/Main


Dan

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



List,

I solved my problem with getting ant -version to work. The older version 
of Ant was apparently causing problems, but I can't remove it. So, I set 
the newer version of Ant at the beginning of PATH, so when I type ant 
-version, it will be referenced first, and it will give me the correct 
version (1.7.0). However, I am still getting a problem when I try to 
compile. I've searched Google for help, but I haven't managed to find any.


The error message has changed slightly from the last one, so here it is:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

javax.servlet.ServletException: org/apache/tools/ant/launch/AntMain
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
java.net.URLClassLoader.defineClass(URLClassLoader.java:260

Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some Java 
compilation errors when I used JDK1.5 features, and neither I nor the 
two who replied to my message could figure out why. Upgrading was 
suggested, so we upgraded to Tomcat 5.5.9.


I'm running some simple tests using some basic code that involves JDK1.5 
to find out if everything can compile correctly. However, when I deploy 
my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no sense to 
me (because I know the code I have compiles correctly with javac). This 
is the index.jsp file:


!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;

%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head

body

%
 String[] s = {1, 2};
   for (String x : s) {
}
%

/body
/html

This is the error message:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX box 
Tomcat is installed on, so the code should certainly be compiling.


One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:


Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set to. 
Also when I use printenv JRE_HOME, it returns nothing. Is this a problem?


Thanks for any help you can offer,
Dan

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



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

APliszka-Public wrote:
Try using code that is not 1.5 specific [like for(String x: s)] if it 
is going to work then your pages are compiled as Java 1.4 source code, 
you will have change tomcat config to so jsp compiler is compailing 
Java 1.5 source.


Andrew Pliszka

Daniel Gresh wrote:


Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some 
Java compilation errors when I used JDK1.5 features, and neither I 
nor the two who replied to my message could figure out why. Upgrading 
was suggested, so we upgraded to Tomcat 5.5.9.


I'm running some simple tests using some basic code that involves 
JDK1.5 to find out if everything can compile correctly. However, when 
I deploy my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no sense 
to me (because I know the code I have compiles correctly with javac). 
This is the index.jsp file:


!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;

%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head

body

%
 String[] s = {1, 2};
   for (String x : s) {
}
%

/body
/html

This is the error message:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) 


org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) 


org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX 
box Tomcat is installed on, so the code should certainly be compiling.


One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:


Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set 
to. Also when I use printenv JRE_HOME, it returns nothing. Is this 
a problem?


Thanks for any help you can offer,
Dan

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







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



Hi, thanks for the reply.

I changed my code to use a JDK1.4 feature, assert, like this:

%
   boolean s = true;
   assert s;
%

and it compiled fine.

So apparently it is not compiling for JDK1.5. How would I tell it to do 
so? I looked at $CATALINA_HOME/conf/server.xml, but I wasn't sure if 
that was where I was supposed to make the configuration change. How 
would I do so?


Thanks,
Dan

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



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

APliszka-Public wrote:
Google for compilerSourceVM, and you should find examples of 
enabling 1.5.


Andrew Pliszka


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



Hi all, thanks for the fast replies.

I googled compilerSourceVM and came across this thread on the Java 
forums: 
http://forum.java.sun.com/thread.jspa?threadID=579806messageID=2928513


I followed the instructions there. I removed jasper-compiler-jdt.jar 
from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant 
version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not 
compatible with JDK1.5. Next, I added ant.jar to the 
$CATALINA_HOME/common/lib directory. Then, I edited my web.xml file in 
the $CATALINA_HOME/conf directory according to the thread on the Java 
forums and the Jasper how-to. Finally, I restarted Tomcat.


I am still getting a problem however, and I believe this deals with ant. 
When I try to compile code -- ANY code from ANY JDK -- even something like:


%
String s;
%

I get this error:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException

org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be 
causing the problem? Or is there something else I am missing?


Also, I accidentally clicked refresh on my browser after getting this 
error, and the page loaded. I hit refresh a few more times and it 
loaded. Then, it gave me the error again, and repeated. I doubt it's 
pertinent, but who knows.


Thanks,
Dan

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



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

Daniel Gresh wrote:

APliszka-Public wrote:
Google for compilerSourceVM, and you should find examples of 
enabling 1.5.


Andrew Pliszka


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



Hi all, thanks for the fast replies.

I googled compilerSourceVM and came across this thread on the Java 
forums: 
http://forum.java.sun.com/thread.jspa?threadID=579806messageID=2928513


I followed the instructions there. I removed jasper-compiler-jdt.jar 
from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant 
version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not 
compatible with JDK1.5. Next, I added ant.jar to the 
$CATALINA_HOME/common/lib directory. Then, I edited my web.xml file in 
the $CATALINA_HOME/conf directory according to the thread on the Java 
forums and the Jasper how-to. Finally, I restarted Tomcat.


I am still getting a problem however, and I believe this deals with 
ant. When I try to compile code -- ANY code from ANY JDK -- even 
something like:


%
String s;
%

I get this error:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be 
causing the problem? Or is there something else I am missing?


Also, I accidentally clicked refresh on my browser after getting this 
error, and the page loaded. I hit refresh a few more times and it 
loaded. Then, it gave me the error again, and repeated. I doubt it's 
pertinent, but who knows.


Thanks,
Dan

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



Oh I should have mentioned that when I type ant -version I get the error:

Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/tools/ant/Main


Dan

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



Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and JSP compilation errors

2007-02-12 Thread Daniel Gresh

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 ArrayListString, 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
headtitle/title/head

body

%
   ArrayListString al = new ArrayListString();
   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
   TDNumber/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.
   ArrayListString al = new ArrayListString();

Lines 9-15 are the lines in which the ArrayListString 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4.0 on UNIX: no /bin directory in $CATALINA_HOME, and JSP compilation errors

2007-02-12 Thread Daniel Gresh

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

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

Tomcat 4.0 compatibility with jdk1.6

2007-02-08 Thread Daniel Gresh

Hi,

I've searched through the Tomcat site a bunch and the Java site (and 
Google), but I can't find anything that tells me Tomcat 4.0 will work 
with j2se6. I know Tomcat 4 won't work with the JSP 2 specs, but I'm 
unsure of the j2se specs. If anyone could give me a simple answer (yes 
Tomcat 4.0 supports j2se6 will suffice), I'd appreciate it.


Thanks,
Dan

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



Re: Tomcat 4.0 compatibility with jdk1.6 -- SOLVED

2007-02-08 Thread Daniel Gresh

Daniel Gresh wrote:

Hi,

I've searched through the Tomcat site a bunch and the Java site (and 
Google), but I can't find anything that tells me Tomcat 4.0 will work 
with j2se6. I know Tomcat 4 won't work with the JSP 2 specs, but I'm 
unsure of the j2se specs. If anyone could give me a simple answer 
(yes Tomcat 4.0 supports j2se6 will suffice), I'd appreciate it.


Thanks,
Dan

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


Sry, I just found in the Tomcat manual that Tomcat 4 will work with any 
JDK with JDK1.2 compatibility.


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