Re: is it possible more than 1 tomcat in single system?

2008-07-31 Thread Christian Andersson



Peter Crowther skrev:

From: Edi [mailto:[EMAIL PROTECTED]
consider, i had 4 java application running in one tomcat, if
one application
crashes, all the other 3 application gets crashes. right?



Correct.  But it's not always that simple :-).

It's your choice how you want to split up your applications between different 
containers (Tomcats in this case) to trade off memory use vs reliability.  You 
might get a *less* reliable system by splitting up the applications into 
separate Tomcat instances, though.  Each Tomcat runs in its own JVM, and each 
is allocated a maximum memory size.  If you are not careful when tuning the 
system, you might find that one application in one Tomcat/JVM runs out of 
memory although there is plenty of spare memory in the system.  If you put them 
all into one Tomcat/JVM, the applications all use the same (larger) memory pool.
  
And what happens if you get one rough application stealing all the 
memory? probably all your applications will stop functioning..


For me it is always better to have 1 application crash, then 1

it is also easier to see which application is the guilty one if only 
that application crashes..




-
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: is it possible more than 1 tomcat in single system?

2008-07-31 Thread Christian Andersson
search your tomcats server.xml file for 8005 and you will se that this 
port has been declared at the very top

Server port=8005 shutdown=SHUTDOWN

this is the so called shutdown port, you just have to change this in 
your second tomcat to for example 8006.




Edi skrev:

I have installed JDK1.5 in my local system,

And 1 tomcat5.0 installed in c drive. during the installation, i have given
port 8080
And 1 tomcat5.0 installed in e drive. during the installation, i have given
port 8081

during both tomcat installation, i have specified c:\program
files\java\jdk1.5 path.

First i have started c: tomcat startup.bat, it is started.

after i tried d: tomcat start.bat, it is not started.

But I got exception like

StandardServer.await: create[8005]: java.net.BindException: Address already
in use: JVM_Bind

For Both tomcat's installation, i have given the same JDK1.0 path only. Is
there any need to install one more JDK1.5 (each tomcat needs, separate
jdk1.5 or not ?)

Please advise




Peter Crowther wrote:
  

From: Christian Andersson [mailto:[EMAIL PROTECTED]
Peter Crowther skrev:
  

If you
are not careful when tuning the system, you might find that
one application in one Tomcat/JVM runs out of memory although
there is plenty of spare memory in the system.  If you put
them all into one Tomcat/JVM, the applications all use the
same (larger) memory pool.



And what happens if you get one rough application stealing all the
memory? probably all your applications will stop functioning..
  

Yes.  Certainly memory leaks are much more troublesome in a single JVM.



For me it is always better to have 1 application crash, then 1
  

Given a high enough hardware budget that I can spend on RAM, I agree
entirely :-).  Not all of us have that luxury.  I'm sure there are still
finance directors out there with Gates' 640k is enough for anyone quote
framed on their wall, right by the stone that you have to get blood out of
before you get any budget!



it is also easier to see which application is the guilty one if only
that application crashes..
  

Much easier!

- Peter

-
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 ldap authentication problem

2008-02-29 Thread Christian Andersson

we have tried it with the following..

IE6 and 7 on windows
IE6 on linux (using ie4linux and wine)
Firefox 2.0.12 on windows and on linux

all behave the same..

all the tools we have to get information out from the ldap gives us the 
username out in utf-8 correctly so for me it looks like it is stored in 
utf-8 in ldap..


and since now all our system is configured for utf-8 it is strange that 
this 1 part (the jndirealm) looks like it is using iso-8859-1 .-(




Antonio Petrelli skrev:

2008/2/20, Christian Andersson [EMAIL PROTECTED]:

 all our html pages uses the utf-8 encoding, using slapcat and looking at
 the content the data inside openldap seems to be using utf-8 (the output
 from slapcat is at least utf-8,but I don't know if slapcat converts
 anything)


This might be a shot in the dark, but what client browser are you using?
I've had some problems with IE7: though I tell him to use UTF-8, it
posts the form in UTF-8 charset, but telling that it is using
ISO-8859-1!
Try it with Firefox, if you already didn't do it.

Antonio

-
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 ldap authentication problem

2008-02-29 Thread Christian Andersson
ofcourse, it would be better, but unfourtunally it is not up to me to 
enforce this policy, and we already have a lot of users with those 
character in both username and/or password..


we had the system up and running before but after switching the website 
over from ISO-8859-1 to UTF-8 it i sno longer working, the strange part 
is though that with every tool I canuse to check what is in the ldap, it 
say it is in utf-8


and we cannot go back o ISO-8859-1 either..



Andris Eiduks skrev:

I think that better is for userID and passwords don't use national
characters. In Latvia we time after time have similar problems ...

Andris Eiduks

On Fri, Feb 29, 2008 at 9:53 AM, Antonio Petrelli 
[EMAIL PROTECTED] wrote:


2008/2/20, Christian Andersson [EMAIL PROTECTED]:

 all our html pages uses the utf-8 encoding, using slapcat and looking

at

 the content the data inside openldap seems to be using utf-8 (the

output

 from slapcat is at least utf-8,but I don't know if slapcat converts
 anything)

This might be a shot in the dark, but what client browser are you using?
I've had some problems with IE7: though I tell him to use UTF-8, it
posts the form in UTF-8 charset, but telling that it is using
ISO-8859-1!
Try it with Firefox, if you already didn't do it.

Antonio

-
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 ldap authentication problem

2008-02-28 Thread Christian Andersson

anyone ?

Christian Andersson skrev:
Hi, we have setup Tomcat (6.0.10) to authenticate using form 
authentication against openldap (2.3.27) with the jndirealm and 
everything works alright except one little bit of a problem.


if the user name has national characters in it (åæø for norwegian) or 
the password does, the user cannot authenticate .-(


for example if our user has a password of hælge the user cannot log 
in, but if we change the password to helge he can log in.


all our html pages uses the utf-8 encoding, using slapcat and looking at 
the content the data inside openldap seems to be using utf-8 (the output 
from slapcat is at least utf-8,but I don't know if slapcat converts 
anything)


We are also administrating the users from within our application (using 
the standard javax.naming package) and from there we can search AND find 
users with user names that have øæå in them so we know that ldap and 
javax.naming can communicate and use national characters correctly..



looking at the logfile for ldap (when turning up the debug level) it 
almost looks like jndirealm is using iso-8859-1 as encoding since in the 
logfile all natinal characters comes out as garbage.


and as I said ALL pages in the system uses UTF-8 as encoding (including 
the login page)



can anyone give me a hint on where to look next, I've searched for an 
answer using google and in the mailinglist but either I'm nort searching 
for the right thing, or I just cannot find it..


/Christian Andersson



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



tomcat ldap authentication problem

2008-02-20 Thread Christian Andersson
Hi, we have setup Tomcat (6.0.10) to authenticate using form 
authentication against openldap (2.3.27) with the jndirealm and 
everything works alright except one little bit of a problem.


if the user name has national characters in it (åæø for norwegian) or 
the password does, the user cannot authenticate .-(


for example if our user has a password of hælge the user cannot log 
in, but if we change the password to helge he can log in.


all our html pages uses the utf-8 encoding, using slapcat and looking at 
the content the data inside openldap seems to be using utf-8 (the output 
from slapcat is at least utf-8,but I don't know if slapcat converts 
anything)


We are also administrating the users from within our application (using 
the standard javax.naming package) and from there we can search AND find 
users with user names that have øæå in them so we know that ldap and 
javax.naming can communicate and use national characters correctly..



looking at the logfile for ldap (when turning up the debug level) it 
almost looks like jndirealm is using iso-8859-1 as encoding since in the 
logfile all natinal characters comes out as garbage.


and as I said ALL pages in the system uses UTF-8 as encoding (including 
the login page)



can anyone give me a hint on where to look next, I've searched for an 
answer using google and in the mailinglist but either I'm nort searching 
for the right thing, or I just cannot find it..


/Christian Andersson



-
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 https and apache+httpd+tomcat

2007-09-18 Thread Christian Andersson
Hi there I have a problem with tomcat, but first version information for
some of the applications used.


Apache/2.2.3 (Mandriva Linux/PREFORK-1.1.20060mlcs4)

Apache Tomcat/6.0.13

java version 1.6.0_01
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)

I have setup apache httpd to only answer on port 443 using https
and I have several virtual hosts.
one of them I have setup to use mod_jk to connect to tomcat using this
configuration
VirtualHost *:443
ServerName demo.mydomain
JkMount /* worker1
/VirtualHost

in tomcat I have only configured this single connector
Connector port=8009 protocol=AJP/1.3 secure=true scheme=https
redirectPort=443/

now, everything works allright, I can surf to the server using the
following url..

https://demo.mydomain/mywebapp/

and everything works.

HOWEVER, I have 2 problems with this setup and that is, IF I surf to the
same address but forgets to add that last /
(https://demo.mydomain/mywebapp) tomcat redirects the browser to surf to
the correct url (add the ending /) BUT the url it sends to the browser
is WRONG!!!  it is not sending https://demo.mydomain/mywebapp/ as one
could suppose, it is sending https://demo.mydomain:80/mywebapp/

(atleast that is what I suppose is happening.. sicne I cannot check what
is being sent on the Ethernet, since that is encrypted, however firefox
tries to connect to that url.)

I also got the same problem in my forms based login
when the browser is sending the login form, it gets a redirect from the
server with the port 80 instead of no port
if I remove the :80 in the url I get the real page, and I am logged in..

so somewhere (I think it is tomcat) the browser is told to go to port 80

can anyone help me with this?



-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

-
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 https and apache+httpd+tomcat [SOLVED]

2007-09-18 Thread Christian Andersson

Hi Rainer, and thanks for trying to help me.

I had been trying most of what you wrote, and it still looked like it 
was tomcat, but there was one thing that struck me while doing all 
these tests/changes


mod_jk transfers the knowledge of the hostname and port used in Apache 
htpd to the AJP connector, so that self referring URLs can be produced 
correctly.


Comparing my virtualhost definition
VirtualHost *:443
   ServerName demo.mydomain
   JkMount /* worker1
/VirtualHost

with one provided with the installation for squirrelmail (php based)
I did some changes to my virtualhost
IfModule mod_ssl.c
VirtualHost *:443
   ServerName demo.mydomain
   JkMount /* worker1
   SSLEngine on
   SSLProtocol all -SSLv2
   SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
   SSLCertificateFile /etc/pki/tls/certs/localhost.crt
   SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
/VirtualHost
/IfModule

and Voila, now it works...
apparently https WAS working without all of this SSL parameters, but 
mod_jk sent the wrong information to the server.


so even if your suggestions on what to check did not leave me to an 
answer, your message still helped :-)



Rainer Jung wrote:

Hi Christian,

with the combination of mod_jk and AJP connector, this should not 
happen. mod_jk transfers the knowledge of the hostname and port used 
in Apache htpd to the AJP connector, so that self referring URLs can 
be produced correctly. Even the attributes redirectPort and scheme 
should not be necessary. I would also remove the secure attribute. 
As far as I can remember, that one also gets set by mod_jk/AJP (true, 
if communication against apache httpd was encrypted). There is an 
attribute called proxyPort, but for the AJP connector this normally 
works automatically.


So I would expect, that if the redirect is really what comes back, 
this gets produced by some other component:


- proxy
- Apache httpd itself
- Some web framework used by your app

I would:

- check what is really coming back. You canuse a comandline client 
like e.g. curl, that exists in an ssl enabled version and is able to 
showyou the raw response


- check whether the requests was really handled by Tomcat, e.e. by 
adding an access log to Tomcat and checking if the request gets logged 
there


- check, whether the http to https redirect works for a simple hello 
world webapp.


HTH.

Regards,

Rainer

Christian Andersson wrote:

Hi there I have a problem with tomcat, but first version information for
some of the applications used.


Apache/2.2.3 (Mandriva Linux/PREFORK-1.1.20060mlcs4)

Apache Tomcat/6.0.13

java version 1.6.0_01
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)

I have setup apache httpd to only answer on port 443 using https
and I have several virtual hosts.
one of them I have setup to use mod_jk to connect to tomcat using this
configuration
VirtualHost *:443
ServerName demo.mydomain
JkMount /* worker1
/VirtualHost

in tomcat I have only configured this single connector
Connector port=8009 protocol=AJP/1.3 secure=true scheme=https
redirectPort=443/

now, everything works allright, I can surf to the server using the
following url..

https://demo.mydomain/mywebapp/

and everything works.

HOWEVER, I have 2 problems with this setup and that is, IF I surf to the
same address but forgets to add that last /
(https://demo.mydomain/mywebapp) tomcat redirects the browser to surf to
the correct url (add the ending /) BUT the url it sends to the browser
is WRONG!!!  it is not sending https://demo.mydomain/mywebapp/ as one
could suppose, it is sending https://demo.mydomain:80/mywebapp/

(atleast that is what I suppose is happening.. sicne I cannot check what
is being sent on the Ethernet, since that is encrypted, however firefox
tries to connect to that url.)

I also got the same problem in my forms based login
when the browser is sending the login form, it gets a redirect from the
server with the port 80 instead of no port
if I remove the :80 in the url I get the real page, and I am logged in..

so somewhere (I think it is tomcat) the browser is told to go to port 80

can anyone help me with this?


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



webapp getting encryption information

2007-09-03 Thread Christian Andersson
I'm sorry that I'm asking this directly without havinge done that much
research on this matter, but I'm hard pressed on time, and I'm currently
traveling so I have a very limited access to the net.

my question is as follows

I have an webapplication that the users are connecting to via https.
IS it possble for this webappto get information about the encryption
protocol (ssl2/ssl3/tls/etc...) and algoritms
(TLS_RSA_WITH_RC4_128_MD5/TLS_RSA_WITH_RC4_128_SHA/etc) used?

I'm currently looking at securing a website with different grades of
security depending on the type of connection (for example you need RSA
with 256bit key to access some parts but other parts you only need
3DES), so the the less secure connection, the less information/options
will be provided.



-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

-
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 setting up tomcat 5.5 as deamon with jsvc

2007-03-06 Thread Christian Andersson
Hi there I'm having a problem getting tomcat 5.5 working with jsvc on a
server of mine as of this moment I have not managed to get it working
properly  (I'm sending this to both commons-user and tomcat-user mailing
lists in hope to get good answers :-))

The hardware:
  SunFire x4200 (http://www.sun.com/servers/entry/x4200/)
  2 dualcore opteron
  8 GB ram

The software
  Mandriva Corporate Server 4
  Sun Java sdk 1.5.0.11
  Tomcat 5.5.20
  jsvc is set up to change to user apache after startup
  all files in /user/local/apache-tomcat are setup with apache/apache
owner/group
  all files in /var/www/ROOT is set up with apache/apache owner/group

Just one note, if I execute the bin/startup.sh everything works ok.

I've copied the Tomcat5.sh to /etc/init.d/tomcat
and changed it so that it matches my locations

running /etc/init.d/tomcat start  do seem to work, it starts up 2 jsvc
processes (on for ROOT and one for the apache user) also all ports open
as they should (80, etc) I have also set up log4j rootlogger set to
DEBUG level shows that tomcat is starting up

however here comes the problematic part.. from here on I get random
results

sometimes when starting up (according to the logfiles tomcat starts ok)
I can surf to my pages, and then it breaks surfing to the pages just
makes the browser wait (as if the server hangs) looking at the logfile
also showes that the server has stopped since nothing is happening
here anymore.

sometimes, the server seems to hang when starting up (I have several
webapplications in /var/www/ and configured in server.xml since I cannot
see in the log file that it has started some webapps (and not all access
log files are beeing created)

I just cannot get tomcat up and running properly using jsvc..

(and as I said, startin tomcat up with bin/startup.sh do work properly)

Is there some know bugs in jsvc regarding this. (I could not find any in
jira)

from what I can see the only download from the jsvc pages is version
1.0.1 and that is the same version that tomcat 5.5 uses.

At the moment I have redirected the port 80 to 8080 in the firewall and
starting up tomcat manually as user apache since I don't want to run
tomcat as root.





-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

-
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: help getting jsvc up and running on sles9 on ibm pseries (power5)

2006-06-15 Thread Christian Andersson
anyone?

Christian Andersson wrote:
 Hi there, I have a small problem that I'. hoping that you can help me solve.
 
 I want to be able to run tomcat on a server that we have available at a
 hosting firm.
 
 I can get tomcat up and running on it witohut problem, as long as I
 don't try to use jsvc..  and I need jsvc sicne I don't want to run tomat
 as root, or manually start tomcat whenever there is a restart of the
 server, etc..
 
 I've tried compiling the jsvc that comes with tomcat, but no luck, so I
 downloaded deamons 1.0.1 and tried to get that compiling, and still no
 luck, after searching/following different hints that I found on the net
 (I'll ge over those later) I do get jsvc compiled, but I still cannot
 run it, because it looks like jsvc is compiled as a 32 bit binary and
 the ibm-java that I have is a 64 bit binary.
 
 anyway here is a list of what I've done (not much)
 
 after downloading and unpacking jsvc I went into
 daemon-1.0.1/src/native/unix and did a ./configure
 --with-java=/opt/ibm/java2-ppc64-50
 
 and got the following result..
 
 --
 *** Current host ***
 checking build system type... ./support/config.guess: unable to guess
 system type
 
 This script, last modified 2001-04-20, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
 ftp://ftp.gnu.org/pub/gnu/config/
 
 If the version you run (./support/config.guess) is already up to date,
 please
 send the following data and any information you think might be
 pertinent to [EMAIL PROTECTED] in order to provide the needed
 information to handle your system.
 
 config.guess timestamp = 2001-04-20
 
 uname -m = ppc64
 uname -r = 2.6.5-7.252-pseries64
 uname -s = Linux
 uname -v = #1 SMP Tue Feb 14 11:11:04 UTC 2006
 
 /usr/bin/uname -p =
 /bin/uname -X =
 
 hostinfo   =
 /bin/universe  =
 /usr/bin/arch -k   =
 /bin/arch  = ppc64
 /usr/bin/oslevel   =
 /usr/convex/getsysinfo =
 
 UNAME_MACHINE = ppc64
 UNAME_RELEASE = 2.6.5-7.252-pseries64
 UNAME_SYSTEM  = Linux
 UNAME_VERSION = #1 SMP Tue Feb 14 11:11:04 UTC 2006
 configure: error: cannot guess build type; you must specify one
 --
 
 after downloading the newest config.guess from
 http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess
 (the above specified link leads to this file) and replacing the existing
 one in  daemon-1.0.1/src/native/unix/support and once more execute
 configure I get the following...
 
 --
 *** Current host ***
 checking build system type... powerpc64-unknown-linux-gnu
 checking host system type... powerpc64-unknown-linux-gnu
 checking cached host system type... ok
 *** C-Language compilation tools ***
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for ranlib... ranlib
 *** Host support ***
 checking C flags dependant on host system type... failed
 configure: error: Unsupported CPU architecture powerpc64
 --
 
 following information on the net it was suggested that I change the
 configure script so that it accepts powerpc* instead of powerpc
 that is from
 --
 ...
   case $host_cpu in
   powerpc)
 CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;;
 ...
 --
 to
 --
 ...
   case $host_cpu in
   powerpc*)
 CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;;
 ...
 --
 
 the result:
 
 --
 ...
 *** All done ***
 Now you can issue make
 --
 
 make also succedes, but when running jsvc using the script that comes
 with apache tomcat (modified to suite my needs ofcourse) no jsvc is
 running, and in the error log I find the following...
 
 --
 12/06/2006 11:58:15 19502 jsvc.exec error: Cannot dynamically link to
 /opt/ibm/java2-ppc64-50/jre/bin/classic
 /libjvm.so
 12/06/2006 11:58:15 19502 jsvc.exec error:
 /opt/ibm/java2-ppc64-50/jre/bin/classic/libjvm.so: cannot open sha
 red object file: No such file or directory
 12

help getting jsvc up and running on sles9 on ibm pseries (power5)

2006-06-13 Thread Christian Andersson
/java2-ppc64-50/jre/bin/classic these files exist

-rwxr-xr-x  1 root root 238290 2006-03-10 16:50 libjvm.so

so it should be able to find the file since the user that I'm running
this fron is able to find it in the correct location. and can read it.

for me this now looks like jsvc is beeing compiled as a 32bit executable
but java is a 64bit executable..

I've tried reading/changing more stuff to get it working, but sofar I
have been unable to do so.

/Christian Andersson


-
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: Catalina.out gets to big- Server crashes

2006-02-03 Thread Christian Andersson
I recently came across this problem also (i've read some of the later 
mails in this discussion also and I'm answering to those too) with a 
tomcat 5.5.12 installation and using the ext3 filesystem.


anyway, my setup is using jsvc from the commons daemon project, and the 
catalina.out file is defined in the startup script I'm using for jsvc.. 
and that part looks like this... (this is btw from my developer server 
so ignore the fact that it is not logging to /var/log/...)


$CATALINA_HOME/bin/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-pidfile /var/run/jsvc-tomcat.pid \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap

here the parameter -outfile is beeing used to tel where the catalina.out 
file is..


now the question I have is now, how can I here setup jsvc so that it 
uses logrotation, I've searched the net 8google, commons daemon) but not 
been able to get a satisfying answer, but perheps the commons-daemon 
folk in their mailing list knows more and I have to ask there...


/Christian Andersson



[EMAIL PROTECTED] wrote:

Hello,

I got this problem that the catalina.out file gets to big. It grows to
a size of approx. 2 gig and then tomcat just crashes. 


Does anyone know how configure tomcat so that catalina.out only get a size
of 100 MB and then replaces it by a new empty catalina.out? The old one
should be saved under a different name. 


cheers,
Pete 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Identifying a page with no extension to be a JSP

2006-02-01 Thread Christian Andersson
if you just want to do it for this file, just add the filename instead 
of the *, for example

  servlet-mapping
servlet-namejsp/servlet-name
url-pattern/path/file/url-pattern
  /servlet-mapping

in your web.xml

this has worked for me, when I've done it for files in the main path 
anyway, but I suppose it will work for other parts also..


/Christian Andersson


Martin Dubuc wrote:

I have a page that has some JSP directives in it and I would like my Web server to 
process it as such, but the filename for this page is fixed and does not contain an 
extension. Is there a configuration item I can use in Tomcat to indicate that this file 
must be processed by the JSP engine? I have tried setting a URL pattern of form 
path/* but Tomcat seems to require a dot in the URL pattern.



-
Bring words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]