Re: Website downloading old file

2005-01-18 Thread Paul Taylor
BLimey, yes Test1 was miniscule whereas the original file was 11MB, Ill 
try this later on

Parsons Technical Services wrote:
Size is also a consideration. Were the two files the same size? Was 
test1 smaller?

With ISP proxies, it is a crap shot at how they have them configured.
Test theory:
Upload three files. One smaller, one same size and one large than 
file.bin.
Download each.
Change each.
Redownload each and check for changes.

Note: You may wish to repeat this test in the event the ISP proxy 
expires the cached item while you are testing. This may also be what 
happened to the test file. Some systems flush the cache at an interval 
and some do it on file age.

Doug
- Original Message - From: "Paul Taylor" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, January 17, 2005 2:30 PM
Subject: Re: Website downloading old file

Umm inconclusive
asp worked ok, i then created a text file called test1.bin downloaded 
it, edited and tried it again and it downloaded the new one correctly 
as well (this is without the ?var=bogus).

Ben Souther wrote:
Now, for kicks, try with a file with an '.asp' extension.
Your ISP's proxy server may have a list of extensions that don't get
cached.  This would explain why your dynamic JSPs are working but the
static files are being cached.
On Mon, 2005-01-17 at 13:47, Paul Taylor wrote:
OK I think you are onto something here,
the original file was called file.bin, new file replacing it also 
called file.bin and renamed to file2.bin

When I use the ?var=bogus the correct file is returned, but when I 
don't specify a parameter for file.bin it still returns the older 
file.

http://domain/context/file.bin  INCORRECT 
OLD VERSION
http://domain/context/file.bin?var=bogusOKNEW VERSION
http://domain/context/file2.bin?var=bogus  OK NEW VERSION

Ben Souther wrote:

Try requesting the file with a bogus querystring variable
http://domain/context/file.txt?bogus=var
See if the unique URL gets you the right file.
On Mon, 2005-01-17 at 12:43, Paul Taylor wrote:

Can you expand on this please, btw if I change any part of the 
web application itself such as a jsp the results are imediate.
Two ther bits of info which maybe relevent.
1. The host is based in Canada and hence has time set to Candian 
time which is earlier than UK time where Im downloading to.
2. The file Im trying to download is a .bin (Linux) file.

The problem is also happening on Internet Explorer.
Parsons Technical Services wrote:

Sounds like your ISP may have a proxy setup. Usually two 
different browsers don't know about each other.

Doug
- Original Message - From: "Paul Taylor" 
<[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, January 17, 2005 12:26 PM
Subject: Re: Website downloading old file



I think it is a browser problem because I got a friend to download
from his computer and he received the correct file. Im using 
Firefox

and still get the same problem.
Ben Souther wrote:

Also, in the interest of not overlooking the obvious... Did 
you verify that the FTP write actually worked and that you didn't
accidentally ADD another file with a slightly different name?


On Mon, 2005-01-17 at 09:56, Parsons Technical Services wrote:

File permissions may be part of your problem.
What OS is Tomcat running on?
As for the showing the file after deleting it from the 
server, did you do a restart of Tomcat after deleting the 
file? I remember something on the list awhile back similar to 
this.

Doug
- Original Message - From: "Paul Taylor" 
<[EMAIL PROTECTED]>
To: 
Sent: Monday, January 17, 2005 7:42 AM
Subject: Website downloading old file



Puzzled.
I have a Tomcat 5 application, associated with it a file 
that can be downloaded from the website, which is in the 
root directory of the context. (So if the context is called 
myapp the file is in myapp).

Everything was fine but then I realised that there was a 
problem with the file so I ftped a new file to replace it.
But when I try to download the file from the website it 
still refers to the earlier (larger) file.
This still happens even though I have:
shutdown tomcat,
restarted tomcat,
deleted tomcat work directory,
clerared out my browser cache
used a different browser.

It even still allows the file downloads if I delete the file 
from the server, how can this be ?

- 

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




- 

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



- 

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



- 

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

Re: multiple ips, multiple ssl certificates and port forwarding

2005-01-18 Thread rk
hello!
At 17:58 17.01.2005, you wrote:
[EMAIL PROTECTED] wrote:
the keystore syntax is correct, as it works with one keytore ... the 
problem arises when there are multiple virtual hosts, it takes always one 
of them, but not the corresponding
I'm puzzled by two aspects of your setup:
1) why don't you just assign the proper ports in the Connectors
   instead of redirecting through iptables?
i don't want to run tomcat as root, so i cannot use ports<1024 ... therfore 
i do the portforwarding.


2) what's the point of the multiple Services?
as i said, i have multiple domains/ips and for each of them i'd like to use 
a different keystore.
multiple connectors in one service did not seem to work as well. (but i may 
retry)

regards
randolph

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
di randolph kepplinger, mba
[EMAIL PROTECTED] / 0676-844899-800
metamagix - better online solutions
favoritenstrasse 19 / 1040 wien / +43.1.9902804
buero: hackengasse 27 / 1150 wien / +43.1.9902804
http://www.metamagix.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: web.xml parsing error SEVERE

2005-01-18 Thread Carlos Martins
Thank you François!

Reinstalled tomcat and it worked!!

Regards
Carlos

-Original Message-
From: Francois JEANMOUGIN [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 17 de Janeiro de 2005 16:12
To: Tomcat Users List
Subject: RE: web.xml parsing error SEVERE



> java.lang.ClassNotFoundException: org.apache.catalina.Container

Ouch! Are you sure your tomcat installtion is OK? You could have a version
mismatch (between TC4 and TC5) or a jar found at two places or any other
reason why tomcat can't find this class. This is not an XML issue, this is a
class loading problem.

François.

Décharge / Disclaimer 

Ce message et toutes les pièces jointes (ci-après le "message") sont 
confidentiels et établis à l'intention exclusive des destinataires. Toute 
utilisation ou diffusion non autorisée est interdite. Tout message électronique 
étant susceptible d'altération, 123Multimédia et ses filiales déclinent toute 
responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.

This message and any attachments (the "message") are confidential and intended 
solely for the addressees. Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration. Therefore neither 123Multimédia nor any 
of its subsidiaries or affiliates shall be liable for the message if altered, 
changed or falsified.


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



--
Esta mensagem e quaisquer anexos são confidenciais, podendo conter
informação sujeita a sigilo profissional ou qualquer outro dever de
confidencialidade ou de segredo. Caso não seja o destinatário deste e-mail,
não deverá usar, copiar ou revelar o seu conteúdo, solicitando-se que
contacte o emissor com a brevidade possível e apague esta mensagem.
Obrigado pela colaboração.
--
The information transmitted is intended for the person or entity to
which it is addressed only and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.
Thank you for your cooperation.


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



RE: Still having OutOfMemory Problems (Tomcat 4.1.31)

2005-01-18 Thread Dale, Matt

If it is taking these settings then either those are not enough or you are 
running out space in the permanent generation.

Use -XX:MaxPermSize=128m to boost the max size of it.

-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED]
Sent: 17 January 2005 17:52
To: Tomcat Users List
Subject: Still having OutOfMemory Problems (Tomcat 4.1.31)


HI all.

Well I'm still getting my out of memory problem fairly consistently
(again) using Tomcat 4.1.31 with my Struts application.

When I look st the memory usage, it says tomcat is using about 110k of
memory for the VM, but that's just looking at the task manager.

Tomcat is installed as a service using a bat file (follows). Note the
-Xms128M and -Xmx512M options are set...if doesnt seem to matter what
I set these options toeven if I set them to 32m/64m!

How can I tell if tomcat is REALLY using those settings? It doesnt
seem to be

Thanks

-
install.bat:

@SET JAVA_HOME=C:\j2sdk_1_4_0_2
@SET TOMCAT_HOME=C:\Tomcat4.1
@SET TOMCAT_JVM="%JAVA_HOME%\jre\bin\client\jvm.dll"
@SET 
TOMCAT_CLASSPATH=%TOMCAT_HOME%\bin\bootstrap.jar;%TOMCAT_HOME%\common\lib\servlet.jar
@SET TOMCAT_ENDORSED=%TOMCAT_HOME%\common\endorsed
@SET TOMCAT_LOG=%TOMCAT_HOME%\logs\stdout.log
@SET TOMCAT_ERR_LOG=%TOMCAT_HOME%\logs\stderr.log

%TOMCAT_HOME%\bin\tomcat.exe -install "Apache Tomcat 4.1.31"
%TOMCAT_JVM% -Djava.class.path=%TOMCAT_CLASSPATH% -DXms128M -DXmx512M 
-DXX:+PrintTenuringDistribution -DXX:+PrintGCDetails -Xverbosegc
-Djava.endorsed.dirs=%TOMCAT_ENDORSED% -Dcatalina.home=%TOMCAT_HOME%
-start org.apache.catalina.startup.BootstrapService -params start
-stop org.apache.catalina.startup.BootstrapService -params stop -out
%TOMCAT_LOG% -err %TOMCAT_ERR_LOG%

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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

RE: Tomcat 5.5.4 and log4j problem

2005-01-18 Thread Allistair Crossley
Hi,

We had this and it went away by using log4j 1.2.9 or 1.3 beta/alpha.

log4j.appender.ErrorsA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ErrorsA.File=d:/jakarta-tomcat/logs/iq-Sys-Error.log
log4j.appender.ErrorsA.layout=org.apache.log4j.PatternLayout
log4j.appender.ErrorsA.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
log4j.appender.ErrorsA.DatePattern=.-MM-dd

Allistair.

> -Original Message-
> From: Yuval Zantkeren [mailto:[EMAIL PROTECTED]
> Sent: 17 January 2005 20:51
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat 5.5.4 and log4j problem
>
>
> Hi,
>
> We try to use log4j with Tomcat 5.5.4 on Windows 2003 server
> and we have problems with the rename of the files on rollover.
> We try to use DailyRollingFileAppender  and also
> RollingFileAppender  but both with no luck.
> Every time the files need to roll we get Log4j:ERROR Failed
> to rename and the files name.
>
> It is very important to us because it logs all of our
> operation and transaction in our website.
>
> I will appreciate any kind of help,
>
> Regards,
>
> Yuval
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: Alpha, Beeta releases--query

2005-01-18 Thread Dale, Matt

This is not just common to open source development but development in general 
and I suspect there is no reason than common practice. By the time a product 
gets out of beta it is generally stable enough for mainstream realease.

The reason why this is more prominent in open source development is because 
there is more visibility of the development process whereas with commercial 
products it is all done behind closed doors.

Ta
Matt

-Original Message-
From: Rajaneesh [mailto:[EMAIL PROTECTED]
Sent: 18 January 2005 05:15
To: 'Tomcat Users List'
Subject: Alpha, Beeta releases--query


Hi,

  Had a basic question. In the opensource packages why do you have the
releases
named as alpha and beeta? Why not have gamma releases, theeta releases?

Regards
Rajaneesh

 --Curiosity kills--


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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

Re: Problem with including JspC generated web.xml fragment

2005-01-18 Thread Thomas Chille
<[EMAIL PROTECTED]> wrote:> JspC can acually edit web.xml? Where
is this documented? I can't find
> any documentation of the jasper2 task except the old outdated jspc task
> (including all the options/attributes) that is included with Ant.

Hi,

i think JSPC can not merge the web.xml-fragment into the the orginate
web.xml-file. You can doit manually, i.e. before every commit to cvs.
This it what we are doing here.

But Peter Roßbach presents in his column in Javamagazin an
xsl-stylsheet to merge it via an ant task using saxon:

http://tomcat.objektpark.org/kolumne/kolumneArchiv.html#11.2004+JSPs+optimieren+mit+dem+Tomcat+JSP+Container+Jasper+-+JSPs+das+Springen+beibringen

(It's in German, but should be no problem for you :)

If i get enough time i wanna change our buildprocess this way too.

Regards, Thomas

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



RE: Tomcat 5.5.4 and log4j problem

2005-01-18 Thread Yuval Zantkeren
Hi,

We use log4j 1.2.9 but we still have the problem.
It was only the jar?

Regards,

Yuval

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 18, 2005 11:29 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.4 and log4j problem

Hi,

We had this and it went away by using log4j 1.2.9 or 1.3 beta/alpha.

log4j.appender.ErrorsA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ErrorsA.File=d:/jakarta-tomcat/logs/iq-Sys-Error.log
log4j.appender.ErrorsA.layout=org.apache.log4j.PatternLayout
log4j.appender.ErrorsA.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
log4j.appender.ErrorsA.DatePattern=.-MM-dd

Allistair.

> -Original Message-
> From: Yuval Zantkeren [mailto:[EMAIL PROTECTED]
> Sent: 17 January 2005 20:51
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat 5.5.4 and log4j problem
>
>
> Hi,
>
> We try to use log4j with Tomcat 5.5.4 on Windows 2003 server
> and we have problems with the rename of the files on rollover.
> We try to use DailyRollingFileAppender  and also
> RollingFileAppender  but both with no luck.
> Every time the files need to roll we get Log4j:ERROR Failed
> to rename and the files name.
>
> It is very important to us because it logs all of our
> operation and transaction in our website.
>
> I will appreciate any kind of help,
>
> Regards,
>
> Yuval
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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


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



Re: multiple ips, multiple ssl certificates and port forwarding

2005-01-18 Thread rk
hello again!
i also tried it with one service and multiple connectors with the same 
result ... only one of the keystore-files is taken ... as it is the one of 
the webservers original name i tend to think that this may be a 
portforward-problem (i.e. all forwardes port/ips are mapped to the one 
associated with the used keystore)
.. has anybody a working tomcat 4.1.x configuration with multiple ips and 
ssl keystores?

kind regards
randolph
At 16:00 17.01.2005, you wrote:
hello everybody!
i'm new to this list and dont have too much tomcat expericence but i've 
been searching for a while to solve the following problem - unfortunately 
up to date without success:
here is my little mind bender ;-)

i have tomcat 4.1.31 running on a linux server, to use multiple ssl 
keystores i built the following server.xml, i have port-forwarding on 
(script follows). my problem is, that i always get the same certificate, 
no matter what ip/domain i use.

server xml
---

  
  
  
debug="0"/>
  
debug="0"/>

  
  






factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  

  
  


   port="8080" address="100.100.100.3" minProcessors="10" 
maxProcessors="100"
   enableLookups="true" redirectPort="8080"
   acceptCount="100" debug="0" connectionTimeout="2"
   useURIValidationHack="false" disableUploadTimeout="true" />




   port="8443" minProcessors="5" maxProcessors="30"
   address="100.100.100.3"
   enableLookups="true"
   acceptCount="30" debug="0" scheme="https" secure="true"
   useURIValidationHack="false" disableUploadTimeout="true">
  
   keystoreFile="/home/essence/essence/KEYS/c.keystore"
   keystorePass="xxx"
   clientAuth="false" protocol="TLS" />



  
  
  
  


  
  

  

  


   port="8080" address="100.100.100.2" minProcessors="10" 
maxProcessors="100"
   enableLookups="true" redirectPort="8080"
   acceptCount="100" debug="0" connectionTimeout="2"
   useURIValidationHack="false" disableUploadTimeout="true" />




   port="8443" minProcessors="5" maxProcessors="50"
   address="100.100.100.2"
   enableLookups="true"
   acceptCount="50" debug="0" scheme="https" secure="true"
   useURIValidationHack="false" disableUploadTimeout="true">
  
   keystoreFile="/home/essence/essence/KEYS/b.keystore"
   keystorePass=""
   clientAuth="false" protocol="TLS" />



  
  
  
  


  
  
  
  
  


   port="8080" address="100.100.100.1" minProcessors="10" 
maxProcessors="100"
   enableLookups="true" redirectPort="8080"
   acceptCount="100" debug="0" connectionTimeout="2"
   useURIValidationHack="false" disableUploadTimeout="true" />




   port="8443" minProcessors="5" maxProcessors="30"
   address="100.100.100.1"
   enableLookups="true"
   acceptCount="30" debug="0" scheme="https" secure="true"
   useURIValidationHack="false" disableUploadTimeout="true">
  
   keystoreFile="/home/essence/essence/KEYS/a.keystore"
   keystorePass="x"
   clientAuth="false" protocol="TLS" />



  
  
  
  


  
  
  
  


the multiple ips work and my portforwarding script looks as follows:
iptables -t nat -A PREROUTING -j REDIRECT -p tcp 
--destination-port 80:80 --to-ports 8080
iptables -t nat -A PREROUTING -j REDIRECT -p tcp 
--destination-port 443:443 --to-ports 8443

does anybody have a hint what is wrong with this?
kind regards
randolph


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
di randolph kepplinger, mba
[EMAIL PROTECTED] / 0676-844899-800
metamagix - better online solutions
favoritenstrasse 19 / 1040 wien / +43.1.9902804
buero: hackengasse 27 / 1150 wien / +43.1.9902804
http://www.metamagix.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


File upload location.

2005-01-18 Thread Pawson, David
I've an servlet running from
/tc5028/webapps/repository

and I'm storing client data in 
/tc5028/webapps/repository/data/ 

I'm curious what strategy people adopt when 
upgrading. I'm thinking of moving up to java 1.5
and the more recent tomcat, do people overwrite
the tc installation or move everything to a new
/tc55 directory. That would allow testing prior
to going live. 

That's inconvenient to say the least with a few
gigs of data to move, but seemingly necessary.

what do others do please?


regards DaveP


** snip here **








Regards DaveP.

 snip here *

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



RE: File upload location.

2005-01-18 Thread Francois JEANMOUGIN
That's why I use catalina.base and catalina.home (CATALINA_BASE and
CATALINA_HOME) as described in RUNNING.txt so that tomcat installation is
independent of webapps installtion. I just have to take care about syntax
incompatibility in server.xml (for example).

The method is described in 
(4) Advanced Configuration - Multiple Tomcat 5 Instances
from RUNNING.txt. 

Using this binary separation will allow you to upgrade smoothly without
loosing data or long service interruption problem.

> -Original Message-
> From: Pawson, David [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 18, 2005 12:21 PM
> To: tomcat-user@jakarta.apache.org
> Subject: File upload location.
> 
> I've an servlet running from
> /tc5028/webapps/repository
> 
> and I'm storing client data in
> /tc5028/webapps/repository/data/
> 
> I'm curious what strategy people adopt when
> upgrading. I'm thinking of moving up to java 1.5
> and the more recent tomcat, do people overwrite
> the tc installation or move everything to a new
> /tc55 directory. That would allow testing prior
> to going live.
> 
> That's inconvenient to say the least with a few
> gigs of data to move, but seemingly necessary.
> 
> what do others do please?
> 
> 
> regards DaveP
> 

* snip here *

Décharge / Disclaimer

Ce message et toutes les pièces jointes (ci-après le "message") sont 
confidentiels et établis à l'intention exclusive des destinataires. Toute 
utilisation ou diffusion non autorisée est interdite. Tout message électronique 
étant susceptible d'altération, 123Multimédia et ses filiales déclinent toute 
responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.

This message and any attachments (the "message") are confidential and intended 
solely for the addressees. Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration. Therefore neither 123Multimédia nor any 
of its subsidiaries or affiliates shall be liable for the message if altered, 
changed or falsified.


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



Re: Problem with including JspC generated web.xml fragment

2005-01-18 Thread Tim Funk
My snippet does 2 things.
1) Merges the servlet names and mappings into web.xml
2) creates a file containing all the mappings done in 1
The 2 are independent from one another. But I like to see the snippet created 
by the JSPC task by iteslef occasionally for when bad things happen.

The jasper2 task edits web.xml in place. That being said, make sure your 
build process creates a build directory. Copies all we resources to the build 
directory (including web.xml), then compile and classes to WEB-INF/classes 
(or compile and jar them), then run the jasper2 task to in place edit 
web.xml. The advantage is make clean becomes a dir removal and a rebuild is 
*very* easy.

-Tim
Andreas Schildbach wrote:
Tim Funk wrote:
I haven't read the docs for this so I am very surprised it wasn't 
there.  The source for JSPC is very easy to read. Anything that is a 
set method can be called via ant. With luck - I might find some time 
to update the docs for this one.

Actually the semantics is more unclear than the syntax to me. What 
exactly does addWebXmlMappings="true" mean? Add to the file specified in 
webXmlFragment? But in your example the file "generated_web.xml" isn't 
present at first, so there can't anything be added?

Regards,
Andreas

 validateXml="false"
 uriroot="${basedir}/${build.dir}"
 poolingEnabled="false"
 
webXmlFragment="${basedir}/${build.dir}/WEB-INF/generated_web.xml"
 addWebXmlMappings="true"
 outputDir="${basedir}/${jspc.base}"/>

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

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


Context parameters in server.xml

2005-01-18 Thread Gert-Jan Kreeft
I have a web-application configured in the server.xml of a Tomcat 4.1.30 
server. In the  element I have a nested  that can be 
accessed in my application code with:

ctx.getInitParameter("...")
This works fine, as long as I do not redeploy the web-application. When the 
webapp is redeployed the configured parameter is lost. Reloading the webapp 
with the Tomcat manager does not cause this problem.

Is this normal behaviour or is it a Tomcat bug?
_
MSN Webmessenger overal en altijd beschikbaar http://webmessenger.msn.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: index.jsp: why don't modifications to it show up?

2005-01-18 Thread QM
On Mon, Jan 17, 2005 at 08:58:15PM -0800, Kai Utility wrote:
: Thanks for your excellent introduction to setting up Tomcat.
: I've thought of an addition you might want to include, namely, how to
: replace tomcat's index.jsp with one's own.

What about either one of the following, instead:
1/ a big red message in the default Tomcat webapps to tell people,
"don't edit this directly; create your own webapp!"

2/ a similar message in the docs

(These two may already exist, I haven't yet checked the FAQ/wiki/etc.)

3/ a sample webapp that's *not* precompiled, and thus designed for user
tweaking

Really, this question comes up every few weeks...

I figure #1 would have the greatest impact (read: result in the fewest
such questions to the list).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: File upload location.

2005-01-18 Thread Pawson, David
 

-Original Message-
From: Francois JEANMOUGIN 
That's why I use catalina.base and catalina.home (CATALINA_BASE and
CATALINA_HOME) as described in RUNNING.txt so that tomcat 
installation is independent of webapps installtion. I just 
have to take care about syntax incompatibility in 
server.xml (for example).

The method is described in
(4) Advanced Configuration - Multiple Tomcat 5 Instances 
from RUNNING.txt. 

Using this binary separation will allow you to upgrade 
smoothly without loosing data or long service interruption problem.

That says,
"When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat 5 will
calculate all relative references for files in the following directories based
on the value of $CATALINA_BASE instead of $CATALINA_HOME:"

So in using

/tc5028/webapps/repository/data/ 

If catalina base is set to /elsewhere,
then all the configuration files and my application code will be there too?

in /elsewhere/webapps/repository/data

and CATALINA_HOME can still point to /tomcat5028.  

Yes, that all makes sense.

Francois, you also note "I just have to take care about syntax incompatibility 
in server.xml (for example)."

Quick look, and I can't see anything that has path problems there?
Can you explain please?


regards DaveP

** snip here **



 

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



RE: performance/scalability impact of many webapps in one container

2005-01-18 Thread Varley, Roger
> 
> For reasons beyond my control, a web application
> (apache/Tomcat/PostgreSQL) that I support will need to be partitioned
> into one context per customer (to support one database per customer).
> I'm wondering:
> 

Do you really need one database per customer? In a similair situation, we 
resolved this by adding a "client code" to all our database tables & indexes. 
Each customer/client was given their own URL to access the system and a filter 
used the incoming url to load a client code into the request headers before 
passing the request to a single servlet.

Regards
Roger


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

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



Re: Problem with including JspC generated web.xml fragment

2005-01-18 Thread Thomas Chille
On Tue, 18 Jan 2005 06:43:16 -0500, Tim Funk <[EMAIL PROTECTED]> wrote:
> My snippet does 2 things.
> 
> 1) Merges the servlet names and mappings into web.xml
> 2) creates a file containing all the mappings done in 1

Hi Tim,

can you please provide this snippet, maybe direct to me?


I googled around a little bit and found an easy solution wich works for me:

http://marc.theaimsgroup.com/?l=ant-user&m=106153992631697&w=2

A copy-task is replacing a token in web.xml with the generated content. 

Regards, Thomas

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



Re: multiple ips, multiple ssl certificates and port forwarding

2005-01-18 Thread Hassan Schroeder
[EMAIL PROTECTED] wrote:
i also tried it with one service and multiple connectors with the same 
result ... only one of the keystore-files is taken ... as it is the one 
of the webservers original name i tend to think that this may be a 
portforward-problem (i.e. all forwardes port/ips are mapped to the one 
associated with the used keystore)
.. has anybody a working tomcat 4.1.x configuration with multiple ips 
and ssl keystores?
Yes, one service with multiple connectors for different IPs using
different keystores. It works fine, and I don't see any significant
difference between my server.xml and the one you previously sent.
I would seriously urge you to turn off the port-forwarding, change
the connectors to standard ports 80 and 443 and test again. :-)
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


Re: multiple ips, multiple ssl certificates and port forwarding

2005-01-18 Thread rk
hello hassan!
hmm ... portforwarding works with jetty (on the same ports), so it should 
also work with tomcat, and i'd rather have tomcat on a non privileged port.
which tomcat version are you using?
could you send me an anonymized version of your config?

kind regards
randolph
At 16:06 18.01.2005, you wrote:
[EMAIL PROTECTED] wrote:
i also tried it with one service and multiple connectors with the same 
result ... only one of the keystore-files is taken ... as it is the one 
of the webservers original name i tend to think that this may be a 
portforward-problem (i.e. all forwardes port/ips are mapped to the one 
associated with the used keystore)
.. has anybody a working tomcat 4.1.x configuration with multiple ips and 
ssl keystores?
Yes, one service with multiple connectors for different IPs using
different keystores. It works fine, and I don't see any significant
difference between my server.xml and the one you previously sent.
I would seriously urge you to turn off the port-forwarding, change
the connectors to standard ports 80 and 443 and test again. :-)
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
di randolph kepplinger, mba
[EMAIL PROTECTED] / 0676-844899-800
metamagix - better online solutions
favoritenstrasse 19 / 1040 wien / +43.1.9902804
buero: hackengasse 27 / 1150 wien / +43.1.9902804
http://www.metamagix.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problem with including JspC generated web.xml fragment

2005-01-18 Thread Andreas Schildbach
Tim Funk wrote:
The jasper2 task edits web.xml in place. That being said, make sure your 
build process creates a build directory. Copies all we resources to the 
build directory (including web.xml), then compile and classes to 
WEB-INF/classes (or compile and jar them), then run the jasper2 task to 
in place edit web.xml. The advantage is make clean becomes a dir removal 
and a rebuild is *very* easy.
Sorry, it still does not work.
I have a fully functional, non-precompiled web application in dist/war.
I am trying to transform it into a precompiled web app in place, using 
the following Ant tasks:


	
		
		
	



When executing the target that contains the tasks with Eclipse 3.1M4 
(which contains Ant 1.6.2), I just get

BUILD FAILED: C:\eclipse-3.1M4\workspace\myapp\build.xml:86: 
java.lang.NullPointerException

My CATALINA_HOME environment variable points to an installation of 
Tomcat 5.0.28. I am using Windows XP SP2.

Is there anything I can do to debug this problem? Where can I read the 
stack trace of the exception?

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


Re: multiple ips, multiple ssl certificates and port forwarding

2005-01-18 Thread Hassan Schroeder
[EMAIL PROTECTED] wrote:
hmm ... portforwarding works with jetty (on the same ports), so it 
should also work with tomcat, and i'd rather have tomcat on a non 
privileged port.
You can always add it back in, once you've resolved the problem
(and confirmed that's *not* part of it). But that's just my approach.
which tomcat version are you using?
could you send me an anonymized version of your config?
I'll send you a sample server.xml offlist (for a 4.1.x install).
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


RE: Session is too sticky

2005-01-18 Thread Srinivas Rao Ch
Hi Michael,

Thanks for the reply. I followed the technique you suggested, but I
could not make my app running. From first cluster member it is happily
going to second cluster member, but from there it is not moving (If
there are no connection there also). 
Besides invalidating the HttpSession, I erased the cookie with name
"sid". I tried to erase cookie with name jsessionid also, but seems that
it does not exists.
Not only ";jsessionid=.TomcatA" but I tried by appending
"a=b&jsessionid=.TomcatA" also. Still no luck.
Between, which session provides the sticky behavior and where it is
stored. And, does the string ";jsessionid=someid.TomcatA" travel with
the request?

I appreciate any help in this regard.

Regards,
Srinivas

-Original Message-
From: Michael Echerer [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 16, 2005 4:55 PM
To: Tomcat Users List
Subject: Re: Session is too sticky

Hi!

What you could do is to give Apache a hint where to direct a request to.

E.g. you could not simply invalidate the session, but also redirect to 
your start page again with a little "trick".

Add a ;jsessionid= string to the URL.

Assume your Tomcat JVM routes are called e.g. tomcatA, tomcatB, tomcatC,

etc. you will have noticed that the ;jsessionid look like 
http://someurl;jsessionid=someid.tomcatA or 
http://someurl;jsessionid=someid.tomcatB etc.

It get's interesting when you pass an URL like:
http://someurl;jsessionid=.tomcatC

Obviously because of the missing sessionid "someid" this can not be or 
create a valid session on one of your Tomcats, but for your Apache this 
"flag" is "sticky" enough to direct to that specific Tomcat "tomcatC" 
(which should be an instance that has enough connections left. In case 
you don't know which of your Tomcats has connection left, you might 
randomly add .jsessionid=.tomcat? and redirect until you found a Tomcat 
you can use.

Thus by simple adding an incomplete ;jessionid=. you can force

Apache to direct to that instance, Tomcat will detect the broken 
session, create a new one (but since you're already on the correct 
Tomcat, that's fine). Note: In case one Tomcat is down, Apache will know

this in advance and eventhough you specify ;jessionid=.tomcatB you will 
go to tomcatA or tomcatC, if tomcatB was down. So now problems with 
failover.

I use this mechanism/trick to have an enhanced Tomcat manager 
application.  One frame with all my Tomcat instances that are linked 
with this ;sessionid=. and one frame with the manager html 
page itself. With some more "magic" I can now deliberately switch 
between my instances and deploy/start on the instance I want, although 
Apache would otherwise pop up any manager app due to loadbalancing.

2xApache 2.x, 4xTomcat 5.x, modjk2

Hope that helps!

Cheers,
Michael


Srinivas Rao Ch wrote:

> Hi,
> 
>  
> 
> I am implementing clustering with Apache + Tomcat + mod_jk2. And, I
> enabled Sticky Session. Sticky behavior is happening as expected.
> 
>  
> 
> I have a specific requirement. My DB connections for each cluster
member
> are limited. Once the cluster member's DB connections are exhausted it
> has to redirect the request to other cluster members. I am doing this
by
> redirecting the request to LB again after invalidating the Http
Session
> (which is used by apache to provide the sticky behavior). I called
> invalidate() on session and I am sure session is invalidated.
> 
>  
> 
> Still, the session is going to the same cluster member all the time. I
> appreciate if somebody can direct me how to solve this problem.
> 
>  
> 
> Regards,
> 
> Srinivas
> 
> 


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


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



tomcat4 + postgresql jdbc

2005-01-18 Thread Oege de Moor
I'm attempting to install tomcat4 + postgresql jdbc under Debian linux.
I've put the jdbc jar at /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar

When I attempt to connect to a database via jsp, I get
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)

I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT,
with the following contents:

-

<[EMAIL PROTECTED] import="java.sql.*"%>
<%
   // Define the connection
   Connection con = null;
   // Check that the DB2Driver class is available
   Class.forName("org.postgresql.Driver");
   try {
   // Attempt to connect to the Database
   con =
DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
   out.println("The test is complete, your Database has been
contacted");
   }
   // Make sure to catch any exceptions
   catch (SQLException e) {
 out.println(e.getMessage());
   }
%>
---

When I point my web browser at http://localhost:8180/test2.jsp,
the above exception occurs. The full stack trace is appended below.

I've attempted adding this line to the security policy file
in /etc/tomcat4/policy.d/99examples.policy:

grant codeBase "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
{
permission java.security.AllPermission;
};


Any help would be much appreciated!

-Oege


Something unusual has occured to cause the driver to fail. Please report
this exception: Exception: java.security.AccessControlException: access
denied (java.net.SocketPermission localhost resolve) Stack Trace:
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve) at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at
java.lang.SecurityManager.checkConnect(SecurityManager.java:1023) at
java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
java.net.InetAddress.getAllByName0(InetAddress.java:981) at
java.net.InetAddress.getAllByName(InetAddress.java:975) at
java.net.InetAddress.getByName(InetAddress.java:889) at
java.net.InetSocketAddress.(InetSocketAddress.java:114) at
java.net.Socket.(Socket.java:124) at
org.postgresql.core.PGStream.(PGStream.java:47) at
org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
at org.postgresql.Driver.connect(Driver.java:139) at
java.sql.DriverManager.getConnection(DriverManager.java:512) at
java.sql.DriverManager.getConnection(DriverManager.java:171) at
org.apache.jsp.test2_jsp._jspService(test2_jsp.java:51) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:51)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:129)
at java.security.AccessController.doPrivileged(Native Method) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:125)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.core.StandardPipeline.invok

RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Carlos Martins
Hi,

Is it possible that the database connection credentials are not right? Have you 
tried connecting to the database from the standard client with the same 
username and password?

Regards
Carlos

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
Sent: terça-feira, 18 de Janeiro de 2005 16:27
To: tomcat-user@jakarta.apache.org
Subject: tomcat4 + postgresql jdbc

I'm attempting to install tomcat4 + postgresql jdbc under Debian linux.
I've put the jdbc jar at /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar

When I attempt to connect to a database via jsp, I get
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)

I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT,
with the following contents:

-

<[EMAIL PROTECTED] import="java.sql.*"%>
<%
   // Define the connection
   Connection con = null;
   // Check that the DB2Driver class is available
   Class.forName("org.postgresql.Driver");
   try {
   // Attempt to connect to the Database
   con =
DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
   out.println("The test is complete, your Database has been
contacted");
   }
   // Make sure to catch any exceptions
   catch (SQLException e) {
 out.println(e.getMessage());
   }
%>
---

When I point my web browser at http://localhost:8180/test2.jsp,
the above exception occurs. The full stack trace is appended below.

I've attempted adding this line to the security policy file
in /etc/tomcat4/policy.d/99examples.policy:

grant codeBase "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
{
permission java.security.AllPermission;
};


Any help would be much appreciated!

-Oege


Something unusual has occured to cause the driver to fail. Please report
this exception: Exception: java.security.AccessControlException: access
denied (java.net.SocketPermission localhost resolve) Stack Trace:
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve) at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at
java.lang.SecurityManager.checkConnect(SecurityManager.java:1023) at
java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
java.net.InetAddress.getAllByName0(InetAddress.java:981) at
java.net.InetAddress.getAllByName(InetAddress.java:975) at
java.net.InetAddress.getByName(InetAddress.java:889) at
java.net.InetSocketAddress.(InetSocketAddress.java:114) at
java.net.Socket.(Socket.java:124) at
org.postgresql.core.PGStream.(PGStream.java:47) at
org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
at org.postgresql.Driver.connect(Driver.java:139) at
java.sql.DriverManager.getConnection(DriverManager.java:512) at
java.sql.DriverManager.getConnection(DriverManager.java:171) at
org.apache.jsp.test2_jsp._jspService(test2_jsp.java:51) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:51)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:129)
at java.security.AccessController.doPrivileged(Native Method) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:125)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.v

Re: performance/scalability impact of many webapps in one container

2005-01-18 Thread Remy Maucherat
On Tue, 18 Jan 2005 13:12:06 -, Varley, Roger
<[EMAIL PROTECTED]> wrote:
> >
> > For reasons beyond my control, a web application
> > (apache/Tomcat/PostgreSQL) that I support will need to be partitioned
> > into one context per customer (to support one database per customer).
> > I'm wondering:
> >
> 
> Do you really need one database per customer? In a similair situation, we 
> resolved this by adding a "client code" to all our database tables & indexes. 
> Each customer/client was given their own URL to access the system and a 
> filter used the incoming url to load a client code into the request headers 
> before passing the request to a single servlet.
> 

Obviously, it all depends on the isolation level you want. For
example, you can restrict what web applications can do in a
multi-"user" environment by using the security manager.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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



[OT] Tomcat training in Paris

2005-01-18 Thread Remy Maucherat
Hi,

Sorry for the ad, but maybe it could be of interest to some people here.

I'm doing a 2 day training on Tomcat in Paris in february. The
training is on advanced topics and covers mostly Tomcat 5.5. Details
are available here:
http://www.jboss.com/services/training/EMEAcourses#paris-tom

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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



Re: Problem with including JspC generated web.xml fragment

2005-01-18 Thread Thomas Chille
On Tue, 18 Jan 2005 17:00:54 +0100, Andreas Schildbach
<[EMAIL PROTECTED]> wrote:
> Sorry, it still does not work.

You have still to specify the webXmlFragment-attribute. Without this
i'm getting a NullpointerException too.

@Tim: i found your snippet and now its works for me too :)

It's funny how many people work around this problem on different ways
and it could be so easy. Maybe the jasper-howto on apache.org don't
tell all secrets.

Regards, Thomas

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



RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Oege de Moor

Thanks for the suggestion!

I can successfully connect with a normal Java program.
In pg_hba.conf, I've got the line

hostall all 127.0.0.1 255.255.255.255   trust
hostall all 192.168.53.2  255.255.255.0   trust

so all IP connections from the local network (192.168.53.xx) should
be accepted, even without a password...

-Oege

On Tue, 18 Jan 2005, Carlos Martins wrote:

> Hi,
>
> Is it possible that the database connection credentials are not right? Have 
> you tried connecting to the database from the standard client with the same 
> username and password?
>
> Regards
> Carlos
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> Sent: terça-feira, 18 de Janeiro de 2005 16:27
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat4 + postgresql jdbc
>
> I'm attempting to install tomcat4 + postgresql jdbc under Debian linux.
> I've put the jdbc jar at /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar
>
> When I attempt to connect to a database via jsp, I get
> java.security.AccessControlException: access denied
> (java.net.SocketPermission localhost resolve)
>
> I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT,
> with the following contents:
>
> -
>
> <[EMAIL PROTECTED] import="java.sql.*"%>
> <%
>// Define the connection
>Connection con = null;
>// Check that the DB2Driver class is available
>Class.forName("org.postgresql.Driver");
>try {
>// Attempt to connect to the Database
>con =
> DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
>out.println("The test is complete, your Database has been
> contacted");
>}
>// Make sure to catch any exceptions
>catch (SQLException e) {
>  out.println(e.getMessage());
>}
> %>
> ---
>
> When I point my web browser at http://localhost:8180/test2.jsp,
> the above exception occurs. The full stack trace is appended below.
>
> I've attempted adding this line to the security policy file
> in /etc/tomcat4/policy.d/99examples.policy:
>
> grant codeBase "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
> {
> permission java.security.AllPermission;
> };
>
>
> Any help would be much appreciated!
>
> -Oege
>
>
> Something unusual has occured to cause the driver to fail. Please report
> this exception: Exception: java.security.AccessControlException: access
> denied (java.net.SocketPermission localhost resolve) Stack Trace:
> java.security.AccessControlException: access denied
> (java.net.SocketPermission localhost resolve) at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
> at
> java.security.AccessController.checkPermission(AccessController.java:401)
> at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at
> java.lang.SecurityManager.checkConnect(SecurityManager.java:1023) at
> java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
> java.net.InetAddress.getAllByName0(InetAddress.java:981) at
> java.net.InetAddress.getAllByName(InetAddress.java:975) at
> java.net.InetAddress.getByName(InetAddress.java:889) at
> java.net.InetSocketAddress.(InetSocketAddress.java:114) at
> java.net.Socket.(Socket.java:124) at
> org.postgresql.core.PGStream.(PGStream.java:47) at
> org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
> at org.postgresql.Driver.connect(Driver.java:139) at
> java.sql.DriverManager.getConnection(DriverManager.java:512) at
> java.sql.DriverManager.getConnection(DriverManager.java:171) at
> org.apache.jsp.test2_jsp._jspService(test2_jsp.java:51) at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
> at
> org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:51)
> at
> org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:129)
> at java.security.AccessController.doPrivileged(Native Method) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:125)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.cata

RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Larry Isaacs
If you are running Tomcat with a security manager, you will need
to make sure the catalina.policy file includes permission for
your webapp to connect to the server in question.  The examples
found in the comments at the end of the default catalina.policy
file are examples of such a permission.

Cheers,
Larry

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> Sent: Tuesday, January 18, 2005 11:54 AM
> To: Tomcat Users List
> Subject: RE: tomcat4 + postgresql jdbc
> 
> 
> Thanks for the suggestion!
> 
> I can successfully connect with a normal Java program.
> In pg_hba.conf, I've got the line
> 
> hostall all 127.0.0.1 
> 255.255.255.255   trust
> hostall all 192.168.53.2  
> 255.255.255.0   trust
> 
> so all IP connections from the local network (192.168.53.xx) should
> be accepted, even without a password...
> 
> -Oege
> 
> On Tue, 18 Jan 2005, Carlos Martins wrote:
> 
> > Hi,
> >
> > Is it possible that the database connection credentials are 
> not right? Have you tried connecting to the database from the 
> standard client with the same username and password?
> >
> > Regards
> > Carlos
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > Sent: terça-feira, 18 de Janeiro de 2005 16:27
> > To: tomcat-user@jakarta.apache.org
> > Subject: tomcat4 + postgresql jdbc
> >
> > I'm attempting to install tomcat4 + postgresql jdbc under 
> Debian linux.
> > I've put the jdbc jar at 
> /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar
> >
> > When I attempt to connect to a database via jsp, I get
> > java.security.AccessControlException: access denied
> > (java.net.SocketPermission localhost resolve)
> >
> > I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT,
> > with the following contents:
> >
> > -
> >
> > <[EMAIL PROTECTED] import="java.sql.*"%>
> > <%
> >// Define the connection
> >Connection con = null;
> >// Check that the DB2Driver class is available
> >Class.forName("org.postgresql.Driver");
> >try {
> >// Attempt to connect to the Database
> >con =
> > DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
> >out.println("The test is complete, your Database has been
> > contacted");
> >}
> >// Make sure to catch any exceptions
> >catch (SQLException e) {
> >  out.println(e.getMessage());
> >}
> > %>
> > ---
> >
> > When I point my web browser at http://localhost:8180/test2.jsp,
> > the above exception occurs. The full stack trace is appended below.
> >
> > I've attempted adding this line to the security policy file
> > in /etc/tomcat4/policy.d/99examples.policy:
> >
> > grant codeBase 
> "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
> > {
> > permission java.security.AllPermission;
> > };
> >
> >
> > Any help would be much appreciated!
> >
> > -Oege
> >
> >
> > Something unusual has occured to cause the driver to fail. 
> Please report
> > this exception: Exception: 
> java.security.AccessControlException: access
> > denied (java.net.SocketPermission localhost resolve) Stack Trace:
> > java.security.AccessControlException: access denied
> > (java.net.SocketPermission localhost resolve) at
> > 
> java.security.AccessControlContext.checkPermission(AccessContr
> olContext.java:269)
> > at
> > 
> java.security.AccessController.checkPermission(AccessControlle
> r.java:401)
> > at 
> java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at
> > java.lang.SecurityManager.checkConnect(SecurityManager.java:1023) at
> > java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
> > java.net.InetAddress.getAllByName0(InetAddress.java:981) at
> > java.net.InetAddress.getAllByName(InetAddress.java:975) at
> > java.net.InetAddress.getByName(InetAddress.java:889) at
> > java.net.InetSocketAddress.(InetSocketAddress.java:114) at
> > java.net.Socket.(Socket.java:124) at
> > org.postgresql.core.PGStream.(PGStream.java:47) at
> > 
> org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(Ab
> stractJdbc1Connection.java:197)
> > at org.postgresql.Driver.connect(Driver.java:139) at
> > java.sql.DriverManager.getConnection(DriverManager.java:512) at
> > java.sql.DriverManager.getConnection(DriverManager.java:171) at
> > org.apache.jsp.test2_jsp._jspService(test2_jsp.java:51) at
> > 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:162)
> > at
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:240)
> > at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> > 
> org.apache.catalina.co

RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Oege de Moor

Do you mean I should add something like:

grant codeBase "file:/var/lib/tomcat4/webapps/-" {
  permission java.net.SocketPermission "127.0.0.1:5432", "connect";
  permission java.net.SocketPermission "127.0.0.1:5432", "resolve";
};

Unfortunately that still doesn't work...

On Tue, 18 Jan 2005, Larry Isaacs wrote:

> If you are running Tomcat with a security manager, you will need
> to make sure the catalina.policy file includes permission for
> your webapp to connect to the server in question.  The examples
> found in the comments at the end of the default catalina.policy
> file are examples of such a permission.
>
> Cheers,
> Larry
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > Sent: Tuesday, January 18, 2005 11:54 AM
> > To: Tomcat Users List
> > Subject: RE: tomcat4 + postgresql jdbc
> >
> >
> > Thanks for the suggestion!
> >
> > I can successfully connect with a normal Java program.
> > In pg_hba.conf, I've got the line
> >
> > hostall all 127.0.0.1
> > 255.255.255.255   trust
> > hostall all 192.168.53.2
> > 255.255.255.0   trust
> >
> > so all IP connections from the local network (192.168.53.xx) should
> > be accepted, even without a password...
> >
> > -Oege
> >
> > On Tue, 18 Jan 2005, Carlos Martins wrote:
> >
> > > Hi,
> > >
> > > Is it possible that the database connection credentials are
> > not right? Have you tried connecting to the database from the
> > standard client with the same username and password?
> > >
> > > Regards
> > > Carlos
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > > Sent: terça-feira, 18 de Janeiro de 2005 16:27
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: tomcat4 + postgresql jdbc
> > >
> > > I'm attempting to install tomcat4 + postgresql jdbc under
> > Debian linux.
> > > I've put the jdbc jar at
> > /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar
> > >
> > > When I attempt to connect to a database via jsp, I get
> > > java.security.AccessControlException: access denied
> > > (java.net.SocketPermission localhost resolve)
> > >
> > > I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT,
> > > with the following contents:
> > >
> > > -
> > >
> > > <[EMAIL PROTECTED] import="java.sql.*"%>
> > > <%
> > >// Define the connection
> > >Connection con = null;
> > >// Check that the DB2Driver class is available
> > >Class.forName("org.postgresql.Driver");
> > >try {
> > >// Attempt to connect to the Database
> > >con =
> > > DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
> > >out.println("The test is complete, your Database has been
> > > contacted");
> > >}
> > >// Make sure to catch any exceptions
> > >catch (SQLException e) {
> > >  out.println(e.getMessage());
> > >}
> > > %>
> > > ---
> > >
> > > When I point my web browser at http://localhost:8180/test2.jsp,
> > > the above exception occurs. The full stack trace is appended below.
> > >
> > > I've attempted adding this line to the security policy file
> > > in /etc/tomcat4/policy.d/99examples.policy:
> > >
> > > grant codeBase
> > "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
> > > {
> > > permission java.security.AllPermission;
> > > };
> > >
> > >
> > > Any help would be much appreciated!
> > >
> > > -Oege
> > >
> > >
> > > Something unusual has occured to cause the driver to fail.
> > Please report
> > > this exception: Exception:
> > java.security.AccessControlException: access
> > > denied (java.net.SocketPermission localhost resolve) Stack Trace:
> > > java.security.AccessControlException: access denied
> > > (java.net.SocketPermission localhost resolve) at
> > >
> > java.security.AccessControlContext.checkPermission(AccessContr
> > olContext.java:269)
> > > at
> > >
> > java.security.AccessController.checkPermission(AccessControlle
> > r.java:401)
> > > at
> > java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at
> > > java.lang.SecurityManager.checkConnect(SecurityManager.java:1023) at
> > > java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
> > > java.net.InetAddress.getAllByName0(InetAddress.java:981) at
> > > java.net.InetAddress.getAllByName(InetAddress.java:975) at
> > > java.net.InetAddress.getByName(InetAddress.java:889) at
> > > java.net.InetSocketAddress.(InetSocketAddress.java:114) at
> > > java.net.Socket.(Socket.java:124) at
> > > org.postgresql.core.PGStream.(PGStream.java:47) at
> > >
> > org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(Ab
> > stractJdbc1Connection.java:197)
> > > at org.postgresql.Driver.connect(Driver.java:139) at
> > > java.sql.DriverManager.getConnection(DriverManager.java:512) at
> > > java.sql.DriverManager.getConnection(DriverManager.java:171) at
> > > org.ap

Re: tomcat4 + postgresql jdbc

2005-01-18 Thread karjera

Laba diena.



Dėkojame, kad mums parašėte.

Jūsų atsiųsta žinutė išsaugota mūsų duomenų bazėje.

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



precompile question

2005-01-18 Thread Matt Bathje
Hi All -
When pre-compiling using an ant task, is there a way to exclude certain 
files from being precompiled? I tried using an  tag on the 
jasper2 task, but it tells me that it does not support that. It looks 
like the deprecated jspc task that used to come with apache support 
include/exclude filters...

If I put the exclude on the javac part of the precompile, then the file 
does not get compiled, but it is still included in the generated web.xml 
file, and makes it so tomcat throws an error, so that doesn't help.

If there is a way to implicitly include all the files that need 
compiling, I would be willing to settle for that as well.

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


RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Phillip Qin
Test without security manager so that we can isolate the problem.

-Original Message-
From: Oege de Moor [mailto:[EMAIL PROTECTED] 
Sent: January 18, 2005 12:24 PM
To: Tomcat Users List
Subject: RE: tomcat4 + postgresql jdbc



Do you mean I should add something like:

grant codeBase "file:/var/lib/tomcat4/webapps/-" {
  permission java.net.SocketPermission "127.0.0.1:5432", "connect";
  permission java.net.SocketPermission "127.0.0.1:5432", "resolve"; };

Unfortunately that still doesn't work...

On Tue, 18 Jan 2005, Larry Isaacs wrote:

> If you are running Tomcat with a security manager, you will need to 
> make sure the catalina.policy file includes permission for your webapp 
> to connect to the server in question.  The examples found in the 
> comments at the end of the default catalina.policy file are examples 
> of such a permission.
>
> Cheers,
> Larry
>
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > Sent: Tuesday, January 18, 2005 11:54 AM
> > To: Tomcat Users List
> > Subject: RE: tomcat4 + postgresql jdbc
> >
> >
> > Thanks for the suggestion!
> >
> > I can successfully connect with a normal Java program.
> > In pg_hba.conf, I've got the line
> >
> > hostall all 127.0.0.1
> > 255.255.255.255   trust
> > hostall all 192.168.53.2
> > 255.255.255.0   trust
> >
> > so all IP connections from the local network (192.168.53.xx) should 
> > be accepted, even without a password...
> >
> > -Oege
> >
> > On Tue, 18 Jan 2005, Carlos Martins wrote:
> >
> > > Hi,
> > >
> > > Is it possible that the database connection credentials are
> > not right? Have you tried connecting to the database from the 
> > standard client with the same username and password?
> > >
> > > Regards
> > > Carlos
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > > Sent: terça-feira, 18 de Janeiro de 2005 16:27
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: tomcat4 + postgresql jdbc
> > >
> > > I'm attempting to install tomcat4 + postgresql jdbc under
> > Debian linux.
> > > I've put the jdbc jar at
> > /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar
> > >
> > > When I attempt to connect to a database via jsp, I get
> > > java.security.AccessControlException: access denied 
> > > (java.net.SocketPermission localhost resolve)
> > >
> > > I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT, with 
> > > the following contents:
> > >
> > > -
> > >
> > > <[EMAIL PROTECTED] import="java.sql.*"%>
> > > <%
> > >// Define the connection
> > >Connection con = null;
> > >// Check that the DB2Driver class is available
> > >Class.forName("org.postgresql.Driver");
> > >try {
> > >// Attempt to connect to the Database
> > >con = 
> > > DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
> > >out.println("The test is complete, your Database has been 
> > > contacted");
> > >}
> > >// Make sure to catch any exceptions
> > >catch (SQLException e) {
> > >  out.println(e.getMessage());
> > >}
> > > %>
> > > ---
> > >
> > > When I point my web browser at http://localhost:8180/test2.jsp, 
> > > the above exception occurs. The full stack trace is appended 
> > > below.
> > >
> > > I've attempted adding this line to the security policy file in 
> > > /etc/tomcat4/policy.d/99examples.policy:
> > >
> > > grant codeBase
> > "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
> > > {
> > > permission java.security.AllPermission;
> > > };
> > >
> > >
> > > Any help would be much appreciated!
> > >
> > > -Oege
> > >
> > >
> > > Something unusual has occured to cause the driver to fail.
> > Please report
> > > this exception: Exception:
> > java.security.AccessControlException: access
> > > denied (java.net.SocketPermission localhost resolve) Stack Trace:
> > > java.security.AccessControlException: access denied 
> > > (java.net.SocketPermission localhost resolve) at
> > >
> > java.security.AccessControlContext.checkPermission(AccessContr
> > olContext.java:269)
> > > at
> > >
> > java.security.AccessController.checkPermission(AccessControlle
> > r.java:401)
> > > at
> > java.lang.SecurityManager.checkPermission(SecurityManager.java:524) 
> > at
> > > java.lang.SecurityManager.checkConnect(SecurityManager.java:1023) 
> > > at
> > > java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
> > > java.net.InetAddress.getAllByName0(InetAddress.java:981) at
> > > java.net.InetAddress.getAllByName(InetAddress.java:975) at
> > > java.net.InetAddress.getByName(InetAddress.java:889) at
> > > java.net.InetSocketAddress.(InetSocketAddress.java:114) at
> > > java.net.Socket.(Socket.java:124) at
> > > org.postgresql.core.PGStream.(PGStream.java:47) at
> > >
> > org.postgresql.jdbc1.AbstractJdbc1Connecti

RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Larry Isaacs
Basically yes.  I forget whether "connect" implies "resolve",
but it is possible to use one permission regardless, i.e. 

  permission java.net.SocketPermission ":", "connect, resolve";

Just "connect" may be enough.  Also, what you specify for the
host name can vary depending on what is used by the code that
tries to connect.  Your error below suggests you will need
"localhost" as the host name.  It has been a while, so I don't
recall whether the IP address would satisfy the permission check.
A little trial-and-error should be able to determine what host
name is needed.  I believe you will need a permission for
each different host name used, if code happens to be
inconsistent.

You can also restrict the permission to just that webapp by
specifying the codeBase to be the full path to the base of
your webapp, i.e. something like:

   codeBase "file:/var/lib/tomcat4/webapps/myapp/-"

Larry

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> Sent: Tuesday, January 18, 2005 12:24 PM
> To: Tomcat Users List
> Subject: RE: tomcat4 + postgresql jdbc
> 
> 
> Do you mean I should add something like:
> 
> grant codeBase "file:/var/lib/tomcat4/webapps/-" {
>   permission java.net.SocketPermission "127.0.0.1:5432", 
> "connect";
>   permission java.net.SocketPermission "127.0.0.1:5432", 
> "resolve";
> };
> 
> Unfortunately that still doesn't work...
> 
> On Tue, 18 Jan 2005, Larry Isaacs wrote:
> 
> > If you are running Tomcat with a security manager, you will need
> > to make sure the catalina.policy file includes permission for
> > your webapp to connect to the server in question.  The examples
> > found in the comments at the end of the default catalina.policy
> > file are examples of such a permission.
> >
> > Cheers,
> > Larry
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > > Sent: Tuesday, January 18, 2005 11:54 AM
> > > To: Tomcat Users List
> > > Subject: RE: tomcat4 + postgresql jdbc
> > >
> > >
> > > Thanks for the suggestion!
> > >
> > > I can successfully connect with a normal Java program.
> > > In pg_hba.conf, I've got the line
> > >
> > > hostall all 127.0.0.1
> > > 255.255.255.255   trust
> > > hostall all 192.168.53.2
> > > 255.255.255.0   trust
> > >
> > > so all IP connections from the local network 
> (192.168.53.xx) should
> > > be accepted, even without a password...
> > >
> > > -Oege
> > >
> > > On Tue, 18 Jan 2005, Carlos Martins wrote:
> > >
> > > > Hi,
> > > >
> > > > Is it possible that the database connection credentials are
> > > not right? Have you tried connecting to the database from the
> > > standard client with the same username and password?
> > > >
> > > > Regards
> > > > Carlos
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > > > Sent: terça-feira, 18 de Janeiro de 2005 16:27
> > > > To: tomcat-user@jakarta.apache.org
> > > > Subject: tomcat4 + postgresql jdbc
> > > >
> > > > I'm attempting to install tomcat4 + postgresql jdbc under
> > > Debian linux.
> > > > I've put the jdbc jar at
> > > /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar
> > > >
> > > > When I attempt to connect to a database via jsp, I get
> > > > java.security.AccessControlException: access denied
> > > > (java.net.SocketPermission localhost resolve)
> > > >
> > > > I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT,
> > > > with the following contents:
> > > >
> > > > -
> > > >
> > > > <[EMAIL PROTECTED] import="java.sql.*"%>
> > > > <%
> > > >// Define the connection
> > > >Connection con = null;
> > > >// Check that the DB2Driver class is available
> > > >Class.forName("org.postgresql.Driver");
> > > >try {
> > > >// Attempt to connect to the Database
> > > >con =
> > > > 
> DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
> > > >out.println("The test is complete, your Database has been
> > > > contacted");
> > > >}
> > > >// Make sure to catch any exceptions
> > > >catch (SQLException e) {
> > > >  out.println(e.getMessage());
> > > >}
> > > > %>
> > > > ---
> > > >
> > > > When I point my web browser at http://localhost:8180/test2.jsp,
> > > > the above exception occurs. The full stack trace is 
> appended below.
> > > >
> > > > I've attempted adding this line to the security policy file
> > > > in /etc/tomcat4/policy.d/99examples.policy:
> > > >
> > > > grant codeBase
> > > "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
> > > > {
> > > > permission java.security.AllPermission;
> > > > };
> > > >
> > > >
> > > > Any help would be much appreciated!
> > > >
> > > > -Oege
> > > >
> > > >
> > > > Something unusual has occured to cause the driver to fail.
> > > Please rep

RE: tomcat4 + postgresql jdbc

2005-01-18 Thread Oege de Moor

I should have said it works without the security manager.

On Tue, 18 Jan 2005, Phillip Qin wrote:

> Test without security manager so that we can isolate the problem.
>
> -Original Message-
> From: Oege de Moor [mailto:[EMAIL PROTECTED]
> Sent: January 18, 2005 12:24 PM
> To: Tomcat Users List
> Subject: RE: tomcat4 + postgresql jdbc
>
>
>
> Do you mean I should add something like:
>
> grant codeBase "file:/var/lib/tomcat4/webapps/-" {
>   permission java.net.SocketPermission "127.0.0.1:5432", "connect";
>   permission java.net.SocketPermission "127.0.0.1:5432", "resolve"; };
>
> Unfortunately that still doesn't work...
>
> On Tue, 18 Jan 2005, Larry Isaacs wrote:
>
> > If you are running Tomcat with a security manager, you will need to
> > make sure the catalina.policy file includes permission for your webapp
> > to connect to the server in question.  The examples found in the
> > comments at the end of the default catalina.policy file are examples
> > of such a permission.
> >
> > Cheers,
> > Larry
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > > Sent: Tuesday, January 18, 2005 11:54 AM
> > > To: Tomcat Users List
> > > Subject: RE: tomcat4 + postgresql jdbc
> > >
> > >
> > > Thanks for the suggestion!
> > >
> > > I can successfully connect with a normal Java program.
> > > In pg_hba.conf, I've got the line
> > >
> > > hostall all 127.0.0.1
> > > 255.255.255.255   trust
> > > hostall all 192.168.53.2
> > > 255.255.255.0   trust
> > >
> > > so all IP connections from the local network (192.168.53.xx) should
> > > be accepted, even without a password...
> > >
> > > -Oege
> > >
> > > On Tue, 18 Jan 2005, Carlos Martins wrote:
> > >
> > > > Hi,
> > > >
> > > > Is it possible that the database connection credentials are
> > > not right? Have you tried connecting to the database from the
> > > standard client with the same username and password?
> > > >
> > > > Regards
> > > > Carlos
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Oege de Moor
> > > > Sent: terça-feira, 18 de Janeiro de 2005 16:27
> > > > To: tomcat-user@jakarta.apache.org
> > > > Subject: tomcat4 + postgresql jdbc
> > > >
> > > > I'm attempting to install tomcat4 + postgresql jdbc under
> > > Debian linux.
> > > > I've put the jdbc jar at
> > > /usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar
> > > >
> > > > When I attempt to connect to a database via jsp, I get
> > > > java.security.AccessControlException: access denied
> > > > (java.net.SocketPermission localhost resolve)
> > > >
> > > > I've put a file "test2.jsp" at /var/lib/tomcat4/webapps/ROOT, with
> > > > the following contents:
> > > >
> > > > -
> > > >
> > > > <[EMAIL PROTECTED] import="java.sql.*"%>
> > > > <%
> > > >// Define the connection
> > > >Connection con = null;
> > > >// Check that the DB2Driver class is available
> > > >Class.forName("org.postgresql.Driver");
> > > >try {
> > > >// Attempt to connect to the Database
> > > >con =
> > > > DriverManager.getConnection("jdbc:postgresql:demodb","oege","xxx");
> > > >out.println("The test is complete, your Database has been
> > > > contacted");
> > > >}
> > > >// Make sure to catch any exceptions
> > > >catch (SQLException e) {
> > > >  out.println(e.getMessage());
> > > >}
> > > > %>
> > > > ---
> > > >
> > > > When I point my web browser at http://localhost:8180/test2.jsp,
> > > > the above exception occurs. The full stack trace is appended
> > > > below.
> > > >
> > > > I've attempted adding this line to the security policy file in
> > > > /etc/tomcat4/policy.d/99examples.policy:
> > > >
> > > > grant codeBase
> > > "file:/usr/share/tomcat4/common/lib/pg74.215.jdbc3.jar!/-"
> > > > {
> > > > permission java.security.AllPermission;
> > > > };
> > > >
> > > >
> > > > Any help would be much appreciated!
> > > >
> > > > -Oege
> > > >
> > > >
> > > > Something unusual has occured to cause the driver to fail.
> > > Please report
> > > > this exception: Exception:
> > > java.security.AccessControlException: access
> > > > denied (java.net.SocketPermission localhost resolve) Stack Trace:
> > > > java.security.AccessControlException: access denied
> > > > (java.net.SocketPermission localhost resolve) at
> > > >
> > > java.security.AccessControlContext.checkPermission(AccessContr
> > > olContext.java:269)
> > > > at
> > > >
> > > java.security.AccessController.checkPermission(AccessControlle
> > > r.java:401)
> > > > at
> > > java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
> > > at
> > > > java.lang.SecurityManager.checkConnect(SecurityManager.java:1023)
> > > > at
> > > > java.net.InetAddress.getAllByName0(InetAddress.java:1000) at
> > > > java.net.InetAddress.getAllByName0(InetAd

Re: precompile question

2005-01-18 Thread Tim Funk
No, there are no way to exclude files. If you have a file which has an 
extension of jsp, then consider it to be a jsp. If its not a jsp - it should 
be a different file extension. (For example .jspf for a jsp fragment - files 
with an extention of .jspf are excluded)

-Tim
Matt Bathje wrote:
Hi All -
When pre-compiling using an ant task, is there a way to exclude certain 
files from being precompiled? I tried using an  tag on the 
jasper2 task, but it tells me that it does not support that. It looks 
like the deprecated jspc task that used to come with apache support 
include/exclude filters...

If I put the exclude on the javac part of the precompile, then the file 
does not get compiled, but it is still included in the generated web.xml 
file, and makes it so tomcat throws an error, so that doesn't help.

If there is a way to implicitly include all the files that need 
compiling, I would be willing to settle for that as well.

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


JK2 connector proper setup/update procedure?

2005-01-18 Thread Woodchuck
hihi all,

what is the proper procedure to update the JK connector when adding a
new application to Tomcat that also needs redirecting from IIS?

i am using the setupJK202.exe installation program.

i shutdown my Tomcat service.  then shutdown the WWW service.  then i
go to the IIS Manager and delete the "jakarta" virtual directory.  then
i also go into the Default Web Server's isapi tab and remove all the
jakarta entries in the list.

then when everything is stopped, i run the setupJK202.exe program
again.

however, after doing this, each time i get an additional jakarta entry
in the isapi tab (ie. the jakarta entry that has the green arrow lit up
if it is ok)... so far, i've tried it five times and now i have 5 green
arrows in that list.

i must be doing something wrong.  does anyone know the proper
procedure?

do i need to erase all the corresponding registration keys?  do i need
to delete the workers2.properties and jk2.properties files?

thanks in advance,
woodchuck 



__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



how many connections can tomcat handle?

2005-01-18 Thread Stephen Charles Huey
We're running Tomcat 4.1.27 on a pretty up-to-date Red Hat 8.  I'm
wondering what usually determines the number of connections Tomcat can
handle.  Would it typically be Tomcat breaking first, or just the server
itself trying to deal with so many connections?  Would it have to do
with memory, or processing power, or some other physical limitation?  

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



Re: how many connections can tomcat handle?

2005-01-18 Thread Parsons Technical Services
We're running Tomcat 4.1.27 on a pretty up-to-date Red Hat 8.  I'm
wondering what usually determines the number of connections Tomcat can
handle.  Would it typically be Tomcat breaking first, or just the server
itself trying to deal with so many connections?  Would it have to do
with memory, or processing power, or some other physical limitation?
All the above and then some. Others here can give better detail than I on 
some of these points but each of these as well as the apps running in Tomcat 
have a contribution on the performance of the system. There are some 
settings that will limit the number of concurrent connections even if all 
other factors will support more:
Max threads
Max file handles
Max connections
Available ports

With the other factors it is a sliding scale and each one affects the other. 
So if the app is larger and uses lots of memory then the amount of memory 
will affect the max count. More processor will handle more before the system 
comes to a halt but if the app is simpler (less processor intensive) more 
connections can be handled prior to system meltdown.

One outside consideration is bandwidth. Depending on what is being served 
out, or in for that matter, this can be a limitation as well. Just think of 
a Quad Xeon 3 Gig w/12 Gig ram on a 56k connection. Yes, ridiculous, but I 
am sure it has happened somewhere. Sometimes the simplest things bite you.

Profiling and load testing, I think will be the magic words for the final 
answer to how many connections.

Doug 


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


Re: precompile question

2005-01-18 Thread Matt Bathje
Thanks for the info. I'll just have ant move the files to a temporary 
extension before the jasper2 task, then back to .jsp when it is done.

Thanks,
Matt
Tim Funk wrote:
No, there are no way to exclude files. If you have a file which has an 
extension of jsp, then consider it to be a jsp. If its not a jsp - it 
should be a different file extension. (For example .jspf for a jsp 
fragment - files with an extention of .jspf are excluded)

-Tim
Matt Bathje wrote:
Hi All -
When pre-compiling using an ant task, is there a way to exclude 
certain files from being precompiled? I tried using an  tag 
on the jasper2 task, but it tells me that it does not support that. It 
looks like the deprecated jspc task that used to come with apache 
support include/exclude filters...

If I put the exclude on the javac part of the precompile, then the 
file does not get compiled, but it is still included in the generated 
web.xml file, and makes it so tomcat throws an error, so that doesn't 
help.

If there is a way to implicitly include all the files that need 
compiling, I would be willing to settle for that as well.

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

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


Commons logging woes in Tomcat 5.x

2005-01-18 Thread nick . minutello


Unless I am missing something, it seems to me that commons-logging-api.jar
is loaded by the JVM AppClassLoader (ie the root classloader)

There are two implications of this:
The first is that tomcat itsself will only ever delegate to JDK1.4 logging
as the commons-logging-api.jar has no log4j delegation classes
The second, more serious, seems be that any web application (and libraries
thereof) using commons logging will use the same commmons logging
configuration as tomcat - and will also only delegate to JDK1.4 logging

:-(

Is there a way around this that I am missing?
Have I correctly understood the behaviour?


Cheers,
Nick




This message and any attachments (the "message") is 
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet 
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

**

BNP Paribas Private Bank London Branch is authorised 
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.

BNP Paribas Securities Services London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the 
United Kingdom.
  
BNP Paribas Fund Services UK Limited is authorised and 
regulated by the Financial Services Authority.


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



having only one application running using Tomcat 5.x

2005-01-18 Thread Pirabu Pathmasenan
hey, 
 
I just wanted to know .. when we set clientauth = "true' .. it will make
sure for each application using Tomcat 5.x .. if the person requesting the
appliation is really who he/she is.  But, with this in mind, and when
clientauth ="true" .. i just want to have one particular application to work
with this feature .. and when accessing other application using Tomcat ... i
don't want the feature of clientauth='true" to work .. i would want it to
fail ... 
 
So is there a setting in Tomcat .. where we can set the url .. so that only
for one of application the behaviour of .. clientauth="true" .. would work
.. 
 
cheers 


FW: having only one application running using Tomcat 5.x

2005-01-18 Thread Pirabu Pathmasenan

hey, 
 
I just wanted to know .. when we set clientauth = "true' .. it will make
sure for each application using Tomcat 5.x .. if the person requesting the
appliation is really who he/she is.  But, with this in mind, and when
clientauth ="true" .. i just want to have one particular application to work
with this feature .. and when accessing other application using Tomcat ... i
don't want the feature of clientauth='true" to work .. i would want it to
fail ... 
 
So is there a setting in Tomcat .. where we can set the url .. so that only
for one of application the behaviour of .. clientauth="true" .. would work
.. 
 
cheers 


Re: Commons logging woes in Tomcat 5.x

2005-01-18 Thread nick . minutello


To answer the 2nd part of my own question:
There seems to be some classloading trickery (ie special treatment for
commons logging Log class) if a log4j jar (or a commons-logging.properties)
is found in the web app classpath  (WEB-INF\lib/classes)

But part 1 still stands...


-Nick






Extranet
Nick MINUTELLO/UK/EUROPE/[EMAIL PROTECTED] - 18/01/2005 19:55


Please respond to tomcat-user@jakarta.apache.org



To:tomcat-user

cc:


Subject:Commons logging woes in Tomcat 5.x




Unless I am missing something, it seems to me that commons-logging-api.jar
is loaded by the JVM AppClassLoader (ie the root classloader)

There are two implications of this:
The first is that tomcat itsself will only ever delegate to JDK1.4 logging
as the commons-logging-api.jar has no log4j delegation classes
The second, more serious, seems be that any web application (and libraries
thereof) using commons logging will use the same commmons logging
configuration as tomcat - and will also only delegate to JDK1.4 logging

:-(

Is there a way around this that I am missing?
Have I correctly understood the behaviour?


Cheers,
Nick




This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.

**


BNP Paribas Private Bank London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.

BNP Paribas Securities Services London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.

BNP Paribas Fund Services UK Limited is authorised and
regulated by the Financial Services Authority.


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



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



Re: Problem with including JspC generated web.xml fragment (solved)

2005-01-18 Thread Andreas Schildbach
You have still to specify the webXmlFragment-attribute. Without this
i'm getting a NullpointerException too.
Thanks to the help of both of you, I finally managed to get it to work. 
You'll find my complete Ant target at the bottom of this post.

From the perspective of a user I'd like to provide the following feedback:
- of course, a documentation would be helpful (-:
- the webXmlFragment option shouldn't be mandatory if 
addWebXmlMappings="true" is specified
- compile="true" does not work at my place, or is at least terribly 
slow. It consumes 100% CPU and seems to take forever...
- it would be great if there was one magic option, let's call it 
transformInPlace="true", which would do all of the following:
   * set addWebXmlMappings to true
   * initialize the outputDir to ${uriroot}/WEB-INF/classes
   * transform all JSPs and delete the original files
   * compile all the generated classes and delete the sources
This way, a complete transformation from non-precompiled to precompiled 
would be possible.
- it would be great if the transformed webapp would have no dependancies 
to Jasper (Tomcat)

And here is my Ant target (the webapp to transform needs to be in dist, 
and you maybe have to adapt the location of your jasper jars):


	
		
			
			
		
	








Unfortunately the includeemptydirs option in the delete statement does 
not work as I would expect: There is still empty directories after 
transformation if you had only JSPs in them.

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


Security Policy while running as a windows service

2005-01-18 Thread Asim Alp
Hello everyone,

I'm running my Tomcat 5.5.4 as a Windows Service.  Is there a way to
put the -security option to the GUI application?  I'm trying to get my
service to start with the catalina.policy file for extra security.

Thanks,

Asim

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



undeploy/deploy problem

2005-01-18 Thread Andy Kriger
I am running Tomcat 5.5.x on Solaris 9.x with Java 1.4.x

I use an Ant script to deploy my WAR file to Tomcat - it builds a WAR,
undeploys the existing webapp, and deploys the WAR. Usually this works
fine. However, often enough to big a major annoyance, it doesn't work
- the webapp undeploys (according to the Ant output) but the WAR
cannot deploy because the directories have not been deleted.
Sometimes, I can fix this by manually deleteing the webapps/webapp,
conf/Catalina/localhost/webapp.xml and work/Catalina/localhost/webapp
directories, sometimes I cannot (if I refresh the manager list,
sometimes the webapp disappears, sometimes not). When that doesn't
work, I have to restart Tomcat.

Does anyone have any ideas what might be going on here and how I might
track down the problem?

thx
andy

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



RE: undeploy/deploy problem

2005-01-18 Thread Phillip Qin
Which ant task do you use to deploy/undeploy wars? What is the url in task?



-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED] 
Sent: January 18, 2005 5:01 PM
To: tomcat-user@jakarta.apache.org
Subject: undeploy/deploy problem


I am running Tomcat 5.5.x on Solaris 9.x with Java 1.4.x

I use an Ant script to deploy my WAR file to Tomcat - it builds a WAR,
undeploys the existing webapp, and deploys the WAR. Usually this works fine.
However, often enough to big a major annoyance, it doesn't work
- the webapp undeploys (according to the Ant output) but the WAR cannot
deploy because the directories have not been deleted. Sometimes, I can fix
this by manually deleteing the webapps/webapp,
conf/Catalina/localhost/webapp.xml and work/Catalina/localhost/webapp
directories, sometimes I cannot (if I refresh the manager list, sometimes
the webapp disappears, sometimes not). When that doesn't work, I have to
restart Tomcat.

Does anyone have any ideas what might be going on here and how I might track
down the problem?

thx
andy

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


!DSPAM:41ed871b131671657397070!


Handling Exceptions thrown from a Filter

2005-01-18 Thread Wendy Smoak
If a ServletException is thrown from a Filter, is there a way to show a
"nice" error page?

I have put this in web.xml:

   
  javax.servlet.ServletException
  /WEB-INF/jsp/exceptionServlet.jsp
   

which I thought was the way to do it (I've also tried JSP's directly in the
root of the webapp in case the WEB-INF part was causing trouble) but I still
get an HTTP Status 500 and stack trace when a ServletException is thrown.

What am I doing wrong?

Thanks,
Wendy Smoak


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



Re: Commons logging woes in Tomcat 5.x

2005-01-18 Thread Jacob Kjome
Quoting [EMAIL PROTECTED]:

>
>
> To answer the 2nd part of my own question:
> There seems to be some classloading trickery (ie special treatment for
> commons logging Log class) if a log4j jar (or a commons-logging.properties)
> is found in the web app classpath  (WEB-INF\lib/classes)
>

It's not really "trickery".  It is child-first classloading behavior defined by
the servlet spec.  However, counting on this across platforms is not wise,
since other appservers either don't implement child-first behavior or implement
it, but specify normal Java2 parent-first behavior as the default.


Jake

> But part 1 still stands...
>
>
> -Nick
>
>
>
>
>
>
> Extranet
> Nick MINUTELLO/UK/EUROPE/[EMAIL PROTECTED] - 18/01/2005 19:55
>
>
> Please respond to tomcat-user@jakarta.apache.org
>
>
>
> To:tomcat-user
>
> cc:
>
>
> Subject:Commons logging woes in Tomcat 5.x
>
>
>
>
> Unless I am missing something, it seems to me that commons-logging-api.jar
> is loaded by the JVM AppClassLoader (ie the root classloader)
>
> There are two implications of this:
> The first is that tomcat itsself will only ever delegate to JDK1.4 logging
> as the commons-logging-api.jar has no log4j delegation classes
> The second, more serious, seems be that any web application (and libraries
> thereof) using commons logging will use the same commmons logging
> configuration as tomcat - and will also only delegate to JDK1.4 logging
>
> :-(
>
> Is there a way around this that I am missing?
> Have I correctly understood the behaviour?
>
>
> Cheers,
> Nick
>
>
>
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential.
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified.
>
>
**
>
>
> BNP Paribas Private Bank London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in the
> United Kingdom.
>
> BNP Paribas Securities Services London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in the
> United Kingdom.
>
> BNP Paribas Fund Services UK Limited is authorised and
> regulated by the Financial Services Authority.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




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



Re: Handling Exceptions thrown from a Filter

2005-01-18 Thread Larry Meadors
is this before or after the call to the filter chain?


On Tue, 18 Jan 2005 15:51:01 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> If a ServletException is thrown from a Filter, is there a way to show a
> "nice" error page?
> 
> I have put this in web.xml:
> 
>
>   javax.servlet.ServletException
>   /WEB-INF/jsp/exceptionServlet.jsp
>
> 
> which I thought was the way to do it (I've also tried JSP's directly in the
> root of the webapp in case the WEB-INF part was causing trouble) but I still
> get an HTTP Status 500 and stack trace when a ServletException is thrown.
> 
> What am I doing wrong?
> 
> Thanks,
> Wendy Smoak
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: having only one application running using Tomcat 5.x

2005-01-18 Thread Tim Funk
No. Clientauth is a property of the connector and everything that uses that 
connector.

-Tim
Pirabu Pathmasenan wrote:
hey, 
 
I just wanted to know .. when we set clientauth = "true' .. it will make
sure for each application using Tomcat 5.x .. if the person requesting the
appliation is really who he/she is.  But, with this in mind, and when
clientauth ="true" .. i just want to have one particular application to work
with this feature .. and when accessing other application using Tomcat ... i
don't want the feature of clientauth='true" to work .. i would want it to
fail ... 
 
So is there a setting in Tomcat .. where we can set the url .. so that only
for one of application the behaviour of .. clientauth="true" .. would work
.. 
 
cheers 

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


Re: having only one application running using Tomcat 5.x

2005-01-18 Thread Tim Funk
That being said(per my last no).
You can have 2 ajp connections. One on port 8009 with client=true and port 
8008 with clientauth=false. Then makes sure your apache config knows about 
the different workers.

-Tim
Pirabu Pathmasenan wrote:
hey, 
 
I just wanted to know .. when we set clientauth = "true' .. it will make
sure for each application using Tomcat 5.x .. if the person requesting the
appliation is really who he/she is.  But, with this in mind, and when
clientauth ="true" .. i just want to have one particular application to work
with this feature .. and when accessing other application using Tomcat ... i
don't want the feature of clientauth='true" to work .. i would want it to
fail ... 
 
So is there a setting in Tomcat .. where we can set the url .. so that only
for one of application the behaviour of .. clientauth="true" .. would work
.. 
 
cheers 

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


Re: Handling Exceptions thrown from a Filter

2005-01-18 Thread Wendy Smoak
From: "Larry Meadors" <[EMAIL PROTECTED]>

> On Tue, 18 Jan 2005 15:51:01 -0700, Wendy Smoak <[EMAIL PROTECTED]>
wrote:
> > If a ServletException is thrown from a Filter, is there a way to show a
> > "nice" error page?

> is this before or after the call to the filter chain?

The exception is thrown before I call

chain.doFilter( request, response );

Thanks,
-- 
Wendy Smoak


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



Tomcat Startup/Shutdown and mod_jk Issues

2005-01-18 Thread David Rickard
System: SunOS 5.9 Generic_117171-13 sun4u sparc SUNW,Sun-Fire-V440
Apache: 2.0.52
Tomcat: 5.5.4
Connector: jk-1.2.6
Java: JDK 1.5.0.01
We're attempting an upgrade from Tomcat 4.1.31 to 5.5.4; we are using JK 1 
as a connector to Apache (due to prior experience and relative simplicity);
We are encountering three issues:
1) During start-up, Tomcat throws the following error messages:

java.lang.NoSuchMethodError: 
org.apache.naming.NamingContextEnumeration.(Ljava/util/Iterator;)V [ 
for each application it attempts to deploy]

SEVERE: Catalina.start:
LifecycleException:  Protocol handler start failed: java.net.BindException: 
Address already in use:8080
[presumably from Tomcat not releasing 8080 properly during previous 
start-up/shut-down cycles]

2) During shut-down, Tomcat throws the following error:
SEVERE: Protocol handler pause failed
java.lang.NullPointerException
at org.apache.jk.server.JkMain.pause(JkMain.java:655)
3) The mod_jk.conf file does not build; its entire contents are:
## Auto generated on Tue Jan 18 16:24:18 PST 2005##

  LoadModule jk_module 
"/usr/apache/modules/jakarta-tomcat-connectors-jk-1.2.6-solaris8-sparc-apache-2.0.43_
native.so"


JkWorkersFile "/var/apache/tomcat/conf/jk/workers.properties"
JkLogFile "/var/apache/tomcat/logs/mod_jk.log"
JkLogLevel emerg


ServerName spinach.techbooks.com

[presumably this is from applications not loading during start-up; but 
could it be from some other cause?]

--
David Rickard
Software Engineer
TechBooks/GTS
Your Single Source Solution!
Los Angeles CA * York, PA * Boston,MA * New Delhi, India
Visit us on the World Wide Web 
http://www.techbooks.com

[EMAIL PROTECTED]
5650 Jillson St., Los Angeles, CA 90040
(323) 888-8889 x331
(323) 888-1849 (Fax)


[Fwd: Re: Test]

2005-01-18 Thread Alan Deikman
I wouldn't go that far.  I posted a question twice since joining but 
haven't seen anything yet.  Maybe the list server was eating stuff?

Regards,
Alan Deikman
ZNYX Networks
20 hours and counting.
This is spooky.
No wait, I understand now, we the open source community have solve all the 
problems. Well Tomcat issues at least.

Take that M$!
Doug

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


Re: Re: Test]

2005-01-18 Thread Parsons Technical Services
Actually they came through, at least I got them.
Doug
- Original Message - 
From: "Alan Deikman" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, January 18, 2005 7:31 PM
Subject: [Fwd: Re: Test]


I wouldn't go that far.  I posted a question twice since joining but 
haven't seen anything yet.  Maybe the list server was eating stuff?

Regards,
Alan Deikman
ZNYX Networks
20 hours and counting.
This is spooky.
No wait, I understand now, we the open source community have solve all the 
problems. Well Tomcat issues at least.

Take that M$!
Doug

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


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


Re: Question about JNDI resources

2005-01-18 Thread Parsons Technical Services
Since no one else has taken a crack at this
As for the examples, a lot of apps do not hold any static content. At least 
simple example types. Then there is the issue of jsp's with no static class.

It sounds plausible to hold onto the DataSource once you had it. If you did, 
I don't think you would need to hold onto anything else. Sounds like a good 
experiment. I think the ultimate answer would be it depends, as this 
Interface could be implemented differently by different vendors. Then what 
is the overhead of holding that ref in comparison to doing the lookup. Sound 
like profiler time. And then there is an issue of synchronization?

Doug
- Original Message - 
From: "Alan Deikman" <[EMAIL PROTECTED]>
To: 
Sent: Monday, January 17, 2005 1:42 PM
Subject: Question about JNDI resources


I'm just learning this stuff, but having good success so far.  In my
SQL-backed bean I use a JDBCResource as per the documentation:
protected static Connection getConnection() {
   //System.out.println("User.getConnection Attempting to get
connection");
   try {
   Context initContext = new InitialContext();
   Context envContext  =
(Context)initContext.lookup("java:/comp/env");
   DataSource ds = (DataSource) envContext.lookup("jdbc/");
   Connection conn = ds.getConnection();
   return conn;
   } catch (NamingException ne) {
   System.out.println("User.getConnection caught Naming
exception");
   System.out.println(ne.toString());
   } catch (SQLException sqle) {
   System.out.println("User.getConnection caught SQL exception");
   System.out.println(sqle.toString());
   }
This works, way cool.  My question is do I need to look up two new
Context objects and a new DataSource each time I get a connection?  Or
can I just store initContext, envContext, and ds in static variables and
load them just once for all instances of the class?
If that works, why don't the examples do it that way?
Alan Deikman
ZNYX Networks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Tomcat classloader problem with different ant versions

2005-01-18 Thread Jagadeesh Sunkara
Hello,
I am getting the following error when I deploy and run my application under
tomcat 5.0.28. The problem is that tomcat is using the ant.jar from
/common/lib directory. But I want to use the one from my web
application's WEB-INF/lib. How can I make tomcat use the ant 1.6.2 from my
application's web-inf/lib instead of ant 1.6.1 from tomcat/common/lib?
 
Replacing the ant.jar in /common/lib is not an option here as the
tomcat installation/environment is not controlled by us. 
 
Appreciate if someone can tell me how to make tomcat use my own version of
jar. 
 
Thanks,
Jagadeesh
 
Invalid implementation version between Ant core and Ant optional tasks.

 core: 1.6.1

 optional: 1.6.2

Invalid implementation version between Ant core and Ant optional tasks.

 core: 1.6.1

 optional: 1.6.2

  at
org.apache.tools.ant.Diagnostics.validateVersion(Diagnostics.java:76)

  at com.crm.utils.AntRunner.startAnt(Unknown Source)

  at com.crm.utils.AntRunner.startAnt(Unknown Source)

  at
com.ssa.crm.actions.CodeGenAction.handleRequest(CodeGenAction.java:189)



Re: Commons logging woes in Tomcat 5.x

2005-01-18 Thread nick . minutello


Hmm, is that all?
I understand the parent-first/last classloading strategies that different
appservers have...

However, the behaviour I observe is that depending on whether I have
*log4j* in the web-inf/lib (or commons-logging.properties in classes) then
the commons-logging Log instance I get will have been loaded by completely
different classloaders (root vs webapp).

No configuration of commons logging - the Log class's classloader is the
JVM AppClassLoader
If I configure commons-logging successfully to use log4j, then the Log
class's classloader is the webapp classloader...

Maybe there is some trickery going on in the commons-logging
LogFactory.

-Nick




Extranet
[EMAIL PROTECTED] - 18/01/2005 22:54


Please respond to tomcat-user@jakarta.apache.org



To:tomcat-user

cc:


Subject:Re: Commons logging woes in Tomcat 5.x


Quoting [EMAIL PROTECTED]:

>
>
> To answer the 2nd part of my own question:
> There seems to be some classloading trickery (ie special treatment for
> commons logging Log class) if a log4j jar (or a
commons-logging.properties)
> is found in the web app classpath  (WEB-INF\lib/classes)
>

It's not really "trickery".  It is child-first classloading behavior
defined by
the servlet spec.  However, counting on this across platforms is not wise,
since other appservers either don't implement child-first behavior or
implement
it, but specify normal Java2 parent-first behavior as the default.


Jake

> But part 1 still stands...
>
>
> -Nick
>
>
>
>
>
>
> Extranet
> Nick MINUTELLO/UK/EUROPE/[EMAIL PROTECTED] - 18/01/2005 19:55
>
>
> Please respond to tomcat-user@jakarta.apache.org
>
>
>
> To:tomcat-user
>
> cc:
>
>
> Subject:Commons logging woes in Tomcat 5.x
>
>
>
>
> Unless I am missing something, it seems to me that
commons-logging-api.jar
> is loaded by the JVM AppClassLoader (ie the root classloader)
>
> There are two implications of this:
> The first is that tomcat itsself will only ever delegate to JDK1.4
logging
> as the commons-logging-api.jar has no log4j delegation classes
> The second, more serious, seems be that any web application (and
libraries
> thereof) using commons logging will use the same commmons logging
> configuration as tomcat - and will also only delegate to JDK1.4
logging
>
> :-(
>
> Is there a way around this that I am missing?
> Have I correctly understood the behaviour?
>
>
> Cheers,
> Nick
>
>
>
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential.
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified.
>
>
**

>
>
> BNP Paribas Private Bank London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in the
> United Kingdom.
>
> BNP Paribas Securities Services London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in the
> United Kingdom.
>
> BNP Paribas Fund Services UK Limited is authorised and
> regulated by the Financial Services Authority.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




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



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



JndiRelm/tomcat admin tool/ user, role listing

2005-01-18 Thread Rakesh Tripathi
Hi ,
I have a question related to Tomcat admin tool . Is it possible to list 
the users and roles from the tomcat admin tool , if tomcat is using
JndiRelm for authentication.
I'm using tomcat 5.0.28 and i recently migrated from memoryRelm to 
JndiRelm . Admin tool works great with memoryRelm. Using JndiRelm
I can login as admin , but when  I try to browse the users. I get the 
following message  in the browser
*type* Status report

*message* _Error retrieving attribute users_
*description* _The server encountered an internal error (Error 
retrieving attribute users) that prevented it from fulfilling this request.
_

And in the admin log i get following  exception :
2005-01-18 12:57:48 StandardContext[/admin]action: Error retrieving 
attribute users
javax.management.InstanceNotFoundException: MBeanServer cannot find 
MBean with ObjectName Users:type=UserDatabase,database=UserDatabase
   at 
mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:528)
   at 
mx4j.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:1235)
   at 
org.apache.webapp.admin.users.UserUtils.getUsersForm(UserUtils.java:112)
   at 
org.apache.webapp.admin.users.ListUsersAction.perform(ListUsersAction.java:113)
   at org.apache.struts.action.Action.execute(Action.java:420)
   at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 

   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
   at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   at java.lang.Thread.run(Thread.java:534)

I have added following lines to my server.xml
 ldap://mango:389";
contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
userBase="dc=users, dc=drrs, dc=mydomain,dc=org"
userSearch="(mail={0})"
roleBase="dc=roles, dc=drrs, dc=mydomain,dc=org"
roleName="cn"
roleSearch="(uniqueMember={0})"/>
Thanks
Rakesh
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Want to know better way of deploying

2005-01-18 Thread Eric VERGNAUD
Yes I also encounter this problem with Tomcat 5.0.28 on a Wintel box.
However it did not occur with 5.0.18. Neither does it occur on MacOS.

Looks like something was broken recently, because it's working with 5.0.18
on another Wintel box which I have not upgraded.

I believe Tomcat is unable to delete the war file for some reason, so the
file remains locked.

Maybe this is a global problem on Wintel boxes because I also noticed that
in my servlet, deleting a file that I just created to temporarily save an
upload, also fails randomly.

Could this be related to permissions ?

>> I am using ant to create war file. Then i undeploy previous version and
>> try
>> to deploy new version. But when i try to do this it says
>> 
>> 
>> FAIL - War file "strutstest.war" already exists on server
>> 
>> 
>> Inside /webapp - previous uploaded war file is still present. I can
>> not
>> delete just like that as it says sharing violation.
>> 
>> So i need to stop Tomcat, delete /webapp/{my prev war file}. Then
>> start
>> the Tomcat again and deploy the new file.
>> 
>> Is there any other soln ? so that w/o restarting my tomcat can i just
>> deploy new version ?
>> 
>> regards
>> 

---
Eric VERGNAUD - JLynx Software
Cutting-edge technologies and
services for software companies
web: http://www.jlynx.com
---



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



Re: Tomcat Startup/Shutdown and mod_jk Issues

2005-01-18 Thread Mohd. Jeffry
It seems like something is hogging the port 8080. Did you check wether
there is something listening on port 8080 before you start your new
tomcat?


On Tue, 18 Jan 2005 16:22:12 -0800, David Rickard
<[EMAIL PROTECTED]> wrote:
> System: SunOS 5.9 Generic_117171-13 sun4u sparc SUNW,Sun-Fire-V440
> Apache: 2.0.52
> Tomcat: 5.5.4
> Connector: jk-1.2.6
> Java: JDK 1.5.0.01
> 
> We're attempting an upgrade from Tomcat 4.1.31 to 5.5.4; we are using JK 1
> as a connector to Apache (due to prior experience and relative simplicity);
> We are encountering three issues:
> 1) During start-up, Tomcat throws the following error messages:
> 
> java.lang.NoSuchMethodError:
> org.apache.naming.NamingContextEnumeration.(Ljava/util/Iterator;)V [
> for each application it attempts to deploy]
> 
> SEVERE: Catalina.start:
> LifecycleException:  Protocol handler start failed: java.net.BindException:
> Address already in use:8080
> [presumably from Tomcat not releasing 8080 properly during previous
> start-up/shut-down cycles]
> 
> 2) During shut-down, Tomcat throws the following error:
> SEVERE: Protocol handler pause failed
> java.lang.NullPointerException
>  at org.apache.jk.server.JkMain.pause(JkMain.java:655)
> 
> 3) The mod_jk.conf file does not build; its entire contents are:
> ## Auto generated on Tue Jan 18 16:24:18 PST 2005##
> 
> 
>LoadModule jk_module
> "/usr/apache/modules/jakarta-tomcat-connectors-jk-1.2.6-solaris8-sparc-apache-2.0.43_
> native.so"
> 
> 
> JkWorkersFile "/var/apache/tomcat/conf/jk/workers.properties"
> JkLogFile "/var/apache/tomcat/logs/mod_jk.log"
> 
> JkLogLevel emerg
> 
> 
>  ServerName spinach.techbooks.com
> 
> 
> [presumably this is from applications not loading during start-up; but
> could it be from some other cause?]
> 
> --
> 
> David Rickard
> Software Engineer
> 
> TechBooks/GTS
> Your Single Source Solution!
> Los Angeles CA * York, PA * Boston,MA * New Delhi, India
> Visit us on the World Wide Web
> http://www.techbooks.com
> 
> [EMAIL PROTECTED]
> 5650 Jillson St., Los Angeles, CA 90040
> (323) 888-8889 x331
> (323) 888-1849 (Fax)
> 
>

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



Re: [Fwd: Re: Test]

2005-01-18 Thread Dakota Jack
I don't know what you guys are talking about.  I have been getting messages.

Jack


On Tue, 18 Jan 2005 16:31:39 -0800, Alan Deikman <[EMAIL PROTECTED]> wrote:
> I wouldn't go that far.  I posted a question twice since joining but
> haven't seen anything yet.  Maybe the list server was eating stuff?
> 
> Regards,
> 
> Alan Deikman
> ZNYX Networks
> 
> >20 hours and counting.
> >
> >This is spooky.
> >
> >No wait, I understand now, we the open source community have solve all the
> >problems. Well Tomcat issues at least.
> >
> >Take that M$!
> >
> >Doug
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
--

"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



Form-based security

2005-01-18 Thread Venkat & Radha Venkataramanan
Hello:

I just wrote my first form-based security control. It works fine if I sign
with a user id that plays the permitted role.

But when I enter a user id that does not play the permitted role, instead of
getting my customized error page, autherr.html, I get a generic 403 error.

Can somebody tell me what I am doing wrong?

Thanks.

Venkat

Web.xml section:



MyFirst
 accessible by authenticated users of the
tomcat role
/*
GET
POST
PUT
DELETE


These roles are allowed access
tomcat




FORM
MyFirst Protected Area

/login.html
/autherr.html




Only 'tomcat' role is allowed to access this web
application
tomcat





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



Re: Commons logging woes in Tomcat 5.x

2005-01-18 Thread Jacob Kjome
At 01:44 AM 1/19/2005 +, you wrote:
>
>
>Hmm, is that all?
>I understand the parent-first/last classloading strategies that different
>appservers have...
>
>However, the behaviour I observe is that depending on whether I have
>*log4j* in the web-inf/lib (or commons-logging.properties in classes) then
>the commons-logging Log instance I get will have been loaded by completely
>different classloaders (root vs webapp).
>
>No configuration of commons logging - the Log class's classloader is the
>JVM AppClassLoader
>If I configure commons-logging successfully to use log4j, then the Log
>class's classloader is the webapp classloader...
>
>Maybe there is some trickery going on in the commons-logging
>LogFactory.
>
I can't argue with you there.  commons-logging is all about classloader 
trickery ("quackery"?).  I guess I thought you were talking about something 
else when I answered before.  This is where the UGLI API, being introduced 
along with the Log4j-1.3 release comes in.  It provides a common logging 
interface to avoid dependency on any particular logging implementation, but 
does so by using jar's with hardwired logging implementations.  For 
instance, ugli-jdk14.jar, ugli-simple.jar (system.out),  ugli-nop.jar (no 
logging), and log4j.jar (Log4j actually implements the UGLI API directly in 
1.3).

When this comes out officially, I highly recommend the move away from 
commons-logging.

Jake
>-Nick
>
>
>
>
>Extranet
>[EMAIL PROTECTED] - 18/01/2005 22:54
>
>
>Please respond to tomcat-user@jakarta.apache.org
>
>
>
>To:tomcat-user
>
>cc:
>
>
>Subject:Re: Commons logging woes in Tomcat 5.x
>
>
>Quoting [EMAIL PROTECTED]:
>
>>
>>
>> To answer the 2nd part of my own question:
>> There seems to be some classloading trickery (ie special treatment for
>> commons logging Log class) if a log4j jar (or a
>commons-logging.properties)
>> is found in the web app classpath  (WEB-INF\lib/classes)
>>
>
>It's not really "trickery".  It is child-first classloading behavior
>defined by
>the servlet spec.  However, counting on this across platforms is not wise,
>since other appservers either don't implement child-first behavior or
>implement
>it, but specify normal Java2 parent-first behavior as the default.
>
>
>Jake
>
>> But part 1 still stands...
>>
>>
>> -Nick
>>
>>
>>
>>
>>
>>
>> Extranet
>> Nick MINUTELLO/UK/EUROPE/[EMAIL PROTECTED] - 18/01/2005 19:55
>>
>>
>> Please respond to tomcat-user@jakarta.apache.org
>>
>>
>>
>> To:tomcat-user
>>
>> cc:
>>
>>
>> Subject:Commons logging woes in Tomcat 5.x
>>
>>
>>
>>
>> Unless I am missing something, it seems to me that
>commons-logging-api.jar
>> is loaded by the JVM AppClassLoader (ie the root classloader)
>>
>> There are two implications of this:
>> The first is that tomcat itsself will only ever delegate to JDK1.4
>logging
>> as the commons-logging-api.jar has no log4j delegation classes
>> The second, more serious, seems be that any web application (and
>libraries
>> thereof) using commons logging will use the same commmons logging
>> configuration as tomcat - and will also only delegate to JDK1.4
>logging
>>
>> :-(
>>
>> Is there a way around this that I am missing?
>> Have I correctly understood the behaviour?
>>
>>
>> Cheers,
>> Nick
>>
>>
>>
>>
>> This message and any attachments (the "message") is
>> intended solely for the addressees and is confidential.
>> If you receive this message in error, please delete it and
>> immediately notify the sender. Any use not in accord with
>> its purpose, any dissemination or disclosure, either whole
>> or partial, is prohibited except formal approval. The internet
>> can not guarantee the integrity of this message.
>> BNP PARIBAS (and its subsidiaries) shall (will) not
>> therefore be liable for the message if modified.
>>
>>
>
>**
>
>>
>>
>> BNP Paribas Private Bank London Branch is authorised
>> by CECEI & AMF and is regulated by the Financial Services
>> Authority for the conduct of its investment business in the
>> United Kingdom.
>>
>> BNP Paribas Securities Services London Branch is authorised
>> by CECEI & AMF and is regulated by the Financial Services
>> Authority for the conduct of its investment business in the
>> United Kingdom.
>>
>> BNP Paribas Fund Services UK Limited is authorised and
>> regulated by the Financial Services Authority.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---

Re: tomcat4 + postgresql jdbc

2005-01-18 Thread Bjørn T Johansen
This only enable connections from 192.168.53.2 and not the network 192.168.53.x
To enable the network, you need to write 192.168.53.0 as the ip address
BTJ
>Thanks for the suggestion!
>
>I can successfully connect with a normal Java program.
>In pg_hba.conf, I've got the line
>
>hostall all 127.0.0.1 255.255.255.255   trust
>hostall all 192.168.53.2  255.255.255.0   trust
>
>so all IP connections from the local network (192.168.53.xx) should
>be accepted, even without a password...
>
>-Oege
>
--
---
Bjørn T Johansen (BSc,MNIF)
Executive Manager
[EMAIL PROTECTED]  Havleik Consulting
Phone : +47 21 69 15 20 Bjørnebærstien 57
Fax : +47 41 13 09 15   N-1348 Rykkinn
Cellular : +47 926 93 298   http://www.havleik.no
---
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic 
messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]