Applying Multiple Certificates To Keystore

2008-02-15 Thread RK
Hi,
 
 I have a security certificate issued for my website for
 https://www.mydomain.com . So if some one types
in   https://mydomain.com an certificate mismatch
error is being displayed.
 So to avoid this problem I purchased a new certificate on the name of
 http://mydomain.com  and applied to the same keystore
file but with a different alias name.
 But it doesn't' seem to work, is this a possible way of doing it or
this way it doesn't work.
 
 Can anyone suggest me an idea of how to get rid of this problem.
 
Thanks
Rajeev


RE: Performance of Native library

2008-02-15 Thread Caldarale, Charles R
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
> Subject: Re: Performance of Native library
> 
> But it really depends on how well your JVM provider has 
> implimented sendfile in NIO on your platform 

Hmmm... I guess that's me :-)

Thanks very much for the info.  Just wish I had the time to poke around
with it.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: Tomcat6 on Linux startup on boot..daemon?

2008-02-15 Thread Bill Barker
Well the main problem is that Tomcat is running as root, so any bug in your 
webapp that allows the user to read/write/excecute an arbitrary file on your 
system will likely let a random blackhat take control of it.

"Tim Alberts" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> I'm setting up Tomcat6 on Linux and want it to start on boot.  I use the 
> following init script:
>
> #!/bin/sh
> # description: Tomcat 6.0 web application server
> # chkconfig: 2345 99 00
>
> case "$1" in
> 'start')
>export JAVA_HOME=/usr/java/default
>/opt/apache/apache-tomcat-6.0.16/bin/startup.sh
>touch /var/lock/subsys/tomcat6
>;;
> 'stop')
>/opt/apache/apache-tomcat-6.0.16/bin/shutdown.sh
>rm -f /var/lock/subsys/tomcat6
>;;
> *)
>echo "Usage: $0 { start | stop }"
>;;
> esac
> exit 0
>
> This seems to work just fine.  I have found the documentation about 
> setting up Tomcat as a unix daemon at:
>
> http://tomcat.apache.org/tomcat-6.0-doc/setup.html
>
> Should I be doing this, or is the script I'm using acceptable?
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




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



Re: Performance of Native library

2008-02-15 Thread Bill Barker

"Caldarale, Charles R" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
>> Subject: Re: Performance of Native library
>
>Thanks for the insight (not just the snippet below).
>
>> If you serve a lot of large static files, then it is likely to
>> be faster on most OSs (due to being able to use sendfile).
>
>How does APR stack up against the NIO connector for sendfile usage since
>both support that mode?  Does the JNI transition penalty outweigh any
>gains of using native code?
>

Well, they will both have to use native code to access the sendfile system 
call ;).

I haven't benchmarked it myself (my sites tend to be mostly dynamic, with 
maybe a few small gifs), and haven't seen benchmarks posted on either here 
or [EMAIL PROTECTED]  I'm guessing that in most cases it will be close to a tie 
(possibly NIO winning slightly).  But it really depends on how well your JVM 
provider has implimented sendfile in NIO on your platform (also how well 
Apache has done the same).  Sun has put in some backdoors in their JVM to 
allow native methods in the core Java code to avoid the hit (can't tell you, 
'couse I don't know, you'll have to checkout the source code and find out ;) 
.

But it will still probably depend on your app, so you should benchmark it 
yourself.  It is pretty easy to to with either ab or JMeter (depending on 
what you expect the access pattern to be:  ab if a single page requests lots 
of large files, JMeter if it is more like a slide-show with delays between 
requests).

> - Chuck
>
>
>THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>MATERIAL and is thus for use only by the intended recipient. If you
>received this in error, please contact the sender and delete the e-mail
>and its attachments from all computers.

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





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



Re: naming-factory-dbcp.jar nonsense

2008-02-15 Thread Dan Armbrust
>  > If there are any other legitimate reasons - such as - you needed to
>  > fix some bugs in the code that weren't being addressed in dbcp, then
>  > you should just put the code in your source control system.
>
>  If this was the problem, the right way to fix it would be to go and help
>  out DBCP and fix the bugs in the source. This is exactly what happened just
>  before the latest round of releases to fix
>  http://issues.apache.org/bugzilla/show_bug.cgi?id=43552 which was caused by
>  a commons-pool bug.

I realize that, and I'm glad to see that the projects responsive, and
work well with each other.  But we all know that sometimes that
doesn't happen - good project maintainers come and go.  Smaller
projects don't do well when the good maintainers move on to other
work, and you are left with no choice but to fork their code if you
want to fix an issue in a timely fashion.

>  > It seems that at a minimum, you should at least include the refactored
>  > source code in the source download.
>
>  If you care about this you can always open a bugzilla entry for an
>  enhancement and propose a patch.

I probably will sometime in the near future, when I get caught up again :)

Thanks for your patience,

I know my initial post was rather a flame bait.

Dan

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



Re: FileDirContext fails to immediately recognise new files

2008-02-15 Thread Mick Semb Wever


> assign the classname attr inside the   classname=org.apache.naming.resources.FileDirContext
> 
> http://dspace.dsto.defence.gov.au/tomcat-docs/config/resources.html
> 
Sorry for asking so hastily.
Seems to work well with
META-INF/context.xml:


Thanks very much for pointing me in the right direction!

~mck

-- 
"When there is no enemy within, the enemies outside can't hurt you." 
African proverb 
| Homepage - www.wever.org | Sesam Search Engine - www.sesam.no |


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



Re: FileDirContext fails to immediately recognise new files

2008-02-15 Thread Mick Semb Wever

> assign the classname attr inside the   classname=org.apache.naming.resources.FileDirContext
> 
> http://dspace.dsto.defence.gov.au/tomcat-docs/config/resources.html
> 

Sorry for asking so hastily.
Seems to work well with
META-INF/context.xml:


Thanks very much for pointing me in the right direction!

~mck

-- 
"When there is no enemy within, the enemies outside can't hurt you." 
African proverb 
| Homepage - www.wever.org | Sesam Search Engine - www.sesam.no |



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



FileDirContext fails to immediately recognise new files

2008-02-15 Thread Mick Semb Wever

My application writes new files out into the container's webapps/ROOT/ 
directory.

But servletContext.getResource(..) returns null if it is called too 
quickly after the file has been created.

This can be debugged all the way down to FileDirContext simply not 
finding the file. Funny when "new File("new-file").exists()" always 
returns true for me immediately after i've created the file. i *am* using 
a FileChannel and calling force(true) to finish with.

Does FileDirContext have some "checkInterval" attribute, similar to how 
JspServlet, that specifies how long it takes before new files are 
recognised?

~mck


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



Re: Remote ip Address

2008-02-15 Thread ksh95
> - Original Message 
> From: Peter Crowther <[EMAIL PROTECTED]>
> To: Tomcat Users List 
> Sent: Friday, February 15, 2008 4:25:05 AM
> Subject: RE: Remote ip Address
> 
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Is it possible to programatically direct a servlet response
> > somewhere other than the remote ip address.
> > For instance, Is there a response.setRemoteAddr() or
> >  something similar.
> >
> > My ultimate goal would be to, under certain conditions,
> > direct the servlet response to a null ip 0.0.0.0
> 
> If you want to swallow output under certain conditions, why not use a Filter 
> or Valve?  Much easier than trying to redirect output.
> 

Hi Peter,
 
Are you referring to filters and valves as defined in the server.xml ? If so, I 
was hoping to solve the problem programatically so as to promote 
portability...is this at all possible?


  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

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



Re: Remote ip Address

2008-02-15 Thread ksh95
HI Christopher, thanks for the response.


| [EMAIL PROTECTED] wrote:
| | Is it possible to programatically direct a servlet response somewhere
| | other than the remote ip address.
| 
| Not using the servlet container in any usual way. You could email the
| response somewhere or something like that, or POST it to another URL or
| whatever. I'm not sure why you'd want to do that, though.


I'm not sure I follow you here. POST is an http request...how would that 
prevent a http response.


| | For instance, Is there a response.setRemoteAddr() or something similar.
| 
| No.
| 
| | My ultimate goal would be to, under certain conditions, direct the
| | servlet response to a null ip 0.0.0.0
| 
| Do you mean that you simply want to discard the response? 

Exactly

| The proper way
| to do that is to buffer any response you /might/ send, and then simply
| do not send it at all if you decide not to.

But wouldn't that tie up memory?

| Or, better yet, decide not to send the response before you actually
| create it, thus avoiding all foolishness of that sort.

That would be excellent, although I'm not sure how I would go about choosing 
not the send the response. Would I have to hack the source code.

Thanks


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


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



Tomcat6 on Linux startup on boot..daemon?

2008-02-15 Thread Tim Alberts
I'm setting up Tomcat6 on Linux and want it to start on boot.  I use the 
following init script:


#!/bin/sh
# description: Tomcat 6.0 web application server
# chkconfig: 2345 99 00

case "$1" in
'start')
   export JAVA_HOME=/usr/java/default
   /opt/apache/apache-tomcat-6.0.16/bin/startup.sh
   touch /var/lock/subsys/tomcat6
   ;;
'stop')
   /opt/apache/apache-tomcat-6.0.16/bin/shutdown.sh
   rm -f /var/lock/subsys/tomcat6
   ;;
*)
   echo "Usage: $0 { start | stop }"
   ;;
esac
exit 0

This seems to work just fine.  I have found the documentation about 
setting up Tomcat as a unix daemon at:


http://tomcat.apache.org/tomcat-6.0-doc/setup.html

Should I be doing this, or is the script I'm using acceptable?


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



Re: Problem with Tomcat5.5.25 when configured for JSVC

2008-02-15 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neha,

There's no need to post a question twice in such a short time span.
Please wait a little longer before you re-port a question to the list.

Thanks,
- -chris

Neha Agrawal wrote:
| Hello
|  I configured tomcat 5.5.25 with native libraries (openssl and
APR)
| for ports 8180 (http) and 8443(HTTPS) on
| Linux 2.6.22.9 #1 SMP  x86_64
| This is Intel Quad Core Zeon machine 64 bit
| The OS is debian for amd64
| APR 1.2.7
| Open-ssl 0.9.7k
|
| java -version gives the following output
|java version "1.5.0_10"
| Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
|  Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)
|
| Also i compiled Openssl with -fPIC option
|
| Everything worked fine with Tomcat , but when i configured JSVC tomcat
| behaves weird..
| it started just once (Just after the install)
| everything worked fine
| but when i restart tomcat i only get the following in catalina.out
|
| Feb 15, 2008 12:23:41 PM org.apache.coyote.http11.Http11AprProtocol init
| INFO: Initializing Coyote HTTP/1.1 on http-8180
|
| no errors: even in the debug/verbose mode..
|
| if i again restart tomcat , the earlier started process just results i
nthe
| following line in catalina.out
| jsvc.exec error: Service exit with a return value of 143
|
| Although every time, i kill the 2 processes of tomcat (started because of
| JSVC)
|
| any light is appreciated as i am into this problem for a week now...
|
| thanks
|  Neha Agrawal
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAke1/9cACgkQ9CaO5/Lv0PBwCwCfU0drmB4VLlxlH0AAY6U7Bdtj
43gAnA5KJqgIIBF+nYl7PLw4mqMjJkn5
=+T5t
-END PGP SIGNATURE-

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



Re: long initialisation time for Tomcat5.5.25 when compiled with Native libraries and JSVC

2008-02-15 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neha,

Neha Agrawal wrote:
| I configured tomcat 5.5.25 with native libraries (openssl and APR)
| for ports 8180 (http) and 8443(HTTPS) on Linux 2.6.22.9 #1 SMP x86_64
|
| This is Intel Quad Core Zeon machine 64 bit
| The OS is debian for amd64
| APR 1.2.7
| Open-ssl 0.9.7k

[snip]

| it takes a long time to initialise tomcat
| Initialization processed in 872731 ms
| i only get the following in catalina.out

Google is your friend:
http://readlist.com/lists/tomcat.apache.org/users/9/46003.html

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAke1/7YACgkQ9CaO5/Lv0PDLnQCgi+i1tf7GmGTKaHnUrMeGMq5j
EdIAnje1yTgvOPC+Ep6MXQiL/fRUtpnN
=vaNk
-END PGP SIGNATURE-

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



long initialisation time for Tomcat5.5.25 when compiled with Native libraries and JSVC

2008-02-15 Thread Neha Agrawal
Hello
 I configured tomcat 5.5.25 with native
libraries (openssl and APR)  for ports 8180 (http) and
8443(HTTPS) on
Linux 2.6.22.9 #1 SMP  x86_64
This is Intel Quad Core Zeon machine 64 bit
The OS is debian for amd64
APR 1.2.7
Open-ssl 0.9.7k

java -version gives the following output
   java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.5.0_10-b03)
 Java HotSpot(TM) 64-Bit Server VM (build
1.5.0_10-b03, mixed mode)

Also i compiled Openssl with -fPIC option

Everything worked fine with Tomcat now..
Even the restarts..
 but when i configured JSVC tomcat behaves weird..

but when i restart tomcat (through JSVC )

it takes a long time to initialise tomcat
Initialization processed in 872731 ms
i only get the following in catalina.out

Feb 15, 2008 12:23:41 PM
org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180

no errors: even in the debug/verbose mode..

if i again restart tomcat , the earlier started
process just results i nthe following line in
catalina.out
jsvc.exec error: Service exit with a return value of
143

Although every time, i kill the 2 processes of tomcat
(started because of JSVC)

any light is appreciated as i am into this problem for
a week now...

thanks
 Neha Agrawal


  5, 50, 500, 5000 - Store N number of mails in your inbox. Go to 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

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



Problem with Tomcat5.5.25 when configured for JSVC

2008-02-15 Thread Neha Agrawal
Hello
 I configured tomcat 5.5.25 with native libraries (openssl and APR)
for ports 8180 (http) and 8443(HTTPS) on
Linux 2.6.22.9 #1 SMP  x86_64
This is Intel Quad Core Zeon machine 64 bit
The OS is debian for amd64
APR 1.2.7
Open-ssl 0.9.7k

java -version gives the following output
   java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)

Also i compiled Openssl with -fPIC option

Everything worked fine with Tomcat , but when i configured JSVC tomcat
behaves weird..
it started just once (Just after the install)
everything worked fine
but when i restart tomcat i only get the following in catalina.out

Feb 15, 2008 12:23:41 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180

no errors: even in the debug/verbose mode..

if i again restart tomcat , the earlier started process just results i nthe
following line in catalina.out
jsvc.exec error: Service exit with a return value of 143

Although every time, i kill the 2 processes of tomcat (started because of
JSVC)

any light is appreciated as i am into this problem for a week now...

thanks
 Neha Agrawal


[ANN] Apache Tomcat Native 1.1.13 released

2008-02-15 Thread jean-frederic clere

The Apache Tomcat team announces the immediate availability of Apache
Tomcat Native 1.1.13 stable. This release includes many bugfixes over 
Apache Tomcat Native 1.1.12 and the first official release of Tomcat Native.



Please refer to the change log for the list of changes:
http://tomcat.apache.org/native-doc/miscellaneous/changelog.html

Downloads:
http://tomcat.apache.org/download-native.cgi


Thank you,

-- The Apache Tomcat Team


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



Re: Sporadic Errors in catalina log

2008-02-15 Thread Steven
Thanks Mark.  So I still have not found root cause on why this problem is
even occuring.  I can't reproduce it reliably, i'll send 2000 requests
successfully, then a series of 100 will cause this exception to be thrown.
Even if its the exact same request over and over again.  If I just hit
tomcat with just a GET request with the url and no parameters the error
never occurs.  When I send it a large POST with a bunch of URL parameters it
breaks sometimes. And once it starts throwing these exceptions, they
continue for a period of time, where even if i restart tomcat, the error
persist.

Thank you guys for all your help so far.  I'm going to keep digging and I'll
let you guys know if I find anything.

On Thu, Feb 14, 2008 at 2:13 PM, Mark Thomas <[EMAIL PROTECTED]> wrote:

> Caldarale, Charles R wrote:
> >> From: Steven [mailto:[EMAIL PROTECTED]
> >> Subject: Re: Sporadic Errors in catalina log
> >>
> >> Ok so I've caputured a large amount of data and I always see
> >> something like
> >>
> >> POST ?data=blah...  its never blank but its not going to a
> >> specific webpage or anything, just to the host itself.
> >
> > That's not a valid request.  Read section 5.1 of the HTTP RFC:
> > http://www.ietf.org/rfc/rfc2616.txt?number=2616
> >
> >  - Chuck
>
> Trunk has been patched to fix the exception. The patch has been proposed
> for the next releases of 5.5.x and 6.0.x.
>
> Mark
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: polish charset on tomcat server on linux system

2008-02-15 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Raghuveer,

Raghuveer wrote:
| I cannot test on linux as it is in my customer place in Poland ..where
as I
| am working from a remote place locally on windows from india..

Get yourself a Linux box. Or, get yourself a VMware virtual machine.
Linux is one of the easiest types of boxes to get for testing.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAke1twgACgkQ9CaO5/Lv0PD9+wCeKtc8SeSpbf5yfAR4fd3QsfRH
Zi0AoKt6IWIdyx1JDPEWQD548I8iV2qH
=J/Hd
-END PGP SIGNATURE-

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



RE: Selective ports without virtual hosts

2008-02-15 Thread Greg Jewell
From: Greg Jewell [mailto:[EMAIL PROTECTED] 
Subject: Selective ports without virtual hosts


Basically, I want to allow this:
https://host/app/a
http://host/app/b

and disallow this:
http://host/app/a


Any reason why you can't use a  of CONFIDENTIAL for
the /a mapping?  This would be the standard way to do it.  See section
12.7 of the servlet spec for details.

- Chuck



There's no reason at all that I can't use it -- I simply wasn't aware of 
its existence.  Thanks for the fast reply -- I've already got it up and 
running.



Greg



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



RE: Selective ports without virtual hosts

2008-02-15 Thread Caldarale, Charles R
> From: Greg Jewell [mailto:[EMAIL PROTECTED] 
> Subject: Selective ports without virtual hosts
> 
> Basically, I want to allow this:
> https://host/app/a
> http://host/app/b
> 
> and disallow this:
> http://host/app/a

Any reason why you can't use a  of CONFIDENTIAL for
the /a mapping?  This would be the standard way to do it.  See section
12.7 of the servlet spec for details.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Stuff the DBCP and JDBC jars in the WAR: is there a downside?

2008-02-15 Thread Florian Kirchhoff

Hello Tomcat Users,

up until recently it was my firm belief that the ONLY way to get database
connection pooling (DBCP) working was to place the JDBC driver JARS in
${CATALINA_HOME}/common/lib and define the DBCP
resouce in the context (my preference is for META-INF/context.xml in the
WAR).

That was until I tried to place both the commons-dbcp-*.jar and my JDBC
driver jar in
my WAR under WEB-INF/lib. If I make sure to specify the factory attribute in
my context.xml to
be "org.apache.commons.dbcp.BasicDataSourceFactory", lo and behold it works!
I can finally
deploy all my dependencies in my WAR. When you think of how the classpath
hierarchy works
in a web app it's no surprise really.

Question: is there any downside to this approach?

I am asking because I hadn't come across this as a possibility anywhere, so
I am wondering...

I would be very greatful of any feedback and/or suggestions.

Regards,

Florian 


-- 
View this message in context: 
http://www.nabble.com/Stuff-the-DBCP-and-JDBC-jars-in-the-WAR%3A-is-there-a-downside--tp15502149p15502149.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Selective ports without virtual hosts

2008-02-15 Thread Greg Jewell

Hello,

I have a webapp that has two servlets in it.  I would like one of the 
servlets to respond when a client connects to an SSL port, and the other 
to respond when a client connects to a non-SSL port.  Each servlet has a different mapping in the web.xml.


Basically, I want to allow this:
https://host/app/a
http://host/app/b

and disallow this:
http://host/app/a

I have read the FAQ on how to set up virtual hosts, but this isn't 
really a desirable solution for this case.


Is there a way to do this without using virtual hosts?

I am using Tomcat 5.5, but may have the option of updating to 6.


Thanks,
Greg Jewell


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



Re: Performance of Native library

2008-02-15 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jacob,

Jacob Rhoden wrote:
| Are there any web sites that show/compare the performance of a plain
| install vs adding the native libraries for tomcat? How many of you guys
| actually use the native libraries in production, ie is this common or
| uncommon?

Here's my anecdote: we do not use APR in production. But, we use Tomcat
neither for SSL nor static content, which is where APR would provide the
most performance gains. We are also a small service, and don't currently
have any performance problems.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAke1n4EACgkQ9CaO5/Lv0PD+gACfWgQGu7IjQUUue4MwVzHx7B+8
cDoAn0CFqPKskPY7mxH3RaRKj/w/AUeV
=Hcp6
-END PGP SIGNATURE-

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



RE: Particularly problematic Oracle connection problem (Oracle 10g, Tomcat 6, Blojsom 3.2)

2008-02-15 Thread Wylie, Kirk
Summary: I am an idiot and posted to the mailing list far too early. Was
a problem with my JDBC connection string (a typo basically).

I think I got hung up too much on the classloading differences between
Tomcat 5.x and Tomcat 6 and didn't look carefully enough at my own
settings.

Apologies for wasting people's time,

Kirk Wylie 

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: 15 February 2008 12:49
To: Tomcat Users List
Subject: Re: Particularly problematic Oracle connection problem (Oracle
10g, Tomcat 6, Blojsom 3.2)

Wylie, Kirk wrote:
> - Putting the .jar files ANYwhere (in order of attempts, webapp's
> WEB-INF/lib, CATALINA_BASE/lib, CATALINA_HOME/lib)
>- Results in the following statement occurring in the logs:
>  Cannot create JDBC driver of class 'oracle.jdbc.OracleDriver' for
> connect URL 'jdbc:oracle:thin@//fodevdbsx1.london:1521/fodev3.london'

Do you have a stack trace for this. Can you turn up the logging level
and 
get one?

> This indicates to me that the Oracle driver is being loaded, but it's
> being stopped from actually creating the instance for some reason.

Agreed.

> The complication here is that Blojsom DOES NOT use, by default, JNDI
> resources. Rather, it sets up its own DBCP DataSource in its
> Spring+Hibernate configuration, which is what's failing here. This is
> NOT a  problem. Just to make sure, when I removed the DBCP
> implementation in blojsom, it failed, because it couldn't find the
> catalina copies.

If you are not using JNDI then you should be able to put the Oracle JARs
in 
WEB-INF/lib. I'd also restore catalina.properties to the original to
limit 
the changes.

> Has anybody experienced anything like this in the past either with
> Blojsom or some other application which isn't using JNDI resources for
> database connections using Tomcat 6?

I have used DBCP directly in web-apps without a problem with 4, 5 and 6.

Mark

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Re: Particularly problematic Oracle connection problem (Oracle 10g, Tomcat 6, Blojsom 3.2)

2008-02-15 Thread Mark Thomas

Wylie, Kirk wrote:

- Putting the .jar files ANYwhere (in order of attempts, webapp's
WEB-INF/lib, CATALINA_BASE/lib, CATALINA_HOME/lib)
   - Results in the following statement occurring in the logs:
 Cannot create JDBC driver of class 'oracle.jdbc.OracleDriver' for
connect URL 'jdbc:oracle:thin@//fodevdbsx1.london:1521/fodev3.london'


Do you have a stack trace for this. Can you turn up the logging level and 
get one?



This indicates to me that the Oracle driver is being loaded, but it's
being stopped from actually creating the instance for some reason.


Agreed.


The complication here is that Blojsom DOES NOT use, by default, JNDI
resources. Rather, it sets up its own DBCP DataSource in its
Spring+Hibernate configuration, which is what's failing here. This is
NOT a  problem. Just to make sure, when I removed the DBCP
implementation in blojsom, it failed, because it couldn't find the
catalina copies.


If you are not using JNDI then you should be able to put the Oracle JARs in 
WEB-INF/lib. I'd also restore catalina.properties to the original to limit 
the changes.



Has anybody experienced anything like this in the past either with
Blojsom or some other application which isn't using JNDI resources for
database connections using Tomcat 6?


I have used DBCP directly in web-apps without a problem with 4, 5 and 6.

Mark

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



Particularly problematic Oracle connection problem (Oracle 10g, Tomcat 6, Blojsom 3.2)

2008-02-15 Thread Wylie, Kirk
I'm attempting to get Blojsom 3.2 talking to my Oracle database (this is
completely setup fine, the problem appears to be a classloader issue of
some sort) in Tomcat 6 (6.0.16 to be precise).

I'm using a split CATALINA_BASE and CATALINA_HOME installation
(CATALINA_HOME isn't writable by the user that I'm running as), and have
put ojdbc14.jar and orai18n.jar in my $CATALINA_BASE/lib directory.
Furthermore, following suggestions about RUNNING.txt not being correct,
I've put the following line in my
$CATALINA_BASE/conf/catalina.properties file:
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina
.base}/lib,${catalina.base}/lib/*.jar
This is replacing the existing definition of common.loader.

Here's what I've tried:
- Putting the .jar files nowhere (not in CATALINA_HOME, CATALINA_BASE,
or my webapp itself)
   - Results in a ClassNotFoundException loading
oracle.jdbc.OracleDriver
- Putting the .jar files ANYwhere (in order of attempts, webapp's
WEB-INF/lib, CATALINA_BASE/lib, CATALINA_HOME/lib)
   - Results in the following statement occurring in the logs:
 Cannot create JDBC driver of class 'oracle.jdbc.OracleDriver' for
connect URL 'jdbc:oracle:thin@//fodevdbsx1.london:1521/fodev3.london'

This indicates to me that the Oracle driver is being loaded, but it's
being stopped from actually creating the instance for some reason.

The complication here is that Blojsom DOES NOT use, by default, JNDI
resources. Rather, it sets up its own DBCP DataSource in its
Spring+Hibernate configuration, which is what's failing here. This is
NOT a  problem. Just to make sure, when I removed the DBCP
implementation in blojsom, it failed, because it couldn't find the
catalina copies.

I can try to figure out a workaround for this, but I've spent about 6
hours on it thus far, and no matter what combination of property
changes, I can't figure out what precisely is stopping it from loading.

Has anybody experienced anything like this in the past either with
Blojsom or some other application which isn't using JNDI resources for
database connections using Tomcat 6?

I'm a relative newbie to Tomcat 6, but I've used Tomcat 4-5.5
extensively in the past.

Thanks a lot,

Kirk Wylie

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Re: naming-factory-dbcp.jar nonsense

2008-02-15 Thread Mark Thomas

Dan Armbrust wrote:

The only reasons he was given was that it was smaller (and we care
why?) and that it _might_ prevent a version conflict issue.


Size - don't care that much but as a side effect it isn't going to cause 
any harm. Version conflicts, however, are a big issue. Many web apps 
include the DBCP jars and deploying such an app in the servlet class loader 
environment where a different version of DBCP exists is a nightmare. Whilst 
you can work around one app, when you have multiple apps each with a 
different DBCP version you rapidly run out of options.



Maybe you should refactor log4j and commons logging next.  Never know
when you might have an issue there  ;)


Where we have issues we have / we will.


If there are any other legitimate reasons - such as - you needed to
fix some bugs in the code that weren't being addressed in dbcp, then
you should just put the code in your source control system.


If this was the problem, the right way to fix it would be to go and help 
out DBCP and fix the bugs in the source. This is exactly what happened just 
before the latest round of releases to fix 
http://issues.apache.org/bugzilla/show_bug.cgi?id=43552 which was caused by 
a commons-pool bug.



 As for getting the source you need there are plenty of simple options. Had
 you sent a polite request to the list for help, you would have had the
 source by now.



Yes, but that wouldn't have helped the fact that I had already spent a
lot of valuable time trying to trace the history of this mess.  You
have to admit, its really not very obvious.


It isn't as obvious as the source just being there but as you discovered it 
has been discussed on the lists and the build script is pretty clear.



 Plus, I already had my
solution, I stopped using the tomcat implementation.  Looks like most
of the 3rd party package maintainers had the same conclusion.  They
dropped the package.


My recollection is that they didn't drop it but got it from the binary 
package rather than reproduce the build process.



It seems that at a minimum, you should at least include the refactored
source code in the source download.  But I don't care one way or
another at this point, I now know to avoid this package in order to
make my life easier.


If you care about this you can always open a bugzilla entry for an 
enhancement and propose a patch.


Mark


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



RE: Remote ip Address

2008-02-15 Thread Peter Crowther
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Is it possible to programatically direct a servlet response
> somewhere other than the remote ip address.
> For instance, Is there a response.setRemoteAddr() or
> something similar.
>
> My ultimate goal would be to, under certain conditions,
> direct the servlet response to a null ip 0.0.0.0

If you want to swallow output under certain conditions, why not use a Filter or 
Valve?  Much easier than trying to redirect output.

(And in answer to your original question: no.)

- Peter

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



Re: Undeployment problem

2008-02-15 Thread Sébastien Piller

Hello,

yes, I don't know what is Thread-1. Maybe a Wicket thread (on my side, I 
don't start any thread anywhere). As I'm investigating more on that, I'm 
now quite sure it's a wicket issue and not a tomcat one.


antiResourceLocking="true" on the context.xml do the trick, but I don't 
know if I can use it in my production environnement...


Caldarale, Charles R a écrit :

>From the stack trace, it looks like Thread-1 is the one waiting for the
shutdown command, but the shutdown script didn't seem to be able to
connect to it.  Odd that it's called "Thread-1" - it's just "main" in
current 5.5 and 6.0 levels.

 - Chuck


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