Re: Possible issues with Jasper in latest Tomcat release (6.0.24)

2010-03-09 Thread Konstantin Kolinko
2010/3/9 Sai Pullabhotla :
> Do you know when the 6.0.26 with this patch will be available?
>
A release candidate for 6.0.26 has been proposed for voting several hours ago.
See the thread "[VOTE] Release build 6.0.26" on the dev list.

You may participate in the testing.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Installation differences between 6.0.24 and 5.5.28

2010-03-09 Thread Konstantin Kolinko
2010/3/10 Christopher Schultz :
>
> I don't mean to belabor the point, but upgrading from Tomcat 5.5 to 6.0
> should have been this easy:
>
> 0. Stop Tomcat 5.5
> 1. Install Tomcat 6.0
> 2. Copy yourapp.war from Tomcat 5.5\webapps -> Tomcat 6.0\webapps
> 3. Start Tomcat 6.0
>
> Here are some potential things you'd have to change:
>
> 1. Copy JDBC library from Tomcat 5.5\common\lib into Tomcat 6.0\lib
> 2.  port numbers in Tomcat 6.0\conf\server.xml
> 3. Cluster configuration in server.xml
> 4. Global environment entries in server.xml
>

A document that might add to the above:
http://tomcat.apache.org/migration.html

5. In Tomcat 5.5 the commons-logging library was bundled with Tomcat
and was visible to all installed applications. In Tomcat 6 you have to
deploy it explicitly, if your application uses it.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Eclipse Galileo & Tomcat 6 - Win Vista IIS HTTP Error 500.24 - Internal Server Error

2010-03-09 Thread Konstantin Kolinko
2010/3/10 henry23 :
> Then I tried this URL "http://localhost:8080/ and got this error:
>
> HTTP Status 404 - /
> 
> type Status report
> message /
> description The requested resource (/) is not available.
> 
> Apache Tomcat/6.0.14
>

So, Tomcat works. A version that is several years old, though.

> Is there a way to change the port number for Tomcat once it is installed to
> get it to work properly?

Sure.

Have you ever tried to read documentation before installing anything?


1. You do not need IIS to run Tomcat.

2. It is IIS that listens on port 80. It has nothing to do with Tomcat.

3. Running Tomcat does not require JavaEE.  JavaSE is enough.
 JDK is good, but even JRE is enough.

4. I do not know whether your GlassFish is running.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Dhiren Bhatia
Thanks for the feedback, I've updated the Resource Tag and moved Context to
META_INF. I've also changed the code to use javax.sql.DataSource. Is there
any way to get the number of active/idle connections like you can with the
BasicDataSource object's methods getNumActive etc? How do I get information
on the status of the connection pool?

Thanks!

On Tue, Mar 9, 2010 at 1:14 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> > Subject: Re: Commons DBCP in Tomcat 6.x
> >
> > 
> >
> > Again, as Chuck suggests, this is the long way of doing resource
> > parameters. You can shove all this stuff into , now.
>
> It's not the long way - it simply doesn't work in 5.5 and above.
>
>  - 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.
>
>


Eclipse Galileo & Tomcat 6 - Win Vista IIS HTTP Error 500.24 - Internal Server Error

2010-03-09 Thread henry23

I have a laptop with Win Vista SP2 installed on it, and on which all of the
IIS features with IIS in the name have been turned off. I have Eclipse
Galileo and Tomcat 6 installed as part of the setup to working through an
online tutorial for Eclipse/Tomcat. I have the Java 5 EE SDK installed as
well. I'm at the point where I I have successfully started Tomcat through
Eclipse and when I try to go to the welcome page of Tomcat by entering the
the URL "http://localhost/"; I get this error: 

Server Error in Application "DEFAULT WEB SITE"Internet Information Services
7.0

Error Summary
HTTP Error 500.24 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated
managed pipeline mode. Detailed Error InformationModule
ConfigurationValidationModule 
Notification BeginRequest 
Handler StaticFile 
Error Code 0x80070032 
Requested URL http://localhost:80/ 
Physical Path C:\inetpub\wwwroot 
Logon Method Not yet determined 
Logon User Not yet determined 
 Most likely causes:
system.web/ident...@impersonate is set to true. 
 Things you can try:
If the application supports it, disable client impersonation. 
If you are certain that it is OK to ignore this error, it can be disabled by
setting system.webServer/validat...@validateintegratedmodeconfiguration to
false. 
Move this application to an application pool using Classic .NET mode - for
example, %SystemRoot%\system32\inetsrv\appcmd set app "Default Web Site/"
/applicationPool:"Classic .NET AppPool" 
(You can set "Classic .NET AppPool" to the name of another application pool
running in Classic managed pipeline mode)  Links and More InformationIf you
are not sure or unable to use the first two options, then it is preferred
that you move this application to Classic mode. 
View more information »

As a result I have tried solution option two mentioned above with no
success.  

Then I tried this URL "http://localhost:8080/ and got this error:

HTTP Status 404 - /

type Status report
message /
description The requested resource (/) is not available.

Apache Tomcat/6.0.14

Is there a way to change the port number for Tomcat once it is installed to
get it to work properly? If not then I need to ask a second question. When I
installed the SDK called for in the tutorial I also apparently installed the
app server (GlassFish) that came with the SDK download, which I installed
with http port set to 8080 and https port set to 8181. Could this server be
running in the background without me knowing about it? If so any idea how I
can stop it from executing or change its port numbers, or should I just
uninstall it and then reinstall it with different port numbers? Please
advise. Thanks.

 



-- 
View this message in context: 
http://old.nabble.com/Eclipse-Galileo---Tomcat-6---Win-Vista-IIS-HTTP-Error-500.24---Internal-Server-Error-tp27843971p27843971.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joshua,

On 3/9/2010 4:50 PM, Joshua Gregoire wrote:

http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2";>


That looks fine. I hadn't seen that you already posted this in another
reply before I wrote mine. Sorry to duplicate effort.


The WebAdvisor2 app does do something behind the scenes once tomcat has it and 
the url ends up
 
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2?TYPE=M&PID=CORE-WBMAIN&TOKENIDX=2044948188 


It looks like WebAdvisor2 is trying to build its own redirect URL and
getting it all wrong. I would recommend contacting the authors of that
product to see what you'll have to do to get this to work properly.

That may also be part of the problem.  I did not think of that, because 
I thought that this webapp was "home-made", so that Joshua would know if 
it did anything like that.


The URL also leads me to another doubt : it seems a bit strange to need 
a "repeat" /WebAdvisor2/WebAdvisor2 in these URLs.  Are you sure that 
the application is in the right place under Tomcat ?


Also, I checked the IIS installation and configuration instructions for 
isapi_redirect,

http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
and I will confirm the following :
- the only "virtual directory" that should be necessary is the "jakarta" 
one.
- the "mappings" that determine which URI's will cause IIS to redirect a 
request through the isapi_redirector to Tomcat, are defined in the file 
"uriworkermap.properties".  There should be two lines in there like

/WebAdvisor2=worker1
/WebAdvisor2/*=worker1
(replace worker1 by whatever your Tomcat worker is named in 
workers.properties)


Next, I will differ somewhat from the instructions as given in the page
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

If you add a second "virtual directory" to IIS, named "WebAdvisor2", and 
map it to the disk directory where the files of the Tomcat webapp 
"WebAdvisor2" reside, what you are doing is giving IIS direct access to 
that disk directory.  That means that, in the absence of a very careful 
configuration of IIS, you are allowing IIS to bypass any security 
precautions of Tomcat, and go get (and return to the user) some files 
that should be accessible (or not) only through Tomcat and your webapp.
For example, the file "web.xml" of that webapp (normally located under 
tomcat_dir/webapps/WebAdvisor2/WEB-INF) may contain setup parameters of 
the webapp which you do not want a user to see (like passwords).
That is why Tomcat itself, will never allow a user to request any file 
which resides in the WEB-INF subdirectory.
But by creating that second virtual directory under IIS, you could allow 
a user to request the URI "/WebAdvisor2/WEB-INF/web.xml" and obtain the 
content of that file in his browser, directly from IIS (Tomcat would 
never know).

This is not a good idea in general.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
Hey Chris,
 
That triggered a thought and I got it working.  I had to make a change in our 
database application that this webapp communicates with and now I'm up and 
running.  Thanks again to you and Andre for all your help!!
 
Josh

>>> Christopher Schultz  3/9/2010 4:07 PM >>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joshua,

On 3/9/2010 4:50 PM, Joshua Gregoire wrote:
>  CONTENT="0;URL=http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2";>

That looks fine. I hadn't seen that you already posted this in another
reply before I wrote mine. Sorry to duplicate effort.

> The WebAdvisor2 app does do something behind the scenes once tomcat has it 
> and the url ends up
>  
> http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2?TYPE=M&PID=CORE-WBMAIN&TOKENIDX=2044948188
>  

It looks like WebAdvisor2 is trying to build its own redirect URL and
getting it all wrong. I would recommend contacting the authors of that
product to see what you'll have to do to get this to work properly.

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

iEYEARECAAYFAkuWxpkACgkQ9CaO5/Lv0PBTEgCfcpUS/xQ2e+5z3hdkRlo2x4XX
VuoAnRUxdz9lfHylcI5ndqpyIP26OOyN
=CfIV
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 



RE: JNDI Realm question

2010-03-09 Thread Leo Donahue - PLANDEVX
And thank you everyone for your help! 

-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] 
Sent: Tuesday, March 09, 2010 3:18 PM
To: 'Tomcat Users List'
Subject: RE: JNDI Realm question

Ok, it's working.  I changed too many things at once, so I'm not sure which one 
fixed it.  I shouldn't have done that, but I can't spend too much time on this, 
3 days already.

I changed server.xml to this:

  
ldap://servername.plandev.maricopa.gov:389";
connectionName="CN=username,OU=Service Accounts,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
connectionPassword="password"

roleBase="OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
roleSubtree="true"
roleName="cn"
roleSearch="(member={0})"

userBase="OU=PLANDEV Dept,DC=plandev,DC=maricopa,DC=gov"
userSearch="(&(objectCategory=person)(sAMAccountName={0}))"
userSubtree="true"
userRoleName="memberOf" 
/>
 

I also changed the realm-name web.xml:




samplewebapp
*.jsp
GET
POST

  
arcgisserver_reader
  
  
CONFIDENTIAL
  




BASIC
  JNDIRealm




arcgisserver_reader



Now when I navigate to http://servername:8080/sample I accept the certificate, 
enter my windows login and password, and then I'm taken to the 
https://servername:8080/sample welcome page.  

I don't have a lock icon which bothers me, but that is IE7 for you.  The 
address bar is pink.  What can I tell you.  Firefox gives me a lock icon.


-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
Sent: Tuesday, March 09, 2010 2:25 PM
To: 'Tomcat Users List'
Subject: RE: JNDI Realm question

I downloaded the Apache Directory Tool.  Very nice.  Much better than the ldap 
browser tool I was using.

I was able to create a search using the Filter Editor, of the Apache Directory 
Tool, that returns sAMAccounts that I wanted.

The filter:  

(&
(objectCategory=person)
(sAMAccountName=*)
(memberOf=CN=arcgisserver_reader,OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov)
)


This query returns the three user accounts with the role "arcgisserver_reader", 
which is right.

I think my issue is that I don't understand what I'm supposed to be supplying 
in the JNDI Realm, among other things.  The examples I saw in the Tomcat docs 
use something similar to what I have below, but I don't understand the purpose 
roleSearch attribute.  How does it know that I want to use the role 
"arcgisserver_reader" when it has a parameter?  It plugs in the role specified 
in the web.xml?  I know roleSearch is the filter expression for performing role 
searches, but is that what I'm doing?  I want to search for any user that 
belongs to a specific role - that's what I'm attempting anyway.

This is what I have in server.xml:

  
ldap://servername.plandev.maricopa.gov:389";
connectionName="username"
connectionPassword="password"

userSearch="(&(objectCategory=person)(sAMAccountName={0})(memberOf=CN=arcgisserver_reader,OU=Groups,OU=PLANDEV
 Dept,DC=plandev,DC=maricopa,DC=gov))"
userBase="OU=PLANDEV Dept,DC=plandev,DC=maricopa,DC=gov"
userSubtree="true"
roleBase="OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
roleName="cn"
roleSearch="(uniqueMember={0})"

/>

This is what I have in my webapp's web.xml:


http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>

com.sun.faces.verifyObjects
false


com.sun.faces.validateXml
true


javax.faces.STATE_SAVING_METHOD
client


Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
*.jsf



30



index.jsp




samplewebapp
*.jsp
GET
POST

  
arcgisserver_reader
  
  
CONFIDENTIAL
  



BASIC
  Sample



arcgisserver_reader




This is my faces-config.xml:





http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd";>

sampleModelBean

gov.maricopa.rdsa.gis.SampleModelBean

RE: JNDI Realm question

2010-03-09 Thread Leo Donahue - PLANDEVX
Ok, it's working.  I changed too many things at once, so I'm not sure which one 
fixed it.  I shouldn't have done that, but I can't spend too much time on this, 
3 days already.

I changed server.xml to this:

  
ldap://servername.plandev.maricopa.gov:389";
connectionName="CN=username,OU=Service Accounts,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
connectionPassword="password"

roleBase="OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
roleSubtree="true"
roleName="cn"
roleSearch="(member={0})"

userBase="OU=PLANDEV Dept,DC=plandev,DC=maricopa,DC=gov"
userSearch="(&(objectCategory=person)(sAMAccountName={0}))"
userSubtree="true"
userRoleName="memberOf" 
/>
 

I also changed the realm-name web.xml:




samplewebapp
*.jsp
GET
POST

  
arcgisserver_reader
  
  
CONFIDENTIAL
  




BASIC
  JNDIRealm




arcgisserver_reader



Now when I navigate to http://servername:8080/sample I accept the certificate, 
enter my windows login and password, and then I'm taken to the 
https://servername:8080/sample welcome page.  

I don't have a lock icon which bothers me, but that is IE7 for you.  The 
address bar is pink.  What can I tell you.  Firefox gives me a lock icon.


-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] 
Sent: Tuesday, March 09, 2010 2:25 PM
To: 'Tomcat Users List'
Subject: RE: JNDI Realm question

I downloaded the Apache Directory Tool.  Very nice.  Much better than the ldap 
browser tool I was using.

I was able to create a search using the Filter Editor, of the Apache Directory 
Tool, that returns sAMAccounts that I wanted.

The filter:  

(&
(objectCategory=person)
(sAMAccountName=*)
(memberOf=CN=arcgisserver_reader,OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov)
)


This query returns the three user accounts with the role "arcgisserver_reader", 
which is right.

I think my issue is that I don't understand what I'm supposed to be supplying 
in the JNDI Realm, among other things.  The examples I saw in the Tomcat docs 
use something similar to what I have below, but I don't understand the purpose 
roleSearch attribute.  How does it know that I want to use the role 
"arcgisserver_reader" when it has a parameter?  It plugs in the role specified 
in the web.xml?  I know roleSearch is the filter expression for performing role 
searches, but is that what I'm doing?  I want to search for any user that 
belongs to a specific role - that's what I'm attempting anyway.

This is what I have in server.xml:

  
ldap://servername.plandev.maricopa.gov:389";
connectionName="username"
connectionPassword="password"

userSearch="(&(objectCategory=person)(sAMAccountName={0})(memberOf=CN=arcgisserver_reader,OU=Groups,OU=PLANDEV
 Dept,DC=plandev,DC=maricopa,DC=gov))"
userBase="OU=PLANDEV Dept,DC=plandev,DC=maricopa,DC=gov"
userSubtree="true"
roleBase="OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
roleName="cn"
roleSearch="(uniqueMember={0})"

/>

This is what I have in my webapp's web.xml:


http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>

com.sun.faces.verifyObjects
false


com.sun.faces.validateXml
true


javax.faces.STATE_SAVING_METHOD
client


Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
*.jsf



30



index.jsp




samplewebapp
*.jsp
GET
POST

  
arcgisserver_reader
  
  
CONFIDENTIAL
  



BASIC
  Sample



arcgisserver_reader




This is my faces-config.xml:





http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd";>

sampleModelBean

gov.maricopa.rdsa.gis.SampleModelBean
session




The sample JSF page is really nothing, just a checkbox and a button for the 
sake of having something on the page and testing an valueChangedListener.  

When I browse to http://servername:8080/sample (thi

Re: Memory settings

2010-03-09 Thread André Warnier

Mats Eklund wrote:

Thanks a lot!

In the Java tab I have the Java Options field with parameters such as 
"-Dcatalina.home...". So I just add another few lines to it with the "-Xms..." 
parameters?


Basically, yes. But see below.



There are a few fields below that field called: initial memory pool, maximum 
memory pool, thread stack size. Should I maybe use these fields instead?


I believe you should leave "thread stack size" alone.
But the "memory pool" parameters may be the same as the -Xms/-Xmx 
settings.  Really, I just don't know, I just suspect. Maybe someone else 
can confirm.



And finally, when nothing is specified here, what are the defaults? I have 
tried to find out by looking into some log files but havent found anything.

You should browse the pages I mentioned below to make sure. It's in 
there somewhere (and these documents are very informative).
I think I remember that the default varies according to the platform, 
and according to whether the JVM is started in "server" or "client" mode 
(if that still makes a difference with the 1.6 JVM). And I also think 
that it is either 64 or 128 MB. Anyway, 256 MB is higher than the default.




--- On Tue, 3/9/10, André Warnier  wrote:

From: André Warnier 
Subject: Re: Memory settings
To: "Tomcat Users List" 
Date: Tuesday, March 9, 2010, 9:59 PM

Mats Eklund wrote:

Hi,

I'm using Tomcat 5.5 on Windows and am sometimes experiencing exceptions thrown 
in my web application:
"java.lang.OutOfMemoryError: Java heap space". I will profile my
application to see if this can be avoided by changing the code,
however, I'm also interested to know whether and how memory available
to the application can be configured.


Short version :
(Presuming you installed Tomcat using the "service installer",)

go to the Tomcat/bin directory and double-click the tomcat5w.exe program. This 
is a GUI allowing you, in one of the tabs, to set the JVM options used to run 
Java, which runs Tomcat.
Use the options "-Xms256m -Xmx256m" for example to set the size of the Heap at 
start to 256 MB (-Xms) and maximum size 256 MB (-Xmx).
Setting both to the same value is a bit more efficient, because it avoids the 
JVM having to keep track and resize this dynamically.

Long version :
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24
> 
> To me, Objective C is no more objectionable than C++: they're both
> horrible beasts.

Objectionable C - the beginning of a new language: takes all the crap in C++ 
and makes it worse...

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



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joshua,

On 3/9/2010 4:50 PM, Joshua Gregoire wrote:
>  CONTENT="0;URL=http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2";>

That looks fine. I hadn't seen that you already posted this in another
reply before I wrote mine. Sorry to duplicate effort.

> The WebAdvisor2 app does do something behind the scenes once tomcat has it 
> and the url ends up
>  
> http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2?TYPE=M&PID=CORE-WBMAIN&TOKENIDX=2044948188
>  

It looks like WebAdvisor2 is trying to build its own redirect URL and
getting it all wrong. I would recommend contacting the authors of that
product to see what you'll have to do to get this to work properly.

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

iEYEARECAAYFAkuWxpkACgkQ9CaO5/Lv0PBTEgCfcpUS/xQ2e+5z3hdkRlo2x4XX
VuoAnRUxdz9lfHylcI5ndqpyIP26OOyN
=CfIV
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Native mode...

2010-03-09 Thread Caldarale, Charles R
> From: Mats Eklund [mailto:mats.ekl...@yahoo.com]
> Subject: RE: Native mode...
> 
> Thanks! I'm not running SSL, so I guess I shouldn't bother.

If you want to get rid of the INFO message, just comment out the 
AprLifecycleListener in server.xml.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Native mode...

2010-03-09 Thread Mats Eklund
Thanks! I'm not running SSL, so I guess I shouldn't bother.

--- On Tue, 3/9/10, Caldarale, Charles R  wrote:

From: Caldarale, Charles R 
Subject: RE: Native mode...
To: "Tomcat Users List" 
Date: Tuesday, March 9, 2010, 10:39 PM

> From: Mats Eklund [mailto:mats.ekl...@yahoo.com]
> Subject: Native mode...
> 
> I'm running a webapp on Tomcat 5.5 on Windows Server 2003 and find
> statements in the log saying that the server could run faster if native
> libraries were installed.

The performance difference between using APR and the pure Java connectors 
depends largely on what you're doing.  If you have a lot of SSL traffic, APR 
will help; if you're not using SSL, you likely won't be able to tell the 
difference, and can stick with the pure Java mode.

> How can I install these libraries?

Just put the tcnative-1.dll into Tomcat's bin directory.  The DLL is available 
here:
http://apache.mirrors.timporter.net/tomcat/tomcat-connectors/native/1.1.20/binaries/win32
http://apache.mirrors.timporter.net/tomcat/tomcat-connectors/native/1.1.20/binaries/win64/x64

Choose the appropriate one for your platform.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




  

Re: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 3/9/2010 4:15 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24
>>
>>>   (Written in Objective C?)
>>
>> Ha.
> 
> Don't laugh - our phones use it too.

I know. I helped a friend write a couple of iPhone apps.

To me, Objective C is no more objectionable than C++: they're both
horrible beasts.

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

iEYEARECAAYFAkuWxcUACgkQ9CaO5/Lv0PA6GQCeK6KO9Shi+DzZlx1zT+hpQ+w3
QVoAni+j8Mx1EgJixZHJaNF5dm3Fec90
=0a9+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
Hey Chris,
 
Here is the code for the meta redirect.
 
http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2";>
 
The WebAdvisor2 app does do something behind the scenes once tomcat has it and 
the url ends up
 
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2?TYPE=M&PID=CORE-WBMAIN&TOKENIDX=2044948188
 
 
I would love to tell you what it does, however, this is a purchased product and 
we don't have access to the code.  Also, I can skip the meta redirect step and 
just type http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2 and I get the exact 
same result.

>>> Christopher Schultz  3/9/2010 3:04 PM >>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joshua,

On 3/9/2010 2:25 PM, Joshua Gregoire wrote:
> First, thanks for your assistance with this, I appreciate the time and
> effort.

Thanks for the thanks (mostly to others, not me just yet): as Andre'
mentions, it's always nice when the community is appreciated.

> In IIS, I setup a site with root drive on C:\inetpub\r18test2.kcc.edu
> and I created two virtual directories, 1 for the isapi dll called
> jakarta and another for the WebAdvisor2 folder in tomcat called
> WebAdvisor2.  If someone goes to http://r18test2.kcc.edu, you get the
> default doc in the C:\inetpub\r18test2.kcc.edu folder, which is where I
> put the meta redirect. However, if you type
> http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2, you get redirected,
> I'm assuming through the isapi dll, to
> http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2.  So it appeared to
> me that the isapi was working.  Does that make any sense?

Hmm. If the URL in the browser is changing, then something is issuing a
/real/ HTTP 302 redirect and using the ip address and port number as the
target.

Can you post the HTML for your META REDIRECT?

Do you have any code (to your knowledge) running in Tomcat that issues a
redirect? If you do, and you don't have forward- or reverse-proxying set
up properly in IIS, Tomcat can issue an ugly redirect that might land
you in this situation.

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

iEYEARECAAYFAkuWt8kACgkQ9CaO5/Lv0PAiawCffeb4z1tvZ55fM21UgD0gZSFB
FZYAn1Qh2zyqPn4nLfjuz3hiBdH+cskx
=h2jw
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 



RE: Native mode...

2010-03-09 Thread Caldarale, Charles R
> From: Mats Eklund [mailto:mats.ekl...@yahoo.com]
> Subject: Native mode...
> 
> I'm running a webapp on Tomcat 5.5 on Windows Server 2003 and find
> statements in the log saying that the server could run faster if native
> libraries were installed.

The performance difference between using APR and the pure Java connectors 
depends largely on what you're doing.  If you have a lot of SSL traffic, APR 
will help; if you're not using SSL, you likely won't be able to tell the 
difference, and can stick with the pure Java mode.

> How can I install these libraries?

Just put the tcnative-1.dll into Tomcat's bin directory.  The DLL is available 
here:
http://apache.mirrors.timporter.net/tomcat/tomcat-connectors/native/1.1.20/binaries/win32
http://apache.mirrors.timporter.net/tomcat/tomcat-connectors/native/1.1.20/binaries/win64/x64

Choose the appropriate one for your platform.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Memory settings

2010-03-09 Thread Caldarale, Charles R
> From: Mats Eklund [mailto:mats.ekl...@yahoo.com]
> Subject: Re: Memory settings
> 
> In the Java tab I have the Java Options field with parameters such as
> "-Dcatalina.home...". So I just add another few lines to it with the "-
> Xms..." parameters?

The -Xmx and -Xms settings should be specified in the extra memory pool boxes 
provided; the others go in the regular options box.  Keep the initial and 
maximum memory pool sizes the same to avoid heap thrashing.

> And finally, when nothing is specified here, what are the defaults?

Depends on the JVM version, the mode of the JVM, and the platform you're 
running on.  Easiest just to crank up JConsole and take a look.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Native mode...

2010-03-09 Thread Mats Eklund
Hi,

I'm running a webapp on Tomcat 5.5 on Windows Server 2003 and find statements 
in the log saying that the server could run faster if native libraries were 
installed. How can I install these libraries? If I rerun the installer, will I 
get a repair option where I can opt in this library? Note: the server does not 
allow outbound internet connections.

Thanks,
Mats



  

RE: JNDI Realm question

2010-03-09 Thread Leo Donahue - PLANDEVX
I downloaded the Apache Directory Tool.  Very nice.  Much better than the ldap 
browser tool I was using.

I was able to create a search using the Filter Editor, of the Apache Directory 
Tool, that returns sAMAccounts that I wanted.

The filter:  

(&
(objectCategory=person)
(sAMAccountName=*)
(memberOf=CN=arcgisserver_reader,OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov)
)


This query returns the three user accounts with the role "arcgisserver_reader", 
which is right.

I think my issue is that I don't understand what I'm supposed to be supplying 
in the JNDI Realm, among other things.  The examples I saw in the Tomcat docs 
use something similar to what I have below, but I don't understand the purpose 
roleSearch attribute.  How does it know that I want to use the role 
"arcgisserver_reader" when it has a parameter?  It plugs in the role specified 
in the web.xml?  I know roleSearch is the filter expression for performing role 
searches, but is that what I'm doing?  I want to search for any user that 
belongs to a specific role - that's what I'm attempting anyway.

This is what I have in server.xml:

  
ldap://servername.plandev.maricopa.gov:389";
connectionName="username"
connectionPassword="password"

userSearch="(&(objectCategory=person)(sAMAccountName={0})(memberOf=CN=arcgisserver_reader,OU=Groups,OU=PLANDEV
 Dept,DC=plandev,DC=maricopa,DC=gov))"
userBase="OU=PLANDEV Dept,DC=plandev,DC=maricopa,DC=gov"
userSubtree="true"
roleBase="OU=Groups,OU=PLANDEV 
Dept,DC=plandev,DC=maricopa,DC=gov"
roleName="cn"
roleSearch="(uniqueMember={0})"

/>

This is what I have in my webapp's web.xml:


http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>

com.sun.faces.verifyObjects
false


com.sun.faces.validateXml
true


javax.faces.STATE_SAVING_METHOD
client


Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
*.jsf



30



index.jsp




samplewebapp
*.jsp
GET
POST

  
arcgisserver_reader
  
  
CONFIDENTIAL
  



BASIC
  Sample



arcgisserver_reader




This is my faces-config.xml:





http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd";>

sampleModelBean

gov.maricopa.rdsa.gis.SampleModelBean
session




The sample JSF page is really nothing, just a checkbox and a button for the 
sake of having something on the page and testing an valueChangedListener.  

When I browse to http://servername:8080/sample (this webapp has a index.jsp 
that forwards to welcome.jsp)

I get the self signed certificate warning.  I continue, then the Tomcat prompts 
for username/password.  I supply my login name without the domain part, Tomcat 
then tells me I am denied using my windows login.  

This tells me I don't have this quite right just yet.  HTTP Status 403 is the 
result and the URL changed to https://servername:8443/sample/

The logs are empty until I stop Tomcat.  After stopping Tomcat, catalina log 
now shows this exception.  Is that my problem or is my query still not right?

Mar 9, 2010 2:05:50 PM org.apache.catalina.realm.JNDIRealm authenticate
SEVERE: Exception performing authentication
javax.naming.directory.InvalidSearchFilterException: invalid escape sequence: 
[...@1dd8136; remaining name 'OU=PLANDEV Dept,DC=plandev,DC=maricopa,DC=gov'
at com.sun.jndi.ldap.Filter.unescapeFilterValue(Filter.java:216)



-Original Message-
From: Stefan Zoerner [mailto:ste...@labeo.de] 
Sent: Tuesday, March 09, 2010 6:43 AM
To: Tomcat Users List
Subject: Re: JNDI Realm question

Hi Leo,

in general I would recommend to use an LDAP tool like Apache Directory Studio 
in order to develop and verify the JNDI Realm specific parameters.

http://directory.apache.org/studio/

If this works (authentication, authorization searches), add the parameters to 
your tomcat configuration in server.xml

The userPattern attribute is in almost all cases not appropriate for Active 
Directory (AD), because the users are not organized flat in the tree there 
(check with a tool). Use a search filter instead as Felix suggested.

userSearch="(&(objectCategory=user)(sAMAccountName={0}))"

Adding objectCategory to the search filter will lead to better per

Re: Memory settings

2010-03-09 Thread Mats Eklund
Thanks a lot!

In the Java tab I have the Java Options field with parameters such as 
"-Dcatalina.home...". So I just add another few lines to it with the "-Xms..." 
parameters?

There are a few fields below that field called: initial memory pool, maximum 
memory pool, thread stack size. Should I maybe use these fields instead?

And finally, when nothing is specified here, what are the defaults? I have 
tried to find out by looking into some log files but havent found anything.

--- On Tue, 3/9/10, André Warnier  wrote:

From: André Warnier 
Subject: Re: Memory settings
To: "Tomcat Users List" 
Date: Tuesday, March 9, 2010, 9:59 PM

Mats Eklund wrote:
> Hi,
> 
> I'm using Tomcat 5.5 on Windows and am sometimes experiencing exceptions 
> thrown in my web application:
> "java.lang.OutOfMemoryError: Java heap space". I will profile my
> application to see if this can be avoided by changing the code,
> however, I'm also interested to know whether and how memory available
> to the application can be configured.
> 
Short version :
(Presuming you installed Tomcat using the "service installer",)

go to the Tomcat/bin directory and double-click the tomcat5w.exe program. This 
is a GUI allowing you, in one of the tabs, to set the JVM options used to run 
Java, which runs Tomcat.
Use the options "-Xms256m -Xmx256m" for example to set the size of the Heap at 
start to 256 MB (-Xms) and maximum size 256 MB (-Xmx).
Setting both to the same value is a bit more efficient, because it avoids the 
JVM having to keep track and resize this dynamically.

Long version :
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




  

Re: Installation differences between 6.0.24 and 5.5.28

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 3/9/2010 7:57 AM, David kerber wrote:
> André Warnier wrote:
>> Basically, if one of your hidden purposes was to investigate whether a
>> convenient tactic for the migration from 5.5 to 6.0 would be to set up
>> tomcat 6.0 so that, when tomcat 5.5 is switched off and tomcat 6.0
>> switched on, things (like your webapps located below catalina_base)
>> would just "continue working" smoothly, the recommendation is still
>> "don't".
> 
> That wasn't my conscious intent, but that is in effect what I was doing,
> and yeah, I discovered that the hard way that it won't work...

I don't mean to belabor the point, but upgrading from Tomcat 5.5 to 6.0
should have been this easy:

0. Stop Tomcat 5.5
1. Install Tomcat 6.0
2. Copy yourapp.war from Tomcat 5.5\webapps -> Tomcat 6.0\webapps
3. Start Tomcat 6.0

Here are some potential things you'd have to change:

1. Copy JDBC library from Tomcat 5.5\common\lib into Tomcat 6.0\lib
2.  port numbers in Tomcat 6.0\conf\server.xml
3. Cluster configuration in server.xml
4. Global environment entries in server.xml

Everything else should work just fine. Note that a lot of stuff from
Tomcat 5.5's server.xml isn't compatible with Tomcat 6.0 because class
names have changed, etc. so you can't simply copy your old server.xml
into your Tomcat 6.0 deployment and expect everything to work.

If you hadn't already moved your  elements from server.xml into
your webapp, then you'd have to do that, too.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuWvGYACgkQ9CaO5/Lv0PBnsgCdGALly5ksXgRtkZzZCgU1CJUs
h0EAn2GNNW7j8JEl4Soq6/Kwhgw/xi0H
=VaEE
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24
> 
> >   (Written in Objective C?)
> 
> Ha.

Don't laugh - our phones use it too.

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



RE: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: Commons DBCP in Tomcat 6.x
> 
> 
> 
> Again, as Chuck suggests, this is the long way of doing resource
> parameters. You can shove all this stuff into , now.

It's not the long way - it simply doesn't work in 5.5 and above.

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



Re: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 3/9/2010 4:02 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24
>>
>> You might get lucky if you downloaded and installed the JRE
>> directly from Sun
> 
> You can't - Sun does not supply an OS X variant, since it's an
> almost-but-not-quite sort-of-UNIX thing.

:(

>   (Written in Objective C?)

Ha.

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

iEYEARECAAYFAkuWufIACgkQ9CaO5/Lv0PBgBQCgu4dQHUezLIvkjoFqAPtjYpi/
tpEAn2NK+iUA1tzHERpp9YDttHDcGmoc
=ZnGT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dhiren,

On 3/9/2010 3:19 PM, Dhiren Bhatia wrote:
> The Resource is defined as follows in the server.xml file:

As Chuck suggests, move  from server.xml to
META-INF/context.xml in your webapp.

>  reloadable="true"
> crossContext="true">

When you move  as described above, remove both the "path" and
"docBase" attributes. "debug" does nothing, BTW.

>  type="javax.sql.DataSource" />

Specifying java.sql.DataSource as the resource type means that Tomcat
will create a org.apache.tomcat.dbcp.dbcp.BasicDataSource object. If you
want a different type of object, you'll need to specify the /factory/
for the objects as well. Check the  documentation for how to
do that.

> 

Again, as Chuck suggests, this is the long way of doing resource
parameters. You can shove all this stuff into , now.

> 
> factory
> 
> org.apache.commons.dbcp.BasicDataSourceFactory
> 

This might not work given the preference of  over
. I'm not even sure if  are used at
all... Tomcat might be ignoring them.

> 

I noticed that you didn't specify the username and password for the
connection pool, here. Instead, you have it in your code:

> import org.apache.commons.dbcp.BasicDataSource;
> 
> private static BasicDataSourceds= null;
> 
> Properties dbProps = new Properties();
> dbProps.load(new FileInputStream(dbConfFilePath));
> ds = (BasicDataSource) ctx.lookup("java:comp/env/"
> + dbProps.getProperty(RESOURCE_NAME_KEY));
> ds.setDriverClassName(dbProps.getProperty(DRIVER_KEY));
> ds.setUrl(getJdbcUrl(dbProps));
> ds.setUsername(dbProps.getProperty(USERNAME_KEY));
> ds.setPassword(dbProps.getProperty(PASSWORD_KEY));

Why bother setting the driver class, url, username, and password in your
webapp when the  element in context.xml can do it for you? You
are just making your life more difficult by doing this.

If you have a good reason to do this, let us know and we'll help you
around it. Otherwise, I'd say just use context.xml to configure your
DataSource and forget all the code you have above: just use
javax.sql.DataSource to get connections that are already connected.

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

iEYEARECAAYFAkuWuZgACgkQ9CaO5/Lv0PBj1gCgnvo863ZwGWGEjaOWMzqR66F9
u8AAnRw2ZlxplpU2+jaL6jO9qOfbexjC
=0vjq
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joshua,

On 3/9/2010 2:25 PM, Joshua Gregoire wrote:
> First, thanks for your assistance with this, I appreciate the time and
> effort.

Thanks for the thanks (mostly to others, not me just yet): as Andre'
mentions, it's always nice when the community is appreciated.

> In IIS, I setup a site with root drive on C:\inetpub\r18test2.kcc.edu
> and I created two virtual directories, 1 for the isapi dll called
> jakarta and another for the WebAdvisor2 folder in tomcat called
> WebAdvisor2.  If someone goes to http://r18test2.kcc.edu, you get the
> default doc in the C:\inetpub\r18test2.kcc.edu folder, which is where I
> put the meta redirect. However, if you type
> http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2, you get redirected,
> I'm assuming through the isapi dll, to
> http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2.  So it appeared to
> me that the isapi was working.  Does that make any sense?

Hmm. If the URL in the browser is changing, then something is issuing a
/real/ HTTP 302 redirect and using the ip address and port number as the
target.

Can you post the HTML for your META REDIRECT?

Do you have any code (to your knowledge) running in Tomcat that issues a
redirect? If you do, and you don't have forward- or reverse-proxying set
up properly in IIS, Tomcat can issue an ugly redirect that might land
you in this situation.

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

iEYEARECAAYFAkuWt8kACgkQ9CaO5/Lv0PAiawCffeb4z1tvZ55fM21UgD0gZSFB
FZYAn1Qh2zyqPn4nLfjuz3hiBdH+cskx
=h2jw
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24
> 
> You might get lucky if you downloaded and installed the JRE
> directly from Sun

You can't - Sun does not supply an OS X variant, since it's an 
almost-but-not-quite sort-of-UNIX thing.  (Written in Objective C?)

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




RE: Memory settings

2010-03-09 Thread Caldarale, Charles R
> From: Mats Eklund [mailto:mats.ekl...@yahoo.com]
> Subject: Memory settings
> 
> I'm also interested to know whether and how memory available
> to the application can be configured.

Memory isn't configured for individual webapps, it's done for the whole JVM.  
The standard settings (-Xmx, -Xms, -XX:MaxPermSize, etc.) all work with Tomcat. 
 If you're running Tomcat as a service, use the Java tab of the tomcat5w.exe 
program to set the values.  If you're running it from the .bat scripts, create 
a setenv.bat script of your own and specify the heap settings in the 
environment variable CATALINA_OPTS; Tomcat will automatically call this script 
(if it exists) when it starts.

Also read the FAQ:
http://wiki.apache.org/tomcat/FAQ/Memory

(Just substitute CATALINA_OPTS for JAVA_OPTS in the FAQ text.)

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Memory settings

2010-03-09 Thread André Warnier

Mats Eklund wrote:

Hi,

I'm using Tomcat 5.5 on Windows and am sometimes experiencing exceptions thrown 
in my web application:
"java.lang.OutOfMemoryError: Java heap space". I will profile my
application to see if this can be avoided by changing the code,
however, I'm also interested to know whether and how memory available
to the application can be configured.


Short version :
(Presuming you installed Tomcat using the "service installer",)

go to the Tomcat/bin directory and double-click the tomcat5w.exe 
program. This is a GUI allowing you, in one of the tabs, to set the JVM 
options used to run Java, which runs Tomcat.
Use the options "-Xms256m -Xmx256m" for example to set the size of the 
Heap at start to 256 MB (-Xms) and maximum size 256 MB (-Xmx).
Setting both to the same value is a bit more efficient, because it 
avoids the JVM having to keep track and resize this dynamically.


Long version :
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Malcolm,

On 3/9/2010 2:46 PM, Malcolm Warren wrote:
> In fact just after receiving this email from you I also got one from
> Apple saying that it's a bug and that they're trying to solve it.
> Sorry for the bother, and thanks again.

You might get lucky if you downloaded and installed the JRE directly
from Sun: I believe Apple's JVM is a re-packaged Sun distro, and it may
have links to some buggy libraries. If the Sun JVM ships with it's own
graphics library, you may be able to avoid this bug.

...or they both use the same buggy gfx library and you're screwed :(

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

iEYEARECAAYFAkuWtlQACgkQ9CaO5/Lv0PAgGACfT9mDWjScvhqQufeUlZVV3zSc
NJoAoKm22GnEJta9r3Z5K2C4GhYeUt2+
=DjMW
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Memory settings

2010-03-09 Thread Mats Eklund
Hi,

I'm using Tomcat 5.5 on Windows and am sometimes experiencing exceptions thrown 
in my web application:
"java.lang.OutOfMemoryError: Java heap space". I will profile my
application to see if this can be avoided by changing the code,
however, I'm also interested to know whether and how memory available
to the application can be configured.

Thanks in advance,
Mats


  

RE: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Caldarale, Charles R
> From: Dhiren Bhatia [mailto:dhiren.for...@gmail.com]
> Subject: Re: Commons DBCP in Tomcat 6.x
> 
>  reloadable="true" crossContext="true">

 elements should not be placed in server.xml:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

>  type="javax.sql.DataSource" />

To re-emphasize Konstantin's comment:

> > > Note, that you have to specify className="..." explicitly.

> 

This is completely wrong.   haven't been used in ages; you 
might try reading the documentation for the level of Tomcat you're using:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

Looks like you're following some very, very out of date documentation or 
examples.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
Will do and thanks again!!! 

>>> André Warnier  3/9/2010 2:19 PM >>>
Joshua Gregoire wrote:
> First, thanks for your assistance with this, I appreciate the time
and
> effort.
>  
No problem.  The people here are all volunteers, who try to help
because 
they like doing this.  They also do it to the limit of their abilities.

Unfortunately my abilities in terms of IIS and the isapi-redirector are

limited, because I usually work with Apache and the mod_jk redirector.
But the isapi_redirector and mod_jk are two implementations of the same

basic module, so the principles should be the same.

> It's quite possible I'm using it wrong.  

I thought so at first, but after this previous post, I think that at 
least you have got some of the ideas correctly.
Just, I think, a bit mixed up.

Me too in this case, because there is a difference in terminology 
between Microsoft/IIS (which tends to talk about "virtual directories"

and "sites"), and open-source software like Apache and Tomcat (which 
tend to talk in terms of "hosts" and "roots" and "webapps").

> In IIS, I setup a site with root drive on
C:\inetpub\r18test2.kcc.edu
> and I created two virtual directories, 1 for the isapi dll called
> jakarta and another for the WebAdvisor2 folder in tomcat called
> WebAdvisor2.
I believe that there is something wrong here.  I think that this is one

too many.

I am assuming that, in the long run, you will want some static content

(html pages, images, etc..) to be served directly by IIS, and only the

links that invoke Java servlets (or JSP pages), to be "passed through"

to Tomcat via the redirector. (You will even at some point need 3 
distinct Tomcats according to your explanation, but let's leave that
for 
later).

The basic idea of the redirector in a case like this is :
- you tell IIS which requests it needs to hand over to the redirector 
(based on some pattern in the URI), and which not.  This happens
through 
configuration instructions in IIS.
The links which are /not/ redirected, are served locally by IIS.
The links which /are/ redirected are handed over by IIS to the
redirector.
- the redirector then passes the redirected HTTP requests to Tomcat, 
over a special, private TCP/IP connection.  For that, the redirector 
needs to know where this Tomcat is (host and port).  That is the role
of 
the redirector's "workers.properties" configuration file. (The 
redirector knows each back-end Tomcat as a "worker", from there the
name).
- Tomcat receives the request, and based on the request URI, directs 
this request to one of the webapps that "run inside it".  In your case,

that is your "WebAdvisor2" webapp (a webapp is a collection of
servlets, 
and in Tomcat's parlance it is also called a "context").
- The Tomcat webapp processes the request, generates a response, and 
passes this response back to the redirector (via the special private 
TCP/IP connection).
- the redirector then passes this response back to IIS, which passes it

to the browser (through the normal HTTP connection which the browser
has 
with IIS).

The whole thing should be transparent to the user and his browser,
which 
talks only to IIS over port 80, for all requests.
So the URLs seen by the browser should always be of the form 
"http://r18test2.kcc.edu/..."; (without the :8080).
And it is IIS which should decide, if it sees a portion "/WebAdvisor2"

in the URI, to pass this request (internally) to the redirector, which

will pass it to Tomcat for processing.
The redirector normally (in the vanilla standard configuration) passes

this request to Tomcat over TCP/IP port 8009 (not 8080).
And Tomcat (in its configuration file "server.xml") configures a 
 of type "AJP", which listens on that port 8009 for such 
requests coming from the IIS redirector.

So basically, what I am saying is that there should be no need to have
a 
page on IIS which does a redirect of the browser to Tomcat.
The internal IIS+redirector configuration at the IIS level, should 
already insure that any link that looks like containing "/WebAdvisor2",

is internally redirected to Tomcat and processed by Tomcat, and that
the 
Tomcat response will come back from Tomcat through IIS and back to the

browser.

What I am also saying, is that if you see in the browser any link which

mentions port 8080, then it means that this link has not gone/is not 
going through IIS and the redirector.  It is going directly to Tomcat.

If you look in Tomcat's server.xml file, you will see that it has (at 
least) 2 's : one listening on port 8009 (for the redirector

in IIS, using a protocol called AJP); and another one listening on port

8080 for direct HTTP calls to Tomcat.
If the URL contains a ":8080", it means that this URL is "talking" 
directly to Tomcat, and not to IIS and the redirector.

So, it looks so far like you missed something in the redirector 
configuration for IIS.  Unfortunately, my ability to help there is not

so great, because I do not have a working IIS to try things with.


   If 

Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Dhiren Bhatia
The Resource is defined as follows in the server.xml file:







factory

org.apache.commons.dbcp.BasicDataSourceFactory




maxActive
100




maxIdle
30




removeAbandoned
true



removeAbandonedTimeout
60



logAbandoned
true




maxWait
1





On Tue, Mar 9, 2010 at 12:07 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Dhiren Bhatia [mailto:dhiren.for...@gmail.com]
> > Subject: Re: Commons DBCP in Tomcat 6.x
> >
> > Why is it looking for
> > org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory?
>
> For us to answer that, you need to pay attention to Konstantin's question:
>
> > > -Original Message-
> > > From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> > > Subject: Re: Commons DBCP in Tomcat 6.x
> > >
> > > 1. How is your  is defined. Please show us
> > > (remove any passwords).
> > > Note, that you have to specify className="..." explicitly.
>
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread André Warnier

Joshua Gregoire wrote:

First, thanks for your assistance with this, I appreciate the time and
effort.
 
No problem.  The people here are all volunteers, who try to help because 
they like doing this.  They also do it to the limit of their abilities. 
Unfortunately my abilities in terms of IIS and the isapi-redirector are 
limited, because I usually work with Apache and the mod_jk redirector.
But the isapi_redirector and mod_jk are two implementations of the same 
basic module, so the principles should be the same.


It's quite possible I'm using it wrong.  


I thought so at first, but after this previous post, I think that at 
least you have got some of the ideas correctly.

Just, I think, a bit mixed up.

Me too in this case, because there is a difference in terminology 
between Microsoft/IIS (which tends to talk about "virtual directories" 
and "sites"), and open-source software like Apache and Tomcat (which 
tend to talk in terms of "hosts" and "roots" and "webapps").



In IIS, I setup a site with root drive on C:\inetpub\r18test2.kcc.edu
and I created two virtual directories, 1 for the isapi dll called
jakarta and another for the WebAdvisor2 folder in tomcat called
WebAdvisor2.
I believe that there is something wrong here.  I think that this is one 
too many.


I am assuming that, in the long run, you will want some static content 
(html pages, images, etc..) to be served directly by IIS, and only the 
links that invoke Java servlets (or JSP pages), to be "passed through" 
to Tomcat via the redirector. (You will even at some point need 3 
distinct Tomcats according to your explanation, but let's leave that for 
later).


The basic idea of the redirector in a case like this is :
- you tell IIS which requests it needs to hand over to the redirector 
(based on some pattern in the URI), and which not.  This happens through 
configuration instructions in IIS.

The links which are /not/ redirected, are served locally by IIS.
The links which /are/ redirected are handed over by IIS to the redirector.
- the redirector then passes the redirected HTTP requests to Tomcat, 
over a special, private TCP/IP connection.  For that, the redirector 
needs to know where this Tomcat is (host and port).  That is the role of 
the redirector's "workers.properties" configuration file. (The 
redirector knows each back-end Tomcat as a "worker", from there the name).
- Tomcat receives the request, and based on the request URI, directs 
this request to one of the webapps that "run inside it".  In your case, 
that is your "WebAdvisor2" webapp (a webapp is a collection of servlets, 
and in Tomcat's parlance it is also called a "context").
- The Tomcat webapp processes the request, generates a response, and 
passes this response back to the redirector (via the special private 
TCP/IP connection).
- the redirector then passes this response back to IIS, which passes it 
to the browser (through the normal HTTP connection which the browser has 
with IIS).


The whole thing should be transparent to the user and his browser, which 
talks only to IIS over port 80, for all requests.
So the URLs seen by the browser should always be of the form 
"http://r18test2.kcc.edu/..."; (without the :8080).
And it is IIS which should decide, if it sees a portion "/WebAdvisor2" 
in the URI, to pass this request (internally) to the redirector, which 
will pass it to Tomcat for processing.
The redirector normally (in the vanilla standard configuration) passes 
this request to Tomcat over TCP/IP port 8009 (not 8080).
And Tomcat (in its configuration file "server.xml") configures a 
 of type "AJP", which listens on that port 8009 for such 
requests coming from the IIS redirector.


So basically, what I am saying is that there should be no need to have a 
page on IIS which does a redirect of the browser to Tomcat.
The internal IIS+redirector configuration at the IIS level, should 
already insure that any link that looks like containing "/WebAdvisor2", 
is internally redirected to Tomcat and processed by Tomcat, and that the 
Tomcat response will come back from Tomcat through IIS and back to the 
browser.


What I am also saying, is that if you see in the browser any link which 
mentions port 8080, then it means that this link has not gone/is not 
going through IIS and the redirector.  It is going directly to Tomcat.


If you look in Tomcat's server.xml file, you will see that it has (at 
least) 2 's : one listening on port 8009 (for the redirector 
in IIS, using a protocol called AJP); and another one listening on port 
8080 for direct HTTP calls to Tomcat.
If the URL contains a ":8080", it means that this URL is "talking" 
directly to Tomcat, and not to IIS and the redirector.


So, it looks so far like you missed something in the redirector 
configuration for IIS.  Unfortunately, my ability to help there is not 
so great, because I do not have a working IIS to try things with.



  If someone goes to http://r18test2.kcc.edu, you get the

default doc in th

RE: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Caldarale, Charles R
> From: Dhiren Bhatia [mailto:dhiren.for...@gmail.com]
> Subject: Re: Commons DBCP in Tomcat 6.x
> 
> Why is it looking for
> org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory?

For us to answer that, you need to pay attention to Konstantin's question:

> > -Original Message-
> > From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> > Subject: Re: Commons DBCP in Tomcat 6.x
> >
> > 1. How is your  is defined. Please show us
> > (remove any passwords).
> > Note, that you have to specify className="..." explicitly.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Malcolm Warren

Ok, thanks.

In fact just after receiving this email from you I also got one from 
Apple saying that it's a bug and that they're trying to solve it.

Sorry for the bother, and thanks again.

Malcolm

Il 09/03/10 18.25, Caldarale, Charles R ha scritto:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24

I can't be categorical, because I have never used Tomcat on an Apple
machine, but neither here nor in the attachments do I spot anything
that might be Tomcat-related.
 

It's definitely an Apple JVM problem; Tomcat is not involved.  Good luck.

  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


   


Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
First, thanks for your assistance with this, I appreciate the time and
effort.
 
It's quite possible I'm using it wrong.  
 
In IIS, I setup a site with root drive on C:\inetpub\r18test2.kcc.edu
and I created two virtual directories, 1 for the isapi dll called
jakarta and another for the WebAdvisor2 folder in tomcat called
WebAdvisor2.  If someone goes to http://r18test2.kcc.edu, you get the
default doc in the C:\inetpub\r18test2.kcc.edu folder, which is where I
put the meta redirect. However, if you type
http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2, you get redirected,
I'm assuming through the isapi dll, to
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2.  So it appeared to
me that the isapi was working.  Does that make any sense?

>>> André Warnier  3/9/2010 12:50 PM >>>
André Warnier wrote:
> Joshua Gregoire wrote:
>> r18test2.kcc.edu brings me to the root drectory of the site in IIS.
I
>> have a redirect set on the default page in IIS to go to
>> http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2  
> The url in the
>> browser then changes to
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2 
> 
> 
> The first question is then : if you are anyway redirecting everything
to 
> Tomcat, why do you need to have IIS in front ?
> Why not just set Tomcat to answer port 80, and get rid of IIS ?
> 
> The second item is :
> In the URL bar, the browser displays what its own idea is, about
where 
> it got the current page from.
> The same, just in other words : nothing which the server sends to the

> browser, is displayed in the browser's URL box.
> The same again, in yet other words : try to create a page on the
server 
> which writes something into the browser's URL bar. Or rather, don't
try, 
> because you would be losing your time : you can't.  The server does
not 
> have access to the browser's URL bar.
> 
> So, the fact that the browser's URL bar displays "10.10.11.90" is due
to 
> the fact that the browser obtains the current page from the host
named 
> "10.10.11.90".  And the one thing that can tell it to get the page
from 
> there, is the redirect response from IIS.  Concentrate on that one.
> How /exactly/ do you do this redirect from the IIS homepage to the 
> Tomcat server ?
> 
> 
Something else strikes me (and I wonder why it did not before) :
You say that you have IIS + the isapi_redirector, to connect IIS to
Tomcat.
But if you really "redirect" calls to the homepage of IIS, to Tomcat's

port 8080, you are not using the isapi redirector at all.  You are just

"bouncing off" once from the IIS homepage, and all the rest happens 
directly between the browser and Tomcat, on port 8080.
Something tells me that you are not quite using this kind of setup as
it 
is meant to be used.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
Question 1: Not sure this server will always be used for just this site.
Also, we will have three versions of this site on the server.  1 will be
production other two will be test instances.  Wasn't sure how tomcat
handled multiple sites with multiple domain names.
 
Question 2: The redirect is done with a meta refresh.
 
http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2";>

>>> André Warnier  3/9/2010 12:42 PM >>>
Joshua Gregoire wrote:
> r18test2.kcc.edu brings me to the root drectory of the site in IIS.
I
> have a redirect set on the default page in IIS to go to
> http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2  
The url in the
> browser then changes to
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2 


The first question is then : if you are anyway redirecting everything
to 
Tomcat, why do you need to have IIS in front ?
Why not just set Tomcat to answer port 80, and get rid of IIS ?

The second item is :
In the URL bar, the browser displays what its own idea is, about where

it got the current page from.
The same, just in other words : nothing which the server sends to the 
browser, is displayed in the browser's URL box.
The same again, in yet other words : try to create a page on the server

which writes something into the browser's URL bar. Or rather, don't
try, 
because you would be losing your time : you can't.  The server does not

have access to the browser's URL bar.

So, the fact that the browser's URL bar displays "10.10.11.90" is due
to 
the fact that the browser obtains the current page from the host named

"10.10.11.90".  And the one thing that can tell it to get the page from

there, is the redirect response from IIS.  Concentrate on that one.
How /exactly/ do you do this redirect from the IIS homepage to the 
Tomcat server ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 



Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Dhiren Bhatia
Here's the exception I get with the tomcat_dbcp.jar file in lib:

java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource
cannot be cast to org.apache.commons.dbcp.BasicDataSource

When I remove the tomcat_dbcp.jar file from lib, I get this exception:
javax.naming.NamingException: Could not create resource factory instance
[Root exception is java.lang.ClassNotFoundException:
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory

Why is it looking for org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory? i
would expect it to try and instantiate the BasicDataSourceFactory in the
commons dbcp package. Am I missing something?

I don't want to use the org.apache.tomcat.dbcp.dbcp.BasicDataSource class in
my code because I need my application to be independent of the server. We're
using eclipse to develop, which uses an embedded jetty, so i won't be able
to run this code while debugging in eclipse.

Here's what the code looks like:

import org.apache.commons.dbcp.BasicDataSource;

private static BasicDataSourceds= null;

Properties dbProps = new Properties();
dbProps.load(new FileInputStream(dbConfFilePath));
ds = (BasicDataSource) ctx.lookup("java:comp/env/"
+ dbProps.getProperty(RESOURCE_NAME_KEY));
ds.setDriverClassName(dbProps.getProperty(DRIVER_KEY));
ds.setUrl(getJdbcUrl(dbProps));
ds.setUsername(dbProps.getProperty(USERNAME_KEY));
ds.setPassword(dbProps.getProperty(PASSWORD_KEY));


Thanks!

On Tue, Mar 9, 2010 at 10:16 AM, Propes, Barry L wrote:

> I was initially getting this error, too, with my first install, but rebuilt
> the Tomcat collection and finally vanquished it using the factory reference
> of org.apache.tomcat.dbcp.DataSourceConnectionFactory in there, even though
> I'd initially gotten an error not being able to create the factory resource.
>
> Now I'm only getting a naming context error. If I get that fixed, I'll be
> on my way.
>
>
>
> -Original Message-
> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> Sent: Tuesday, March 09, 2010 11:38 AM
> To: Tomcat Users List
> Subject: Re: Commons DBCP in Tomcat 6.x
>
> 2010/3/9 Dhiren Bhatia :
> > Hi,
> >
> > I'm trying to use the commons DBCP package with Tomcat 6.x. I know
> > that the tomcat_dbcp.jar has the commons files renamed, however I
> > would prefer to use the commons jar files so I can use the class
> > org.apache.commons.dbcp.BasicDataSource in my code.
> >
> > To do this, I deleted the tomcat_dbcp.jar file from CATALINA_HOME/lib
> > and replaced it with the commons jar file. I assumed that the class
> > loader would pick it up like it did in the earlier version of tomcat
> > but that doesn't seem to happen. I still get an ClassCastException
> > since tomcat tries to cast the org.apache.commons.dbcp.BasicDataSource
> > to org.apache.tomcat.dbcp.dbcp.BasicDataSource.
> >
> > Is there any way I can force Tomcat 6.x to load my commons dbcp jar
> > instead of the tomcat_dbcp.jar which comes with the distro?
> >
>
> 1. How is your  is defined. Please show us (remove any
> passwords).
> Note, that you have to specify className="..." explicitly.
>
> 2. What, exactly, stack trace you are getting?
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread André Warnier

André Warnier wrote:

Joshua Gregoire wrote:

r18test2.kcc.edu brings me to the root drectory of the site in IIS. I
have a redirect set on the default page in IIS to go to
http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2  

The url in the
browser then changes to http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2 



The first question is then : if you are anyway redirecting everything to 
Tomcat, why do you need to have IIS in front ?

Why not just set Tomcat to answer port 80, and get rid of IIS ?

The second item is :
In the URL bar, the browser displays what its own idea is, about where 
it got the current page from.
The same, just in other words : nothing which the server sends to the 
browser, is displayed in the browser's URL box.
The same again, in yet other words : try to create a page on the server 
which writes something into the browser's URL bar. Or rather, don't try, 
because you would be losing your time : you can't.  The server does not 
have access to the browser's URL bar.


So, the fact that the browser's URL bar displays "10.10.11.90" is due to 
the fact that the browser obtains the current page from the host named 
"10.10.11.90".  And the one thing that can tell it to get the page from 
there, is the redirect response from IIS.  Concentrate on that one.
How /exactly/ do you do this redirect from the IIS homepage to the 
Tomcat server ?




Something else strikes me (and I wonder why it did not before) :
You say that you have IIS + the isapi_redirector, to connect IIS to Tomcat.
But if you really "redirect" calls to the homepage of IIS, to Tomcat's 
port 8080, you are not using the isapi redirector at all.  You are just 
"bouncing off" once from the IIS homepage, and all the rest happens 
directly between the browser and Tomcat, on port 8080.
Something tells me that you are not quite using this kind of setup as it 
is meant to be used.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread André Warnier

Joshua Gregoire wrote:

r18test2.kcc.edu brings me to the root drectory of the site in IIS. I
have a redirect set on the default page in IIS to go to
http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2  

The url in the
browser then changes to http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2 



The first question is then : if you are anyway redirecting everything to 
Tomcat, why do you need to have IIS in front ?

Why not just set Tomcat to answer port 80, and get rid of IIS ?

The second item is :
In the URL bar, the browser displays what its own idea is, about where 
it got the current page from.
The same, just in other words : nothing which the server sends to the 
browser, is displayed in the browser's URL box.
The same again, in yet other words : try to create a page on the server 
which writes something into the browser's URL bar. Or rather, don't try, 
because you would be losing your time : you can't.  The server does not 
have access to the browser's URL bar.


So, the fact that the browser's URL bar displays "10.10.11.90" is due to 
the fact that the browser obtains the current page from the host named 
"10.10.11.90".  And the one thing that can tell it to get the page from 
there, is the redirect response from IIS.  Concentrate on that one.
How /exactly/ do you do this redirect from the IIS homepage to the 
Tomcat server ?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: jvm exits without trace

2010-03-09 Thread André Warnier

Taylan Develioglu wrote:

Chuck, if that is true how can we explain I see only 637 busy threads on
a server that is serving 2172 clients ?


Woaw ! can you give us your trick ?



If every connection requires its own thread there should be 2172
threads.


Seriously now : when a thread is finished serving a request, there is 
still some time during which the response bytes are cascading through 
the network to the clients.
I think you need to defined "serving 2172 clients" a bit more precisely 
before you can say this, no ?





On Tue, 2010-03-09 at 16:40 +0100, Caldarale, Charles R wrote:

From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com]
Subject: RE: jvm exits without trace

where peak busy-threads used to be ~50 with APR, now it has become ~200
with JIO.

To be expected when you have unlimited keep-alives configured.  Each HTTP 
connection requires a separate thread with JIO, whereas the NIO and APR 
connectors use a single poller thread.

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Propes, Barry L
I was initially getting this error, too, with my first install, but rebuilt the 
Tomcat collection and finally vanquished it using the factory reference of 
org.apache.tomcat.dbcp.DataSourceConnectionFactory in there, even though I'd 
initially gotten an error not being able to create the factory resource.

Now I'm only getting a naming context error. If I get that fixed, I'll be on my 
way.

 

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Tuesday, March 09, 2010 11:38 AM
To: Tomcat Users List
Subject: Re: Commons DBCP in Tomcat 6.x

2010/3/9 Dhiren Bhatia :
> Hi,
>
> I'm trying to use the commons DBCP package with Tomcat 6.x. I know 
> that the tomcat_dbcp.jar has the commons files renamed, however I 
> would prefer to use the commons jar files so I can use the class 
> org.apache.commons.dbcp.BasicDataSource in my code.
>
> To do this, I deleted the tomcat_dbcp.jar file from CATALINA_HOME/lib 
> and replaced it with the commons jar file. I assumed that the class 
> loader would pick it up like it did in the earlier version of tomcat 
> but that doesn't seem to happen. I still get an ClassCastException 
> since tomcat tries to cast the org.apache.commons.dbcp.BasicDataSource 
> to org.apache.tomcat.dbcp.dbcp.BasicDataSource.
>
> Is there any way I can force Tomcat 6.x to load my commons dbcp jar 
> instead of the tomcat_dbcp.jar which comes with the distro?
>

1. How is your  is defined. Please show us (remove any passwords).
Note, that you have to specify className="..." explicitly.

2. What, exactly, stack trace you are getting?

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Adding security constraint breaks sql functionality

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert,

On 3/8/2010 1:31 PM, Robert Jacobson wrote:
> I managed to figure out a way to do it using a jdbc resource and
> sql:query and sql:update tags in a couple JSP files.

Yuck :(

> Well, the code works wonderfully when I don't have any security
> constraints on the application. However, when I try adding security
> constraints (using the same security constraints as the ROOT app), it
> stops working! To be more specific, Tomcat requires me to login to
> access the app, but the sql stuff no longer works. I reduced the problem
> code down to a simple SQL query which works w/o security constraints,
> but fails when I implement constraints.

[snip]

> However, when I add security constraints, it instead prints only (literally):
> 
> ${row.user_name} ${row.user_pass}
> And that's it!
> 
> I imagine I'm doing something wrong (well, I'm sure there's multiple
> things...) -- can someone please clue me in? I obviously do not want
> people accessing the /changepass application w/o logging in first. (BTW,
> I can post the changepass code if someone cares, but it doesn't seem
> relevant here...)
> 
> I'm not sure if it's relevant, but I'm using a different JDBC 
> Resource for server authentication and for changepass. Obviously they
> are both accessing the same database, but I wanted to make sure that
> the login process used a read-only account, and /changepass using a
> different account with UPDATE privs. The authentication resource is
> in the GlobalNamingResources, while the /changepass resource is
> defined in the webapp's context.xml.

Did you mean "jdbc/changepass"?

> 

Typo ("jdbc/chngpass")?

Does the DataSource get set correctly? Any way to check that?

> 
> SELECT * FROM users
> 
>   
> 
> 
> ${row.user_name}
> ${row.user_pass}
> 
> 

That all looks good to me. Check the documentation for : what
does it say if no results are returned and you call qryAsmts.getRows()?

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

iEYEARECAAYFAkuWiAcACgkQ9CaO5/Lv0PCYogCfbPzyzmCRKHdDEtlbjiPvHjZR
13IAoK8Z6CsTBrs+Ua7f/QPwkRDZNHsJ
=AoyZ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: jvm exits without trace

2010-03-09 Thread Caldarale, Charles R
> From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com]
> Subject: RE: jvm exits without trace
> 
> If every connection requires its own thread there should be 2172
> threads.

Only if the client *chooses* to maintain the keep-alive.  Browsers and other 
clients are free to terminate the connection any time they wish.  All the 
server can do is deny the keep-alive; it can't initiate 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.


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Konstantin Kolinko
2010/3/9 Dhiren Bhatia :
> Hi,
>
> I'm trying to use the commons DBCP package with Tomcat 6.x. I know that the
> tomcat_dbcp.jar has the commons files renamed, however I would prefer to use
> the commons jar files so I can use the class
> org.apache.commons.dbcp.BasicDataSource in my code.
>
> To do this, I deleted the tomcat_dbcp.jar file from CATALINA_HOME/lib and
> replaced it with the commons jar file. I assumed that the class loader would
> pick it up like it did in the earlier version of tomcat but that doesn't
> seem to happen. I still get an ClassCastException since tomcat tries to cast
> the org.apache.commons.dbcp.BasicDataSource to
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.
>
> Is there any way I can force Tomcat 6.x to load my commons dbcp jar instead
> of the tomcat_dbcp.jar which comes with the distro?
>

1. How is your  is defined. Please show us (remove any passwords).
Note, that you have to specify className="..." explicitly.

2. What, exactly, stack trace you are getting?

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: jvm exits without trace

2010-03-09 Thread Taylan Develioglu
Chuck, if that is true how can we explain I see only 637 busy threads on
a server that is serving 2172 clients ?

If every connection requires its own thread there should be 2172
threads.

On Tue, 2010-03-09 at 16:40 +0100, Caldarale, Charles R wrote:
> > From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com]
> > Subject: RE: jvm exits without trace
> > 
> > where peak busy-threads used to be ~50 with APR, now it has become ~200
> > with JIO.
> 
> To be expected when you have unlimited keep-alives configured.  Each HTTP 
> connection requires a separate thread with JIO, whereas the NIO and APR 
> connectors use a single poller thread.
> 
>  - 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.
> 
> 
> __
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> __



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dhiren,

On 3/9/2010 11:48 AM, Dhiren Bhatia wrote:
> I'm trying to use the commons DBCP package with Tomcat 6.x. I know that the
> tomcat_dbcp.jar has the commons files renamed, however I would prefer to use
> the commons jar files so I can use the class
> org.apache.commons.dbcp.BasicDataSource in my code.

You could also use org.apache.tomcat.dbcp.dbcp.BasicDataSource, which is
the one provided by Tomcat.

> To do this, I deleted the tomcat_dbcp.jar file from CATALINA_HOME/lib and
> replaced it with the commons jar file.

Why would you do that? Tomcat re-packages DBCP under a different package
structure precisely so that you can have both libraries installed at once.

> I assumed that the class loader would
> pick it up like it did in the earlier version of tomcat but that doesn't
> seem to happen. I still get an ClassCastException since tomcat tries to cast
> the org.apache.commons.dbcp.BasicDataSource to
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.

What's crazy is that you didn't get a ClassNotFoundException looking for
org.apache.tomcat.dbcp.dbcp.BasicDataSource.

> Is there any way I can force Tomcat 6.x to load my commons dbcp jar instead
> of the tomcat_dbcp.jar which comes with the distro?

You don't want it to load commons-dbcp.jar /instead of/
tomcat-dbcp.jar... you want it to load both.

But, that won't solve your problem: can you post the code that you use
to use BasicDataSource in your code (including imports)?

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

iEYEARECAAYFAkuWhS0ACgkQ9CaO5/Lv0PCfkQCeOw0+p5poGdFKaOr7WBaSDT3j
p8sAoI/jj5RcasUjo/1oAEAqc4uGid3P
=rneK
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Multiple SSL certificates on same server

2010-03-09 Thread Richard Huntrods

On 03/08/2010 06:46 PM, Richard Huntrods wrote:

Does anyone know if it is possible, or has anyone done this:

I have two applications running on a single server. The applications 
use different domains and URLs, so the single Tomcat instance can 
easily tell them apart. (Note: this part is currently working just fine).


https://domain1/application1
https://domain2/application2

Again, both domains point to the same static IP, and yes, it is 
possible for someone to access either application from either domain. 
Normally, that is not an issue with the clients.


However, I currently have only one SSL certificate on the server - 
this is for domain1. So if you use domain1 to access application1, 
it's all fine. The security cert comes up green and all that.


BUT - if you try and access application2 via domain2, you get the red 
security cert (wrong domain / server name). I would like to purchase a 
second certificate for the second domain, and am wondering if this can 
be done, and how one would tell Tomcat (in server.xml) to acknowledge 
the second certificate.


Currently the stuff in server.xml looks like this:

  maxThreads="150" enableLookups="false" scheme="https" 
secure="true"

  keystoreFile="./keys/.keystore" keystorePass="myPassword"
  clientAuth="false" sslProtocol="TLS" />


I have a bad feeling it's not possible, but wanted to ask anyway.

Thanks in advance.

-R


~~~

No. 


The certificate is sent and SSL negotiated prior to the server receiving the 
Host header.

~~~

Richard,

It's possible.

It doesn't appear that Tomcat or Java(SUN) support RFC 3546 just yet 
(For Server Name Indication) even though Apache httpd does. However 
Windows XP users of IE will not be able to take advantage of SNI at this 
time anyway (to further rain on your parade). Vista and greater do make 
use of SNI though. Gotta wait for XP to die I guess. :-P


End result: Multi-Domain Certificate, separate ports, separate IPs or a 
load balancer that distributes the load to an internal IP based on FQDN, 
to which you could then use X amount of different SSL certs.(This last 
bit may be a wee bit complicated)


Hope this helps

~~

Hi,


Here's an idea for you:
You can use wildcard when generating your certificate, like *.domain.com,
assuming your servers using same domain.com.

Regards,
Leon Kolchinsky


~~~
Thanks to all of you for your replies.

I fear that Jason is correct for my case.

I'm not using XP, but a Unix server OS, and my domains are radically 
different - so the wildcard cert won't work either. 


Cheers,

-R

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Commons DBCP in Tomcat 6.x

2010-03-09 Thread Mark Shifman
http://marc.info/?l=tomcat-user&m=126772163323329&w=2
This article claims you can set a startup option... but I haven't tried it.
mas

Dhiren Bhatia wrote:
> Hi,
> 
> I'm trying to use the commons DBCP package with Tomcat 6.x. I know that the
> tomcat_dbcp.jar has the commons files renamed, however I would prefer to use
> the commons jar files so I can use the class
> org.apache.commons.dbcp.BasicDataSource in my code.
> 
> To do this, I deleted the tomcat_dbcp.jar file from CATALINA_HOME/lib and
> replaced it with the commons jar file. I assumed that the class loader would
> pick it up like it did in the earlier version of tomcat but that doesn't
> seem to happen. I still get an ClassCastException since tomcat tries to cast
> the org.apache.commons.dbcp.BasicDataSource to
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.
> 
> Is there any way I can force Tomcat 6.x to load my commons dbcp jar instead
> of the tomcat_dbcp.jar which comes with the distro?
> 
> Thanks!
> Dhiren
> 

-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shif...@yale.edu

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: Nasty problem with headless mode in Tomcat 6-0-24
> 
> I can't be categorical, because I have never used Tomcat on an Apple
> machine, but neither here nor in the attachments do I spot anything
> that might be Tomcat-related.

It's definitely an Apple JVM problem; Tomcat is not involved.  Good luck.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
r18test2.kcc.edu brings me to the root drectory of the site in IIS. I
have a redirect set on the default page in IIS to go to
http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2  The url in the
browser then changes to http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2 
The uriworkermap.properties is set to /WebAdvisor2/*  
 
>>> André Warnier  3/9/2010 11:11 AM >>>
Joshua Gregoire wrote:
> Hello All,
>  
> This is my first Tomcat install, so sorry if this is a dumb
question.
>  
> Server Information
> Windows Server Standard 2008 Service Pack 2 64bit
> IIS Version 7.0.6000.16386
> Tomcat Version 6.0.24 64 bit
> Isapi_redirector 1.2.30 amd64
>  
Thank you for specifying this.

> I have my site up and running in Tomcat.  I also have IIS sending
requests to it, however, I can't get it to display the dns name.  
>  
> Example
> Type http://r18test2.kcc.edu brings up
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2? 
>  
> The site works correctly, just want it display the url
(http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2?) and not the IP. 
I'm sure I just have a configuration set wrong somewhere.  Any help or a
link to a similar post would be much appreciated!
>  
Just so that we understand exactly what is going on : /where/ does it 
bring back this address ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 



Re: Nasty problem with headless mode in Tomcat 6-0-24

2010-03-09 Thread André Warnier

Hi.

I can't be categorical, because I have never used Tomcat on an Apple 
machine, but neither here nor in the attachments do I spot anything that 
might be Tomcat-related.


If there anything which mentions Tomcat or Jakarta or Apache, please 
point it out.




Malcolm Warren wrote:
Not quite sure where to send this problem, hope you can forward this 
message to whoever can help.
I sent this problem to Apple, but I'm wondering if it might be a Tomcat 
problem. I hope it can be solved soon by somebody.


I have Mac Snow Leopard on two separate Intel machines and the same 
problem on both.

Any call that uses headless mode causes java to crash completely.

I have two separate calls that use headless, one for creating .pdfs and 
the other for measuring the size of .jpg photos.
The crash is caused by both, so the cause can't be laid at the door of a 
particular programme.


I then assumed that the problem was in Java 6, but when I installed Java 
5 in Snow Leopard, recompiled all my programmes in 1.5 and ran Tomcat 
again, the same thing happened.


Tomcat is 6.0.24
Java 5 is java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)

Java 6 is java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)

I've attached 2 crash logs, from when I was running java 5 and another 
in java 6



Hope you can help, if not, sorry for the bother.


Malcolm Warren





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat displays IP instead of DNS name

2010-03-09 Thread André Warnier

Joshua Gregoire wrote:

Hello All,
 
This is my first Tomcat install, so sorry if this is a dumb question.
 
Server Information

Windows Server Standard 2008 Service Pack 2 64bit
IIS Version 7.0.6000.16386
Tomcat Version 6.0.24 64 bit
Isapi_redirector 1.2.30 amd64
 

Thank you for specifying this.

I have my site up and running in Tomcat.  I also have IIS sending requests to it, however, I can't get it to display the dns name.  
 
Example
Type http://r18test2.kcc.edu brings up http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2? 
 
The site works correctly, just want it display the url (http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2?) and not the IP.  I'm sure I just have a configuration set wrong somewhere.  Any help or a link to a similar post would be much appreciated!
 
Just so that we understand exactly what is going on : /where/ does it 
bring back this address ?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat displays IP instead of DNS name

2010-03-09 Thread Joshua Gregoire
Hello All,
 
This is my first Tomcat install, so sorry if this is a dumb question.
 
Server Information
Windows Server Standard 2008 Service Pack 2 64bit
IIS Version 7.0.6000.16386
Tomcat Version 6.0.24 64 bit
Isapi_redirector 1.2.30 amd64
 
I have my site up and running in Tomcat.  I also have IIS sending requests to 
it, however, I can't get it to display the dns name.  
 
Example
Type http://r18test2.kcc.edu brings up 
http://10.10.11.90:8080/WebAdvisor2/WebAdvisor2? 
 
The site works correctly, just want it display the url 
(http://r18test2.kcc.edu/WebAdvisor2/WebAdvisor2?) and not the IP.  I'm sure I 
just have a configuration set wrong somewhere.  Any help or a link to a similar 
post would be much appreciated!
 
Thanks!
Joshua Gregoire
 


Commons DBCP in Tomcat 6.x

2010-03-09 Thread Dhiren Bhatia
Hi,

I'm trying to use the commons DBCP package with Tomcat 6.x. I know that the
tomcat_dbcp.jar has the commons files renamed, however I would prefer to use
the commons jar files so I can use the class
org.apache.commons.dbcp.BasicDataSource in my code.

To do this, I deleted the tomcat_dbcp.jar file from CATALINA_HOME/lib and
replaced it with the commons jar file. I assumed that the class loader would
pick it up like it did in the earlier version of tomcat but that doesn't
seem to happen. I still get an ClassCastException since tomcat tries to cast
the org.apache.commons.dbcp.BasicDataSource to
org.apache.tomcat.dbcp.dbcp.BasicDataSource.

Is there any way I can force Tomcat 6.x to load my commons dbcp jar instead
of the tomcat_dbcp.jar which comes with the distro?

Thanks!
Dhiren


Re: Unregister jdbc driver on tc shutdown

2010-03-09 Thread David kerber

Caldarale, Charles R wrote:

From: David kerber [mailto:dcker...@verizon.net]
Subject: Unregister jdbc driver on tc shutdown

I think I understand what this is telling me, but how do I unregister
the jdbc driver to prevent this warning?


java.sql.DriverManager.deregisterDriver()

http://java.sun.com/javase/6/docs/api/java/sql/DriverManager.html


That did it; thanks, Chuck.

D


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Secured photo rendering

2010-03-09 Thread André Warnier

Joseph Morgan wrote:

I think the OP is asking how to prevent an image from being cached by a 
client and, I cannot imagine there is a way if the image is to display in a 
client at all, the image is now there, and the client can do anything it 
wants...



But it should not, if the server sends the image with the appropriate 
"no caching" and/or "expires" HTTP headers.


Now how one would set such headers easily in Tomcat for static 
documents, that I don't know.

But I am sure someone on this list does know.
If that is indeed the issue..

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Intermitten issues with SSL handshake

2010-03-09 Thread Caldarale, Charles R
> From: Honey Bajaj [mailto:hbaj...@sapient.com]
> Subject: RE: Intermitten issues with SSL handshake
> 
> I need to understand why intermittently it fails to pick up the 
> alias and hence fails to deliver the certificate chain.

You'll need to discuss that with the developers of the webapp; again, Tomcat is 
not involved at all in your webapp's attempts to connect to an external server.

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Intermitten issues with SSL handshake

2010-03-09 Thread Honey Bajaj
Thanks Charles, but I need to understand why intermittently it fails to pick up 
the alias and hence fails to deliver the certificate chain. Upgrade is in our 
roadmap but it will take couple of months to propagate it to production, any 
solution or workaround to resolve this issue is highly appreciated.

Thanks

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, March 09, 2010 3:54 PM
To: Tomcat Users List
Subject: RE: Intermitten issues with SSL handshake 

> From: Honey Bajaj [mailto:hbaj...@sapient.com]
> Subject: RE: Intermitten issues with SSL handshake
> 
> Our application (hosted on tomcat5.5.9, jdk 1.6_4 using JSSE) connects
> to the external webservice.

Which means Tomcat is not involved.  It's your webapp doing the negotiation, 
not Tomcat.

> I have gone through following bug
> https://issues.apache.org/bugzilla/show_bug.cgi?id=37869.

Which is completely unrelated, since it has to do with Tomcat authenticating 
clients, not a webapp connecting to an external server that Tomcat has no 
knowledge of or interest in.

Regardless, I would strongly urge you to upgrade your Tomcat to the latest 
5.5.28, since running with a five-year old version leaves you open to all sorts 
of problems and security risks that have been fixed in the intervening period.

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Intermitten issues with SSL handshake

2010-03-09 Thread Caldarale, Charles R
> From: Honey Bajaj [mailto:hbaj...@sapient.com]
> Subject: RE: Intermitten issues with SSL handshake
> 
> Our application (hosted on tomcat5.5.9, jdk 1.6_4 using JSSE) connects
> to the external webservice.

Which means Tomcat is not involved.  It's your webapp doing the negotiation, 
not Tomcat.

> I have gone through following bug
> https://issues.apache.org/bugzilla/show_bug.cgi?id=37869.

Which is completely unrelated, since it has to do with Tomcat authenticating 
clients, not a webapp connecting to an external server that Tomcat has no 
knowledge of or interest in.

Regardless, I would strongly urge you to upgrade your Tomcat to the latest 
5.5.28, since running with a five-year old version leaves you open to all sorts 
of problems and security risks that have been fixed in the intervening period.

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Secured photo rendering

2010-03-09 Thread Joseph Morgan
Everyone is right... but... I think the OP has to better describe the need at 
hand.

-Original Message-
From: David kerber [mailto:dcker...@verizon.net] 
Sent: Tuesday, March 09, 2010 8:35 AM
To: Tomcat Users List
Subject: Re: Secured photo rendering

Caldarale, Charles R wrote:
>> From: André Warnier [mailto:a...@ice-sa.com]
>> Subject: Re: Secured photo rendering
>>
>> But it should not, if the server sends the image with the appropriate
>> "no caching" and/or "expires" HTTP headers.
> 
> The headers don't matter, since the client has the image in hand.  Browsers, 
> for example, allow a right-click to save the image, regardless of the caching 
> state.

I've seen javascript used to prevent right-clicking to save the image, 
but nothing can prevent them from taking a screen shot.


> 
>> Now how one would set such headers easily in Tomcat for static
>> documents, that I don't know.
> 
> Filters - but it won't help.
> 
>  - Chuck


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Unregister jdbc driver on tc shutdown

2010-03-09 Thread Caldarale, Charles R
> From: David kerber [mailto:dcker...@verizon.net]
> Subject: Unregister jdbc driver on tc shutdown
> 
> I think I understand what this is telling me, but how do I unregister
> the jdbc driver to prevent this warning?

java.sql.DriverManager.deregisterDriver()

http://java.sun.com/javase/6/docs/api/java/sql/DriverManager.html

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Intermitten issues with SSL handshake

2010-03-09 Thread Honey Bajaj
 Hi,

Our application (hosted on tomcat5.5.9, jdk 1.6_4 using JSSE) connects to the 
external webservice.
During SSL handshake, based on the following messages, it appears that tomcat 
is unable to send client certificate chain to the server after serverhello has 
been received but this issue happens only intermittenly.  When the ssl 
handshake is successful the only difference is that after serverhello, the 
tomcat application is able to find matching alias:  and then able to send the 
certificate chain back to the server.
I have gone through following bug   
https://issues.apache.org/bugzilla/show_bug.cgi?id=37869. Can someone kindly
confirm does it solve the same issue and if the patch can be used safely   
against tomcat 5.5.9.

*** ClientHello, TLSv1
RandomCookie: GMT: 1250752588 bytes = { 254, 18, 193, 215, 139, 30, 229, 96,
185, 57, 70, 219, 54, 117, 98, 130, 213, 225, 17, 22, 64, 7, 118, 182, 254,
230, 98, 249 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA,
TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA,
SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA,
SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
***
RMI TCP Connection(25)-xx.xx.xx.xx, WRITE: TLSv1 Handshake, length = 79
RMI TCP Connection(25)-xx.xx.xx.xx, WRITE: SSLv2 client hello message, length =
107
RMI TCP Connection(25)-xx.xx.xx.xx, READ: TLSv1 Handshake, length = 2004
*** ServerHello, TLSv1
RandomCookie: GMT: 1250752588 bytes = { 32, 129, 54, 88, 10, 214, 152, 239,
226, 206, 229, 51, 23, 45, 165, 76, 226, 119, 151, 162, 163, 223, 246, 152,
101, 48, 142, 98 }
Session ID: {75, 141, 248, 76, 232, 162, 241, 4, 153, 104, 144, 240, 141, 215,
226, 59, 0, 212, 81, 211, 191, 80, 169, 201, 226, 238, 195, 24,254, 191, 152,
80}
Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA
Compression Method: 0
***
%% Created: [Session-4, TLS_RSA_WITH_AES_128_CBC_SHA]
** TLS_RSA_WITH_AES_128_CBC_SHA
*** Certificate chain
chain [0] = [
[
Version: V3
Subject: emailaddress=supp...@xx.com, C=GB, ST=England, L=London, O=Xxx,
OU=EMP, CN=www.ws.xxx.co.uk
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

Key: Sun RSA public key, 2048 bits
modulus:
1616261119923282323342550878009975098712541966074293428196195597211737854105818613748642824004023858168734948049667286989778383425834712580421041409153030149635322356160707012168109966921529772841768679958710576427872848032555734321947625911932054688401108479827710330827366623526241982529531925630427348578485966935492826750875858284641917095253856515172583714628445763789859607442240275914167338720348233597513648311014093918006192451527281147637064354340588151350762119918367896157881721760313234874893065293087246862013258834432826237700798003598398293316362809718059187206760048006681314966988913978521585333
public exponent: 65537
Validity: [From: Wed Apr 22 01:00:00 BST 2009,
To: Sun Apr 22 00:59:59 BST 2012]
Issuer: CN=B2B Xxx, O=Xxx
SerialNumber: [ 63df7cf5 89339db0 eead9c7e d6d141ae]

Certificate Extensions: 7
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
: 13 62 DA 37 9A 42 E6 D5 A9 01 66 B9 86 18 B1 04 .b.7.Bf.
0010: 61 64 69 E6 adi.
]
]

[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
: 43 8A 4C B5 D6 60 34 F9 B2 35 AB B3 66 06 E8 82 C.L..`4..5..f...
0010: 74 D4 8A 5B t..[
]

]

[3]: ObjectId: 2.5.29.17 Criticality=false
SubjectAlternativeName [
RFC822Name: supp...@xx.com
]

[4]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[URIName: http://x.x.com/Xxxx/LatestCRL.crl]
]]

[5]: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
serverAuth
clientAuth
]

[6]: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
DigitalSignature
Key_Encipherment
]

[7]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:false
PathLen: undefined
]

]
Algorithm: [SHA1withRSA]
Signature:
: 80 9F BA 48 F9 31 37 48 8B 10 63 70 E6 CC 26 8C ...H.17H..cp..&.
0010: 53 89 02 D2 64 6F D7 C1 B9 0A D2 F5 6D EC 3C EE S...do..m.<.
0020: 6D 37 A9 E6 BB 58 D4 16 64 45 64 62 20 A2 D7 70 m7...X..dEdb ..p
0030: 1D 9C 3C 5A EA C2 B7 91 3C DB 81 5E 4B D2 37 2F .. 0040: 69 D8 CE 22 A1 
DA 88 D5 64 41 AC 82 FA 00 99 70 i.."dA.p
0050: C8 51 9A 43 78 B9 D6 43 0D 35 4D 17 36 A2 68 A4 .Q.Cx..C.5M.6.h.
0060: 37 17 1B 41 5D F9 50 D9 D5 4B 43 77 BC B5 26 E1 7..A].P..KCw..&.
0070: CE 5D 6D F7 B2 21 C5 01 A9 C7 27 D4 4A DE 82 4C .]m..!'L

]
chain [1] = [
[
Version: V3
Subject: CN=B2B Xxx, O=Xxx
Signature Algorithm: SHA1withRSA, OID = 1

RE: jvm exits without trace

2010-03-09 Thread Caldarale, Charles R
> From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com]
> Subject: RE: jvm exits without trace
> 
> where peak busy-threads used to be ~50 with APR, now it has become ~200
> with JIO.

To be expected when you have unlimited keep-alives configured.  Each HTTP 
connection requires a separate thread with JIO, whereas the NIO and APR 
connectors use a single poller thread.

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


Re: Possible issues with Jasper in latest Tomcat release (6.0.24)

2010-03-09 Thread Sai Pullabhotla
Thanks for the info, Mark. I tried the patch and it seems to working
well. I will play with it some more the next couple of days. Do you
know when the 6.0.26 with this patch will be available?

Thanks.

Regards,
Sai Pullabhotla





On Tue, Mar 9, 2010 at 8:12 AM, Mark Thomas  wrote:
> On 09/03/2010 14:08, Sai Pullabhotla wrote:
>>
>> I'm not sure if either of these are good workarounds, but would love
>> to hear from you folks.
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=48627
>
> 6.0.26 should be out shortly.
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Secured photo rendering

2010-03-09 Thread David kerber

Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Secured photo rendering

But it should not, if the server sends the image with the appropriate
"no caching" and/or "expires" HTTP headers.


The headers don't matter, since the client has the image in hand.  Browsers, 
for example, allow a right-click to save the image, regardless of the caching 
state.


I've seen javascript used to prevent right-clicking to save the image, 
but nothing can prevent them from taking a screen shot.






Now how one would set such headers easily in Tomcat for static
documents, that I don't know.


Filters - but it won't help.

 - Chuck



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Multiple SSL certificates on same server

2010-03-09 Thread Martin Gainty

Good Morning Richard

david is right
each keystore is bound to one certificate
each cert will work on only one IP, one domain and one set of credentials (the 
same credentials used for the keystore)

you may want to consider domain2 aliasing (to the working SSL connector on 
domain1) ..your hosting provider can help e.g.
http://support.hostgator.com/articles/plesk/how-to-setup-a-domain-alias-windows-dedicated

HTH
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Tue, 9 Mar 2010 08:38:40 -0500
> From: d...@cornell.edu
> To: users@tomcat.apache.org
> Subject: Re: Multiple SSL certificates on same server
> 
> On 3/8/2010 6:46 PM, Richard Huntrods wrote:
> > Does anyone know if it is possible, or has anyone done this:
> >
> > I have two applications running on a single server. The applications
> > use different domains and URLs, so the single Tomcat instance can
> > easily tell them apart. (Note: this part is currently working just fine).
> >
> > https://domain1/application1
> > https://domain2/application2
> >
> > Again, both domains point to the same static IP, and yes, it is
> > possible for someone to access either application from either domain.
> > Normally, that is not an issue with the clients.
> >
> > However, I currently have only one SSL certificate on the server -
> > this is for domain1. So if you use domain1 to access application1,
> > it's all fine. The security cert comes up green and all that.
> >
> > BUT - if you try and access application2 via domain2, you get the red
> > security cert (wrong domain / server name). I would like to purchase a
> > second certificate for the second domain, and am wondering if this can
> > be done, and how one would tell Tomcat (in server.xml) to acknowledge
> > the second certificate.
> >
> > Currently the stuff in server.xml looks like this:
> >
> >>   maxThreads="150" enableLookups="false" scheme="https"
> > secure="true"
> >   keystoreFile="./keys/.keystore" keystorePass="myPassword"
> >   clientAuth="false" sslProtocol="TLS" />
> >
> >
> > I have a bad feeling it's not possible, but wanted to ask anyway.
> >
> > Thanks in advance.
> >
> > -R
> 
> Seems like you should be able to get another certificate and have two
> Connector elements, each configured with a different ssl cert (diff.
> keystore?).  Each will also have to have an address attribute to bind it
> to a specific IP.  I've never actually ever messed with SSL on tomcat so
> you may want to look at the tomcat docs and howtos on the subject.
> 
> --David
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469227/direct/01/

Unregister jdbc driver on tc shutdown

2010-03-09 Thread David kerber
As part of my migration to tc 6.0, my testing is turning up this notice 
when I shutdown the tc service on windows server 2003:


SEVERE: A web application registered the JBDC driver 
[ianywhere.ml.jdbcodbc.IDriver] but failed to unregister it when the web 
application was stopped. To prevent a memory leak, the JDBC Driver has 
been forcibly unregistered.



I think I understand what this is telling me, but how do I unregister 
the jdbc driver to prevent this warning?


D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Possible issues with Jasper in latest Tomcat release (6.0.24)

2010-03-09 Thread Mark Thomas

On 09/03/2010 14:08, Sai Pullabhotla wrote:

I'm not sure if either of these are good workarounds, but would love
to hear from you folks.


https://issues.apache.org/bugzilla/show_bug.cgi?id=48627

6.0.26 should be out shortly.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Possible issues with Jasper in latest Tomcat release (6.0.24)

2010-03-09 Thread Sai Pullabhotla
Hello,

We have been successfully running our JSF (Java Server Faces)
application deployed to Tomcat 6.0.18. Due to some of the security
issues that were fixed in the newer versions, we are trying to upgrade
to 6.0.24. While most of the things seem to be working fine, we came
across a specific issue that appears to be a Jasper issue.

In our application we use MyFaces and Tomahawk. We widely use one of
the components from Tomahawk called, validateRegExpr. This is a JSF
validator that ensures that the user input matches a predefined
regular expression, or else, raises an error. This does not work any
more with specific regex patterns such as the one below:



Having the above line in a JSP produces a JSP compilation error with
the following message:

According to TLD or attribute directive in tag file, attribute pattern
does not accept any expressions

After doing some research, it appears to be an issue with having
backslash in the pattern. I tried to escape the backslash (with two
backslashes) and still the same error. In fact I can not even get a
text field to display a hard coded backslash. For example,

 fails to compile with the error -
"Unterminated  fails to compile with the error - "According to TLD or
attribute directive in tag file, attribute value does not accept any
expressions".

When I replace the jasper*.jar in the Tomcat with the older versions
from 6.0.18, everything seems to be working fine. However, I'm unsure
if this would cause any other issues.

Has any one else see this kind of error? Does any one know the best
workaround for this issue? The two workarounds I came with are -

1. Downgrade the jasper*.jar files
2. Update the TLDs of components to allow expressions as values by
adding the following tag to the TLD:
true

I'm not sure if either of these are good workarounds, but would love
to hear from you folks.

Regards,
Sai Pullabhotla

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Secured photo rendering

2010-03-09 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: Secured photo rendering
> 
> But it should not, if the server sends the image with the appropriate
> "no caching" and/or "expires" HTTP headers.

The headers don't matter, since the client has the image in hand.  Browsers, 
for example, allow a right-click to save the image, regardless of the caching 
state.

> Now how one would set such headers easily in Tomcat for static
> documents, that I don't know.

Filters - but it won't help.

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


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Secured photo rendering

2010-03-09 Thread Joseph Morgan
I think the OP is asking how to prevent an image from being cached by a 
client and, I cannot imagine there is a way if the image is to display in a 
client at all, the image is now there, and the client can do anything it 
wants...

Angelo... am I correct? You want to prevent the image from being cached, right?

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Monday, March 08, 2010 9:11 PM
To: Tomcat Users List
Subject: RE: Secured photo rendering


the easiest implementation would be
develop a security fence for your front end (https with secure connnector)
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

once the request is 'inside' the servlet (or listener or filter) you can 
reference 'local' folders which contain the necessary jpgs
in this scenario all the jpgs in the folder would be behind a firewall

there are more primitive means of securing (such as implementing .htaccess)
although you'll want to weigh the performance degradation if you decide to go 
this route 
http://httpd.apache.org/docs/1.3/howto/htaccess.html 

hth
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Mon, 8 Mar 2010 15:22:59 -0800
> From: angelochen...@yahoo.com.hk
> To: users@tomcat.apache.org
> Subject: Secured photo rendering
> 
> 
> Hi,
> 
> As I notice, the photo rendering usually uses file system/Apache to speed up
> displaying, a url point at a photo URL, the photo is still available even
> when the page is finished. Is there a way to show the photo only thru the
> page? somehow secure the photo? Thanks,
> 
> Angelo
> -- 
> View this message in context: 
> http://old.nabble.com/Secured-photo-rendering-tp27829228p27829228.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/201469229/direct/01/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JNDI Realm question

2010-03-09 Thread Stefan Zoerner

Hi Leo,

in general I would recommend to use an LDAP tool like Apache Directory 
Studio in order to develop and verify the JNDI Realm specific parameters.


http://directory.apache.org/studio/

If this works (authentication, authorization searches), add the 
parameters to your tomcat configuration in server.xml


The userPattern attribute is in almost all cases not appropriate for 
Active Directory (AD), because the users are not organized flat in the 
tree there (check with a tool). Use a search filter instead as Felix 
suggested.


userSearch="(&(objectCategory=user)(sAMAccountName={0}))"

Adding objectCategory to the search filter will lead to better 
performance, because it has an index in AD.


Greetings from Hamburg,
StefanZ


Leo Donahue - PLANDEVX wrote:
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm  


Using Tomcat 6.0.24 on Windows Server 2003 Standard R2 SP2

1. We use MS Active Directory, is the "uid" in the following example for userPattern the 
same as the "sAMAccountName" ?

ldap://localhost:389";
userPattern="uid={0},ou=people,dc=mycompany,dc=com"
roleBase="ou=groups,dc=mycompany,dc=com"
roleName="cn"
roleSearch="(uniqueMember={0})"
/>

2. The quick start section said to create a user account for the Tomcat user, 
if required. That is the account Tomcat uses to browse the LDAP, I understand 
that, but where is it used in the Realm? Is it the connectionName and 
connectionPassword attributes?

The way Active Directory is setup for us looks something like this:

dc=mycompany,dc=com
  ou=mydept
ou=division1
ou=division2
ou=division...n
ou=service accounts (this is where we created the tomcat user account, and 
the role accounts for the webapp)
  ou=other depts, etc.

I would like to set up the realm so that any user in any division, under "mydept" will be 
found.  Does this look right?  (aside from changing the connection url to ours)  Or do I substitue 
the sAMAccountName for "uid"?

ldap://localhost:389";
connectionName="tomcat user account name"
connectionPassword="tomcat user account pw"
userPattern="uid={0},ou=mydept,dc=mycompany,dc=com"
roleBase="ou=mydept,dc=mycompany,dc=com"
roleName="ou=service accounts,cn=ourwebapprolename,dc=mycompany,dc=com"
roleSearch="(uniqueMember={0})"
userSubtree="true"
/>

 
Leo Donahue


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Secured photo rendering

2010-03-09 Thread Joseph Morgan
Joseph Morgan wrote:
> I think the OP is asking how to prevent an image from being cached by
a client and, I cannot imagine there is a way if the image > is to
display in a client at all, the image is now there, and the client can
do anything it wants...
> 

>>But it should not, if the server sends the image with the appropriate 
>>"no caching" and/or "expires" HTTP headers.

Assuming a well behaved client...


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: jvm exits without trace

2010-03-09 Thread Taylan Develioglu
The switch is from APR to JIO. SSL practically doesn't get used.

Almost all pages served are jsp or java, very little static files are
served and keep-alive is on.

where peak busy-threads used to be ~50 with APR, now it has become ~200
with JIO.

Here are the connector definitions for reference (no executor is used):

- APR:



- JIO:




On Fri, 2010-03-05 at 19:13 +0100, Caldarale, Charles R wrote:
> > From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> > Subject: Re: jvm exits without trace
> > 
> > I thought he said he was using APR, not NIO.
> 
> He was, but IIRC, switched away from it to see if that would affect the 
> outages.  What we don't know is what was switched to - JIO or NIO.  If it's 
> JIO, there may be a lot of threads tied up handling persistent HTTP 
> connections, possibly causing heap or other resource problems.
> 
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Multiple SSL certificates on same server

2010-03-09 Thread David Smith
On 3/8/2010 6:46 PM, Richard Huntrods wrote:
> Does anyone know if it is possible, or has anyone done this:
>
> I have two applications running on a single server. The applications
> use different domains and URLs, so the single Tomcat instance can
> easily tell them apart. (Note: this part is currently working just fine).
>
> https://domain1/application1
> https://domain2/application2
>
> Again, both domains point to the same static IP, and yes, it is
> possible for someone to access either application from either domain.
> Normally, that is not an issue with the clients.
>
> However, I currently have only one SSL certificate on the server -
> this is for domain1. So if you use domain1 to access application1,
> it's all fine. The security cert comes up green and all that.
>
> BUT - if you try and access application2 via domain2, you get the red
> security cert (wrong domain / server name). I would like to purchase a
> second certificate for the second domain, and am wondering if this can
> be done, and how one would tell Tomcat (in server.xml) to acknowledge
> the second certificate.
>
> Currently the stuff in server.xml looks like this:
>
>  maxThreads="150" enableLookups="false" scheme="https"
> secure="true"
>   keystoreFile="./keys/.keystore" keystorePass="myPassword"
>   clientAuth="false" sslProtocol="TLS" />
>
>
> I have a bad feeling it's not possible, but wanted to ask anyway.
>
> Thanks in advance.
>
> -R

Seems like you should be able to get another certificate and have two
Connector elements, each configured with a different ssl cert (diff.
keystore?).  Each will also have to have an address attribute to bind it
to a specific IP.  I've never actually ever messed with SSL on tomcat so
you may want to look at the tomcat docs and howtos on the subject.

--David


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Adding security constraint breaks sql functionality

2010-03-09 Thread Robert Jacobson


Chuck wrote:

Not sure what else is going on, but the above is incorrect for your webapp - the 
context name is *not* part of the .


Oops!  You're right of course.  Thank you!  I'm a little confused as to 
why having an incorrect url-pattern would cause the SQL to fail.


About the realm-name -- I guess I don't understand what that should be. 
 I mean, the authentication still works even though it's set to "Tomcat 
Manager Application".


Below is the working web.xml:


xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

change pass demo

index.html
index.htm
index.jsp

  

  changepass Web
  /*


   app

  
  
BASIC
Tomcat Manager Application
  
  

  The role that is required to log in to app

app
  


--
Rob


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Markus Schönhaber
09.03.2010 13:25, Markus Schönhaber:

> What you could check [...]

Forgot to mention: it might be useful to increase the log-level of
Jasper's Compiler class, i. e. add
org.apache.jasper.compiler.Compiler.level=FINE
to conf/logging.properties
You should then see in Tomcat's logs whether compilation of the accessed
JSP really takes place, if so, how long it took etc.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Markus Schönhaber
09.03.2010 12:43, Alexander Skwar:

> Do you happen to have any idea, why I did not notice any impovements  
> in the 1st time load delay? Ie. why do I still have to wait 10s after  
> having deployed, before the login screen is shown for the first time?
> 
> At this point in time, the web app does not require the background  
> daemons at all. The login page is even shown, when those daemons are  
> down.

No idea.
What you could check (besides taking a look at your application to see
if it really is doing nothing that consumes time) is whether the
pre-compilation did work. In the deployed web-app you should notice a
change in web.xml, since the deployer creates additional servlet and
servlet-mapping entries. I. e. if your web-app contains a hello.jsp you
should see something like

[...]

org.apache.jsp.hello_jsp
org.apache.jsp.hello_jsp

[...]

org.apache.jsp.hello_jsp
/hello.jsp

[..]

in the web.xml generated by the deployer.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Installation differences between 6.0.24 and 5.5.28

2010-03-09 Thread David kerber

André Warnier wrote:

David Kerber wrote:
...
It turns out that the shared vs lib issue doesn't matter (at least for 
my very simple case), and SOME of the config files can be used in both 
places, but others cannot.  I didn't check all of the files in conf, 
but I did check server.xml, context.xml and web.xml, and found that 
their contents will work with both server versions (again, at least 
for my simple case) .  However, when I started looking at some of the 
other files in conf, I found major differences between the two 
versions.  So I copied all the various files from the conf folder 
under 6.0.24 into the conf folder in my catalina_base tree, and it 
immediately started working.



I just want to point out this other thread, and Chuck's last answer in it.

Best Practices for Deployment with separate Context XML file


Yes, I've been following that thread closely, because it's exactly what 
  I want to do.  According to Chuck's recommendations, it turns out 
that I've *mostly* been doing things correctly; I just screwed up the 
conversion from 5.5 to 6.0 by using the 5.5 conf folder contents (see 
below).



Basically, if one of your hidden purposes was to investigate whether a 
convenient tactic for the migration from 5.5 to 6.0 would be to set up 
tomcat 6.0 so that, when tomcat 5.5 is switched off and tomcat 6.0 
switched on, things (like your webapps located below catalina_base) 
would just "continue working" smoothly, the recommendation is still 
"don't".


That wasn't my conscious intent, but that is in effect what I was doing, 
and yeah, I discovered that the hard way that it won't work...



Even if you have now managed to make this work in your simple test case, 
there is no guarantee that somewhere down the line something else might 
not bite you.
The basic point made indirectly by the experts, is that tomcat 5.5 and 
tomcat 6.0 were not developed in a way to make this kind of 
"cooperation" or upgrade possible.  They are two independent versions, 
and there may be things that look the same, and are in the same place in 
both, but are incompatible in some devious way, and would create some 
horrible-to-find bug some time later.


However, the same webapps should work under both.
So maybe re-locating your webapps to be somewhere outside of the Tomcat 
directory structure (and "pointed to" by both Tomcat 5.5 and Tomcat 
6.0), is really what you are looking for.


Now that I have it working under 6.0, I will be removing TC 5.5 
completely; I have no need or desire for it to work under both.  I only 
went through this bastardized setup in a misguided attempt to figure out 
why my migration from 5.5 to 6.0 wasn't working.  Basically, the problem 
was that I copied too much stuff from my previous 5.5 tree; if I had not 
copied the stuff from the conf folder, it would have worked.


I do need to run multiple indpendent copies of the same webapp (for 
different customers), and I want the webapp tree to be outside of the tc 
installation tree, which is why I use the catalina_base setting (through 
catalina.base in the tomcat6w java window).  But I copied the entire 
"tomcatclients" (my name for the top-level folder) tree, including the 
conf folders under each webapp folder, and that's what messed up the 
migration.  Once I cleared out the 5.5 stuff from that folder, and 
copied in the 6.0 stuff from the tc 6.0 installation folder, things 
started working.


Thanks!
D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JNDI Realm question

2010-03-09 Thread Felix Schumacher
Hi Leo,

On Mon, 8 Mar 2010 14:11:50 -0700, Leo Donahue - PLANDEVX
 wrote:
> http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm
>  
> 
> Using Tomcat 6.0.24 on Windows Server 2003 Standard R2 SP2
> 
> 1. We use MS Active Directory, is the "uid" in the following example for
> userPattern the same as the "sAMAccountName" ?
"uid" is just an attribute like "sAMAccounName". So if your userid's are 
represented by "sAMAccountName" you can use it.

> 
>connectionURL="ldap://localhost:389";
>   userPattern="uid={0},ou=people,dc=mycompany,dc=com"
>   roleBase="ou=groups,dc=mycompany,dc=com"
>   roleName="cn"
>   roleSearch="(uniqueMember={0})"
> />
> 
> 2. The quick start section said to create a user account for the Tomcat
> user, if required. That is the account Tomcat uses to browse the LDAP, I
> understand that, but where is it used in the Realm? Is it the
> connectionName and connectionPassword attributes?
Yes, those two attributes are used to tell the realm to bind to the
server. 
This is needed if you don't have anonymous access enabled in your LDAP
server.
> 
> The way Active Directory is setup for us looks something like this:
> 
> dc=mycompany,dc=com
>   ou=mydept
> ou=division1
> ou=division2
> ou=division...n
> ou=service accounts (this is where we created the tomcat user
account,
> and the role accounts for the webapp)
>   ou=other depts, etc.
> 
> I would like to set up the realm so that any user in any division, under
> "mydept" will be found.  Does this look right?  (aside from changing the
> connection url to ours)  Or do I substitue the sAMAccountName for "uid"?
> 
>connectionURL="ldap://localhost:389";
>   connectionName="tomcat user account name"
>   connectionPassword="tomcat user account pw"
>   userPattern="uid={0},ou=mydept,dc=mycompany,dc=com"
>   roleBase="ou=mydept,dc=mycompany,dc=com"
>   roleName="ou=service accounts,cn=ourwebapprolename,dc=mycompany,dc=com"
>   roleSearch="(uniqueMember={0})"
>   userSubtree="true"
> />
I think you will want to try 
  userSearch="sAMAccountName={0}"
  userBase="ou=mydept,dc=mycompany,dc=com"
  userSubtree="true"
instead of "userPattern=...". Using this JNDIRealm will do a subtree
search with 
"ou=mydept,dc=mycompany,dc=com" as base and "sAMAccountName=USERNAME" as
filter.

Minor note: I think, that if you have a relatively new tomcat than the
debug="99"
statement will be ignored.

Bye
 Felix
> 
>  
> Leo Donahue
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Alexander Skwar

Hello!

Thanks a lot for the conformation.

Do you happen to have any idea, why I did not notice any impovements  
in the 1st time load delay? Ie. why do I still have to wait 10s after  
having deployed, before the login screen is shown for the first time?


At this point in time, the web app does not require the background  
daemons at all. The login page is even shown, when those daemons are  
down.


Best regards,

Alexander

Am 09.03.2010 um 10:54 schrieb Markus Schönhaber e>:



09.03.2010 10:25, Alexander Skwar:

I didn't look at your build script, just a general remark below.

Or is it just, that this shows, that our web app doesn't have a  
bottleneck

in the "JSP land" (which would be a true statement - it communicates
with some background databases and apps, which might not be the
fastest...)?

One thing which confuses me a bit though, is that when I call the web
app for the first time (after deployment or after having re-started  
Tomcat),
the web app is "slow". Ie. I go to http://server:8080/webapp and  
wait for

like 10 seconds until the login screen of the web app is shown. This
wait only happens for the very first time after deployment. When I do
this again a few minutes/hours later, http://server:8080/webapp is  
shown

right away.

Shouldn't pre-compilation also make this first time wait go away?


Not "also" - the *only* gain that can be expected by pre-compilation  
of

JSPs is the elimination of the first time wait, since Tomcat doesn't
need to do the compilation on-the-fly when the JSP is accessed for the
first time. For all following accesses of the JSP it shouldn't matter
whether or not it was pre-compiled.
But: a noticeable difference can only be expected if it really is the
compilation that slows things down on first access. If, OTOH, the vast
amount of time is taken by, say, creation of DB connections,
pre-compiling the JSPs won't make much of a difference.

--
Regards
 mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Secured photo rendering

2010-03-09 Thread André Warnier

David kerber wrote:

Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Secured photo rendering

But it should not, if the server sends the image with the appropriate
"no caching" and/or "expires" HTTP headers.


The headers don't matter, since the client has the image in hand.  
Browsers, for example, allow a right-click to save the image, 
regardless of the caching state.


I've seen javascript used to prevent right-clicking to save the image, 
but nothing can prevent them from taking a screen shot.






Now how one would set such headers easily in Tomcat for static
documents, that I don't know.


Filters - but it won't help.


Ok guys, I may have misunderstood the issue.
I agree that nothing will help, to stop a client doing anything it wants 
with anything that your server has already sent to it.
That's a basic truth for anything www-wise (which hasn't stopped people 
spending fortunes to try and prove the opposite).
But I (mis?-)understood the issue as being that the OP wanted to force 
browsers to reload some images from the server each time, and not use a 
(possibly stale) cached copy.

In that case, the HTTP headers should help.
Of course, only with well-behaved browsers.
But hey, even IE is getting better with time.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Markus Schönhaber
09.03.2010 10:25, Alexander Skwar:

I didn't look at your build script, just a general remark below.

> Or is it just, that this shows, that our web app doesn't have a bottleneck
> in the "JSP land" (which would be a true statement - it communicates
> with some background databases and apps, which might not be the
> fastest...)?
> 
> One thing which confuses me a bit though, is that when I call the web
> app for the first time (after deployment or after having re-started Tomcat),
> the web app is "slow". Ie. I go to http://server:8080/webapp and wait for
> like 10 seconds until the login screen of the web app is shown. This
> wait only happens for the very first time after deployment. When I do
> this again a few minutes/hours later, http://server:8080/webapp is shown
> right away.
> 
> Shouldn't pre-compilation also make this first time wait go away?

Not "also" - the *only* gain that can be expected by pre-compilation of
JSPs is the elimination of the first time wait, since Tomcat doesn't
need to do the compilation on-the-fly when the JSP is accessed for the
first time. For all following accesses of the JSP it shouldn't matter
whether or not it was pre-compiled.
But: a noticeable difference can only be expected if it really is the
compilation that slows things down on first access. If, OTOH, the vast
amount of time is taken by, say, creation of DB connections,
pre-compiling the JSPs won't make much of a difference.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SV: Icons ?

2010-03-09 Thread Mark Thomas

On 09/03/2010 08:11, Ashika Umanga Umagiliya wrote:

Thanks Søren for the tip,

But what are  and  elements functionality ?


That is defined in the Servlet spec - recommended reading (some would 
say mandatory reading) for people writing web applications.


Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



No gain after pre-compilation

2010-03-09 Thread Alexander Skwar
Hello.

In the Tomcat 6.0 Jasper documentation at

or , I read that the most performance gain can be
achieved by pre-compiling the JSPs. Because of that, I simply gave that
a try and can't find much of a gain at all.

I used Ant 1.8.0 with Java 1.6.0_18 and the build.xml script at
http://pastebin.ca/1828486
We're doing around the clock "performance measurements", where some
Watir based script runs a browser and calls pre-defined pages and tasks
in the web app. We measure, how long this takes. Please see
http://goo.gl/cokf for a graph showing this. "Yesterday", at about 16:00,
I installed the pre-compiled web app. There's no (visible) change in the
measurements to be found.

Did I do something wrong? Was the build.xml not good (enough)? I invoked
it with:

   tomcat_home=/usr/share/tomcat
   webapp_path=/var/webapp
   ant "-Dtomcat.home=$tomcat_home" "-Dwebapp.path=$webapp_path"

Or is it just, that this shows, that our web app doesn't have a bottleneck
in the "JSP land" (which would be a true statement - it communicates
with some background databases and apps, which might not be the
fastest...)?

One thing which confuses me a bit though, is that when I call the web
app for the first time (after deployment or after having re-started Tomcat),
the web app is "slow". Ie. I go to http://server:8080/webapp and wait for
like 10 seconds until the login screen of the web app is shown. This
wait only happens for the very first time after deployment. When I do
this again a few minutes/hours later, http://server:8080/webapp is shown
right away.

Shouldn't pre-compilation also make this first time wait go away?

Thanks a lot,

Alexander

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SV: SV: Icons ?

2010-03-09 Thread Søren Blidorf
Never used them. I think they can be used in the manager.

Like the display name is shown in the manager!!!

Søren

-Oprindelig meddelelse-
Fra: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
Sendt: 9. marts 2010 09:11
Til: Tomcat Users List
Emne: Re: SV: Icons ?

Thanks Søren for the tip,

But what are  and  elements functionality ?

regards

Søren Blidorf wrote:
> It's not a favicon. Like in the addressbar. If that's what you mean.
>
> For that use  on your
webpage.
>
> Søren
>
> -Oprindelig meddelelse-
> Fra: Mark Thomas [mailto:ma...@apache.org] 
> Sendt: 9. marts 2010 08:45
> Til: Tomcat Users List
> Emne: Re: Icons ?
>
> On 09/03/2010 01:36, Ashika Umanga Umagiliya wrote:
>   
>> Greetings friends,
>>
>> Has the icon usage feature implemented in Tomcat :
>>
>> 
>> /icons/small-icon.gif
>> /icons/large-icon.ico
>> 
>>
>> This wont show any icon in my browser?
>> 
>
> Where are you expecting them to show up?
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Installation differences between 6.0.24 and 5.5.28

2010-03-09 Thread André Warnier

David Kerber wrote:
...
It turns out that the shared vs lib issue doesn't matter (at least for 
my very simple case), and SOME of the config files can be used in both 
places, but others cannot.  I didn't check all of the files in conf, but 
I did check server.xml, context.xml and web.xml, and found that their 
contents will work with both server versions (again, at least for my 
simple case) .  However, when I started looking at some of the other 
files in conf, I found major differences between the two versions.  So I 
copied all the various files from the conf folder under 6.0.24 into the 
conf folder in my catalina_base tree, and it immediately started working.



I just want to point out this other thread, and Chuck's last answer in it.

Best Practices for Deployment with separate Context XML file

Basically, if one of your hidden purposes was to investigate whether a 
convenient tactic for the migration from 5.5 to 6.0 would be to set up 
tomcat 6.0 so that, when tomcat 5.5 is switched off and tomcat 6.0 
switched on, things (like your webapps located below catalina_base) 
would just "continue working" smoothly, the recommendation is still 
"don't".
Even if you have now managed to make this work in your simple test case, 
there is no guarantee that somewhere down the line something else might 
not bite you.
The basic point made indirectly by the experts, is that tomcat 5.5 and 
tomcat 6.0 were not developed in a way to make this kind of 
"cooperation" or upgrade possible.  They are two independent versions, 
and there may be things that look the same, and are in the same place in 
both, but are incompatible in some devious way, and would create some 
horrible-to-find bug some time later.


However, the same webapps should work under both.
So maybe re-locating your webapps to be somewhere outside of the Tomcat 
directory structure (and "pointed to" by both Tomcat 5.5 and Tomcat 
6.0), is really what you are looking for.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SV: Icons ?

2010-03-09 Thread Ashika Umanga Umagiliya

Thanks Søren for the tip,

But what are  and  elements functionality ?

regards

Søren Blidorf wrote:

It's not a favicon. Like in the addressbar. If that's what you mean.

For that use  on your webpage.

Søren

-Oprindelig meddelelse-
Fra: Mark Thomas [mailto:ma...@apache.org] 
Sendt: 9. marts 2010 08:45

Til: Tomcat Users List
Emne: Re: Icons ?

On 09/03/2010 01:36, Ashika Umanga Umagiliya wrote:
  

Greetings friends,

Has the icon usage feature implemented in Tomcat :


/icons/small-icon.gif
/icons/large-icon.ico


This wont show any icon in my browser?



Where are you expecting them to show up?

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org