Re: Trouble running tomcat on Ubuntu Linux & OS X Tiger

2007-10-07 Thread Unnsse Khan

It was the tar.gz package that is downloadable from:

http://tomcat.apache.org/download-55.cgi#5.5.25

The following distributions on that page are:

* Core:
  o zip (pgp, md5)
  o tar.gz (pgp, md5)
  o Windows Service Installer (pgp, md5)
* Deployer:
  o zip (pgp, md5)
  o tar.gz (pgp, md5)
* Embedded:
  o zip (pgp, md5)
  o tar.gz (pgp, md5)
* Administration Web Application:
  o zip (pgp, md5)
  o tar.gz (pgp, md5)
* JDK 1.4 Compatability Package:
  o zip (pgp, md5)
  o tar.gz (pgp, md5)
* Documentation (Already Included in Core Downloads):
  o tar.gz (pgp, md5)

I am guessing that I only downloaded the Core distribution...

Is this the problem?

Kindest regards,

Unnsse


On Oct 7, 2007, at 9:30 PM, Caldarale, Charles R wrote:


From: Unnsse Khan [mailto:[EMAIL PROTECTED]
Subject: Re: Trouble running tomcat on Ubuntu Linux & OS X Tiger

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program


Looks like you may still have a permissions problem.  The above  
message

is displayed by setclasspath.sh only if it can't find itself in
$BASEDIR/bin; the BASEDIR environment variable is set by catalina.sh,
which is kicked off by the startup.sh script.

Are you using a real Tomcat (downloaded from tomcat.apache.org), or  
some
3rd-party repacked junk?  If the latter, throw it away and download  
and

install a real one.

 - 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]



RE: Trouble running tomcat on Ubuntu Linux & OS X Tiger

2007-10-07 Thread Caldarale, Charles R
> From: Unnsse Khan [mailto:[EMAIL PROTECTED] 
> Subject: Re: Trouble running tomcat on Ubuntu Linux & OS X Tiger
> 
> The BASEDIR environment variable is not defined correctly
> This environment variable is needed to run this program

Looks like you may still have a permissions problem.  The above message
is displayed by setclasspath.sh only if it can't find itself in
$BASEDIR/bin; the BASEDIR environment variable is set by catalina.sh,
which is kicked off by the startup.sh script.

Are you using a real Tomcat (downloaded from tomcat.apache.org), or some
3rd-party repacked junk?  If the latter, throw it away and download and
install a real one.

 - 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]



Re: Trouble running tomcat on Ubuntu Linux & OS X Tiger

2007-10-07 Thread Unnsse Khan

Oliver & Chuck,

Thank you for the response(s)!

I already thought of this and conducted a

chmod +x catalina.sh

~/DevTools/Java/tomcat/apache-tomcat-5.5.25/bin untz$ ls -al catalina.sh

-rwxr-xr-x   1 untz  untz  12044 Aug 24 17:34 catalina.sh

The only thing this does is when I run sh startup.sh (using  
$CATALINA_HOME/bin as my current dir):


~/DevTools/Java/tomcat/apache-tomcat-5.5.25/bin untz$ sh startup.sh

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program

Does anyone know what's going on??

-Unnsse


On Oct 7, 2007, at 8:10 PM, Oliver Yang wrote:


I think you need to check the catalina.sh permission.

On Sun, 2007-10-07 at 19:35 -0700, Unnsse Khan wrote:

Hello there,

Having trouble running tomcat on Ubuntu Linux 7.0.4 and am
experiencing the exact same problem under OS X Tiger.

I installed tomcat under:

/home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25

Created the CATALINA_HOME system environmental variable inside
my .profile directory.

When I try to run TOMCAT, this is what I get:

$ sh $CATALINA_HOME/bin/startup.sh
Cannot find /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/
bin/catalina.sh
This file is needed to run this program

This file (catalina.sh) is obviously located in the right  
directory...


When I try to run this file, this is what I get:

$ sh /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/bin/
catalina.sh
 The BASEDIR environment variable is not defined correctly
 This environment variable is needed to run this program

My CLASSPATH is set as:

$ echo $CLASSPATH

  .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib/tools.jar:/usr/lib/jvm/
java-6-sun-1.6.0.00/jre/lib/rt.jar:/home/untz/DevTools/Java/tomcat/
apache-tomcat-5.5.25/common/lib/servlet-api.jar:/home/untz/DevTools/
Java/tomcat/apache-tomcat-5.5.25/common/lib/jsp-api.jar

What am I possibly doing wrong?

Happy programming,

Unnsse

-
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]




-
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: Trouble running tomcat on Ubuntu Linux & OS X Tiger

2007-10-07 Thread Caldarale, Charles R
> From: Unnsse Khan [mailto:[EMAIL PROTECTED] 
> Subject: Trouble running tomcat on Ubuntu Linux & OS X Tiger
> 
> When I try to run TOMCAT, this is what I get:
> $ sh $CATALINA_HOME/bin/startup.sh

Try making $CATALINA_HOME/bin your current directory before running the
startup script.

> $ echo $CLASSPATH
>   .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib/tools.jar:/usr/lib/jvm/ 
> java-6-sun-1.6.0.00/jre/lib/rt.jar:/home/untz/DevTools/Java/tomcat/ 
> apache-tomcat-5.5.25/common/lib/servlet-api.jar:/home/untz/DevTools/ 
> Java/tomcat/apache-tomcat-5.5.25/common/lib/jsp-api.jar

Don't ever, ever, ever put anything in CLASSPATH in order to run Tomcat.
The above didn't cause your current problem, but it's an accident
waiting to happen.

 - 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]



Re: Trouble running tomcat on Ubuntu Linux & OS X Tiger

2007-10-07 Thread Oliver Yang
I think you need to check the catalina.sh permission.

On Sun, 2007-10-07 at 19:35 -0700, Unnsse Khan wrote:
> Hello there,
> 
> Having trouble running tomcat on Ubuntu Linux 7.0.4 and am  
> experiencing the exact same problem under OS X Tiger.
> 
> I installed tomcat under:
> 
> /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25
> 
> Created the CATALINA_HOME system environmental variable inside  
> my .profile directory.
> 
> When I try to run TOMCAT, this is what I get:
> 
> $ sh $CATALINA_HOME/bin/startup.sh
> Cannot find /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/ 
> bin/catalina.sh
> This file is needed to run this program
> 
> This file (catalina.sh) is obviously located in the right directory...
> 
> When I try to run this file, this is what I get:
> 
> $ sh /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/bin/ 
> catalina.sh
>  The BASEDIR environment variable is not defined correctly
>  This environment variable is needed to run this program
> 
> My CLASSPATH is set as:
> 
> $ echo $CLASSPATH
> 
>   .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib/tools.jar:/usr/lib/jvm/ 
> java-6-sun-1.6.0.00/jre/lib/rt.jar:/home/untz/DevTools/Java/tomcat/ 
> apache-tomcat-5.5.25/common/lib/servlet-api.jar:/home/untz/DevTools/ 
> Java/tomcat/apache-tomcat-5.5.25/common/lib/jsp-api.jar
> 
> What am I possibly doing wrong?
> 
> Happy programming,
> 
> Unnsse
> 
> -
> 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]



Trouble running tomcat on Ubuntu Linux & OS X Tiger

2007-10-07 Thread Unnsse Khan

Hello there,

Having trouble running tomcat on Ubuntu Linux 7.0.4 and am  
experiencing the exact same problem under OS X Tiger.


I installed tomcat under:

/home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25

Created the CATALINA_HOME system environmental variable inside  
my .profile directory.


When I try to run TOMCAT, this is what I get:

$ sh $CATALINA_HOME/bin/startup.sh
   Cannot find /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/ 
bin/catalina.sh

   This file is needed to run this program

This file (catalina.sh) is obviously located in the right directory...

When I try to run this file, this is what I get:

$ sh /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/bin/ 
catalina.sh

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program

My CLASSPATH is set as:

$ echo $CLASSPATH

 .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib/tools.jar:/usr/lib/jvm/ 
java-6-sun-1.6.0.00/jre/lib/rt.jar:/home/untz/DevTools/Java/tomcat/ 
apache-tomcat-5.5.25/common/lib/servlet-api.jar:/home/untz/DevTools/ 
Java/tomcat/apache-tomcat-5.5.25/common/lib/jsp-api.jar


What am I possibly doing wrong?

Happy programming,

Unnsse

-
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: Error track can't track the exact line and display the bug line number

2007-10-07 Thread Oliver Yang
Thanks for the prompt reply.

I did not set -g option when I compile the application source codes. I
checked javac options, by default, line numbers are generated. My buggy
code is from a Servlet class and from .java file not .jsp. I use Ant
script to build and deploy the application to Tomcat. I will check it
again.

Cheers 

On Sun, 2007-10-07 at 19:37 -0500, Caldarale, Charles R wrote:
> > From: Oliver Yang [mailto:[EMAIL PROTECTED] 
> > Subject: Error track can't track the exact line and display 
> > the bug line number
> > 
> > The server give the "Unknown source" for the exact class name.
> 
> That's the JVM, not Tomcat, displaying "Unknown source".  That happens
> for code compiled with the javac -g:none option, which disables storing
> any debugging information in the generated .class files.  If your code
> was in a .java file, then you (or your IDE) disabled debugging; if your
> code originated in a .jsp, then you have set the classdebuginfo
> parameter for the JspServlet to false.
> 
>  - 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]



RE: Problem with session

2007-10-07 Thread Caldarale, Charles R
> From: Alex79 [mailto:[EMAIL PROTECTED] 
> Subject: Problem with session
> 
> I am running a web service on tomcat, which I am not very
> familiar with (tomcat). 

At least tell us the version of Tomcat you're using; also, although
probably not relevant for this problem, include the JRE/JDK level and
the platform you're running on.

> A client application that sends requests to this web service 
> sends the session id with a certain type of request.

Are you referring to a session cookie or the JSESSIONID parameter (as
defined in the servlet spec), or is this a roll-your-own session
identifier?

> After many requests (over 1000) occurring in the same session
> (in other words, by the same client), the session id no longer
> exists (the web service throws an error when the type of request
> that has the session id parameter gives an unknown session id).

There is a maxKeepAliveRequests attribute for a  element,
with a default setting of 100.  It's possible that's coming into play,
depending on the client you're using.  Read about here:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

> Any idea if tomcat is somehow auto-refreshing my web application
> (or itself) causing my session to be cleared?

Unlikely, but if the webapp is being restarted, it should show up in
Tomcat's logs.  Have you looked at them?

 - 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]



RE: Error track can't track the exact line and display the bug line number

2007-10-07 Thread Caldarale, Charles R
> From: Oliver Yang [mailto:[EMAIL PROTECTED] 
> Subject: Error track can't track the exact line and display 
> the bug line number
> 
> The server give the "Unknown source" for the exact class name.

That's the JVM, not Tomcat, displaying "Unknown source".  That happens
for code compiled with the javac -g:none option, which disables storing
any debugging information in the generated .class files.  If your code
was in a .java file, then you (or your IDE) disabled debugging; if your
code originated in a .jsp, then you have set the classdebuginfo
parameter for the JspServlet to false.

 - 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]



Error track can't track the exact line and display the bug line number

2007-10-07 Thread Oliver Yang
Hi, everyone

I am using tomcat 5.x. When my application has application level error,
like business logic errors cause NullPointerException or SQLException,
Unlike Jetty, Tomcat server can't track the exact buggy line of my
codes. It makes me to difficult to debug my application. The server give
the "Unknown source" for the exact class name. Even it gives me the
method name of the class, but the method has 50 or more 100 line codes.
I need analysis them and try many times to find the exact line. Any
ideas to sort out the problem? 

Thanks. 


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



Problem with session

2007-10-07 Thread Alex79

Hi,

I am running a web service on tomcat, which I am not very familiar with
(tomcat). 
A client application that sends requests to this web service sends the
session id with a certain type of request. After many requests (over 1000)
occurring in the same session (in other words, by the same client), the
session id no longer exists (the web service throws an error when the type
of request that has the session id parameter gives an unknown session id).
The session cannot have timed out as the time out is set to 120 minutes in
web.xml and anyway the 1000 requests occurs in about 1 minute. Any idea if
tomcat is somehow auto-refreshing my web application (or itself) causing my
session to be cleared?

Thank you for pointing me out to any useful info.

Alex
-- 
View this message in context: 
http://www.nabble.com/Problem-with-session-tf4585082.html#a13088302
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: Authorization on Apache Tomcat the J2ee Way.

2007-10-07 Thread Juha Laiho
Arun wrote:
> On 10/5/07, Pid <[EMAIL PROTECTED]> wrote:
>> Arun wrote:
>>> I have a tomcat 6 installed. I have a running webapplication . I need to
>>> implement a role based access control. How can I combine servers 
>>> capabilities
>>> so that I can use the request.getPrincipal() method ... I also have a list
>>> of roles and groups and who all are assigned what all roles/groups in db.
>>> Now its time to implement an access control mechanism. I do not want Basic
>>> authentication with a popup. I will be logging in by a normal html sign in
>>> form, with a username and password field. Once that is done everything
>>> should be the J2EE way. The roles for that user should get added to the
>>> request and I can use it for authorization.
>>>
>> Form based authentication, part of the servlet spec, is what you are
>> referring to.  Google is your friend.
>>
>> http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html
>
> That is tied down to a server. I have my own db scheme as well as different
> servers to deploy. I cannot use tomcat specific Realm class. Are there any
> other solutions? any links ?

Well, that is J2EE for you; things are standard for the application (code,
deployment - to some extent), but implementation specific for the container
configuration. So, if you're planning to support an application for multiple
servers, you're bound to see various ways to configure things - but your
application code will be the same for each container.

What that page describes is how to configure Tomcat to provide you with the
infrastructure needed for (form-based) login. How to configure some other
container will be documented in the proper documentation for that other
container.

As for having your own database schema, you may need to prepare to have
slightly different schemas for different containers. The other solution
would be to provide either JAAS plugins or full realm implementations
for all the containers you plan to support. For Tomcat, apparently the
JAAS plugin would be the way to go.
-- 
..Juha

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



Embedded Tomcat Auto Deploy War

2007-10-07 Thread Christopher Johnson
All -

I've managed to created a embedded tomcat working based off various
examples I've found online and can successfully add the desired
context to my server, although when the context is packaged as a war
file I my embedded tomcat wont auto deploy it,  how to do construct an
embedded tomcat to auto deploy war files?  If someone could point me
towards an example that would be great.

Thanks in advance,
..Chris

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