Re: EL 2.2 in Tomcat 7 RC1/RC2 does not fully support method invocation, such as #{helloWorldController.doSomething(helloWorldModel)}

2010-06-30 Thread Mark Thomas

On 29/06/2010 22:32, Mark Thomas wrote:

On 21/06/2010 15:16, John Wu wrote:


Hi Mark,

I just got a chance to test it on the Beta release. It's still broken,
with
a slightly different exception message.


Confirmed. I'm pretty sure JSF is doing the right thing here and that I
need to read the spec more carefully. I'll post an update when I have a
fix.


It looks like we are going to have to go with your original proposal. I 
was trying to avoid the complexity it adds but I can't see a way around it.


There is minor tweak to your suggested algorithm I intend making:


My suggestion as to the solution of resolving which method to call:
. Retrieve all methods of *theClassInstance*, and put them into the
CANDIDATES collection;

// Search a match by method name
. For each method in CANDIDATES,
. if the name is not *theMethod*, remove it from CANDIDATES
. If CANDIDATES is empty, then NOT-FOUND;
. else if only one is left, then FOUND;

// Search a match by params count
. else, count the number of actual params,
. For each method in CANDIDATES,
. if the number of formal params does not match that of actual params,
remove it from CANDIDATES
. // Optoional, handle cases of method has variable number of
arguments
. If CANDIDATES is empty, then NOT-FOUND;
. else if only one is left, then FOUND;

// Search a match by param types
. else, evaluate all actual params;
. For each method in CANDIDATES,
. if NOT( for-each formalParamType.isAssignableFrom(actualParamType)
),
remove it from CANDIDATES
. // Optoional, handle cases of method has variable number of
arguments
. If CANDIDATES is empty, then NOT-FOUND;
. else if only one is left, then FOUND;


else if exactly one CANDIDATE has more formal parameters that exactly 
match the types of the actual parameters than all other CANDIDATES, then 
FOUND;



. else, AMBIGUOUS


Mark

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



Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares

Hi everybody,

I have been running Tomcat on production for a few years with no problem 
but now, after moving to a new company, I am completely unable to get 
session stickyness working.


The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter 
what I do, I can not get Apache to always send the requests to the 
Tomcat specified in the jsession.


Firebug indicates that the JSESSIONID cookie is being set as it should 
but it still sees requests going to the other server. I have also tried 
changing the jvmRoute to exactly match the worker name for mod_jk but it 
still doesn't work.


I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is 
active at any given time. httpd.conf is the standard one from the CentOS 
RPM.


Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
Order deny,allow
Allow from all

BalancerMember http://app01:8080 route=pub-app01
BalancerMember http://app02:8080 route=pub-app02
BalancerMember http://app03:8080 route=pub-app03
BalancerMember http://app04:8080 route=pub-app04
BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^/$ /appname/ [R]
RewriteRule ^$ /appname/ [R]

Location /
AuthType Basic
AuthName Please enter your details
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://public_web_cluster/ 
stickysession=JSESSIONID lbmethod=byrequests

ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^$ /myapp [R]
RewriteRule ^/$ /myapp [R]

Location /
AuthType Basic
AuthName Please enter your details
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1

virtual.conf
---

VirtualHost 10.1.2.1:80
DocumentRoot /var/www/html
ServerName www.myserver.com

   JkMount /myapp/* pub-lb

Location /
AuthType Basic
AuthName Please enter your details
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

/Location
/VirtualHost

--

Thanks in advance.

Gabriel




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



FormAuthenticator exception with non-latin (UTF8) user name

2010-06-30 Thread Chris Rafferty
Hi,

 

I'm getting the following exception when I try to access the list of
deployed webservices (http://localhost:8080/manager/list) with a user who
has non-Latin characters in their user name:

 

java.lang.NullPointerException

org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormA
uthenticator.java:321)

 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent
icator.java:245)

 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:523)

 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)

 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:588)

 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

java.lang.Thread.run(Thread.java:619)

 

I'm running Tomcat and the browser (Firefox) all on my development PC with
Windows XP,  I've tried the same scenario, with the same results, on the
following Tomcat versions 5.5.23, 5.5.29 and 6.0.26 all on Java 1.6.0_12.  

 

My username and passwords are stored in a Postgres database and I have the
realm configured to access my database and tables in my server.xml, thus:

 

  Realm  className=org.apache.catalina.realm.JDBCRealm

 driverName=org.postgresql.Driver

  connectionURL=jdbc:postgresql://localhost/uca

 connectionName=blah connectionPassword=blah

  userTable=mg_users userNameCol=username
userCredCol=password

  userRoleTable=mg_roles roleNameCol=role /

 

This only occurs when I add the following valve to /conf/context.xml

 

Valve className=org.apache.catalina.authenticator.FormAuthenticator
characterEncoding=UTF-8 /

 

If I do not add the valve then Tomcat will not authenticate any attempt to
access the list page with a user name containing non-Latin characters, it
works perfectly if the user name contains only Latin characters.   Rationale
behind this approach:  my application consisting of a number of war files,
an html page and some jsp pages.   A user logs in via a html page which is
submitted as a form.  Now this works correctly for non-Latin characters when
I configure the context.xml in the application's META-INF directory with the
same valve, hence why I was trying to set it for all applications in the
hope that this would allow the manager list to be retrieved.   If I
explicitly set the valve just for the manager application I get the same
exception. 

 

Any pointers to what I'm doing wrong would be greatly appreciated. 

 

Chris Rafferty

Team Leader, Sidonis

 

e:  mailto:carol.hopper...@sidonis.com chris.raffe...@sidonis.com

w:  http://www.sidonis.com/ www.sidonis.com

 



RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Ockleford Paul (NHS Connecting for Health)
I'm not sure if this is what you are looking for but I just checked how our 
stuff is set up here and wondered if you have the jvm route mapped in the 
server xml for the tomcat instances you want loadbalanced?

Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1

virtual.conf
---

VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com

JkMount /myapp/* pub-lb

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile 

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

Hello gabriel

I think you should have the following in your configuration:

in de workers definition something like

worker.pub-app01.domain=pub-app01-jvm


and in your tomcat server.xml

Engine name=Catalina defaultHost=localhost jvmRoute=pub-app01-jvm




regards

Milko Emmerig

   
 Gabriel Tabares   
 gabriel.tabares@ 
 roboreus.com  To
   users@tomcat.apache.org 
 30-06-2010 12:16   cc
   
   Subject
 Please respond to Hello and Tomcat issues with sticky
   Tomcat Users   sessions
   List   
 us...@tomcat.apa 
 che.org  
   
   
   




Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01

RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

you beat me to it I think

regards

Milko Emmerig

   
 Ockleford Paul   
 (NHS Connecting   
 for Health)   To
 paul.ocklef...@n Tomcat Users List   
 hs.net   users@tomcat.apache.org   
cc
 30-06-2010 12:31  
   Subject
   RE: Hello and Tomcat issues with
 Please respond to sticky sessions 
   Tomcat Users   
   List   
 us...@tomcat.apa 
 che.org  
   
   




I'm not sure if this is what you are looking for but I just checked how our
stuff is set up here and wondered if you have the jvm route mapped in the
server xml for the tomcat instances you want loadbalanced?

Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile 

RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Ockleford Paul (NHS Connecting for Health)
Yes sorry! Slow morning here today.. :)

From: M.H.G. Emmerig [mailto:m.h.g.emme...@dnb.nl]
Sent: 30 June 2010 11:33
To: Tomcat Users List
Subject: RE: Hello and Tomcat issues with sticky sessions


you beat me to it I think

regards

Milko Emmerig

Ockleford Paul (NHS Connecting for Health) paul.ocklef...@nhs.net

30-06-2010 12:31
Please respond to
Tomcat Users List users@tomcat.apache.org



To


Tomcat Users List users@tomcat.apache.org


cc




Subject


RE: Hello and Tomcat issues with sticky sessions








I'm not sure if this is what you are looking for but I just checked how our 
stuff is set up here and wondered if you have the jvm route mapped in the 
server xml for the tomcat instances you want loadbalanced?

Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
Order deny,allow
Allow from all

BalancerMember http://app01:8080 route=pub-app01
BalancerMember http://app02:8080 route=pub-app02
BalancerMember http://app03:8080 route=pub-app03
BalancerMember http://app04:8080 route=pub-app04
BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^/$ /appname/ [R]
RewriteRule ^$ /appname/ [R]

Location /
AuthType Basic
AuthName Please enter your details
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^$ /myapp [R]
RewriteRule ^/$ /myapp [R]

Location /
AuthType Basic
AuthName Please enter your details
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares
I'm not sure if this is what you are looking for but I just checked how 
our stuff is set up here and wondered if you have the jvm route mapped 
in the server xml for the tomcat instances you want loadbalanced?

Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

Paul

   


Sorry if it wasn't clear on my original message, they already have the 
jvmRoute set:


Engine name=Catalina defaultHost=localhost jvmRoute=pub-app01 
for the first, server
Engine name=Catalina defaultHost=localhost jvmRoute=pub-app02  
for the second, etc.





-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) -  Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
  Order deny,allow
  Allow from all

  BalancerMember http://app01:8080 route=pub-app01
  BalancerMember http://app02:8080 route=pub-app02
  BalancerMember http://app03:8080 route=pub-app03
  BalancerMember http://app04:8080 route=pub-app04
  BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
  DocumentRoot /var/www/html
  ServerName www.myserver.com
  ServerAlias myserver.com

  RewriteEngine On
  RewriteRule ^/$ /appname/ [R]
  RewriteRule ^$ /appname/ [R]

Location /
  AuthType Basic
  AuthName Please enter your details
  AuthUserFile /etc/httpd/conf.d/htpasswd
  Require valid-user

  ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
  ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
  DocumentRoot /var/www/html
  ServerName www.myserver.com
  ServerAlias myserver.com

  RewriteEngine On
  RewriteRule ^$ /myapp [R]
  RewriteRule ^/$ /myapp [R]

Location /
  AuthType Basic
  AuthName Please enter your details
  AuthUserFile /etc/httpd/conf.d/htpasswd
  Require valid-user

  ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
  ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

Gabriel

have you also set de directive in de workers.properties I suggested?

in your case that should look like

worker.pub-app01.domain=pub-app01
etc

Milko



   
 Gabriel Tabares   
 gabriel.tabares@ 
 roboreus.com  To
   users@tomcat.apache.org 
 30-06-2010 12:41   cc
   
   Subject
 Please respond to Re: Hello and Tomcat issues with
   Tomcat Users   sticky sessions 
   List   
 us...@tomcat.apa 
 che.org  
   
   
   




I'm not sure if this is what you are looking for but I just checked how
our stuff is set up here and wondered if you have the jvm route mapped
in the server xml for the tomcat instances you want loadbalanced?
 Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

 Paul



Sorry if it wasn't clear on my original message, they already have the
jvmRoute set:

Engine name=Catalina defaultHost=localhost jvmRoute=pub-app01
for the first, server
Engine name=Catalina defaultHost=localhost jvmRoute=pub-app02
for the second, etc.



 -Original Message-
 From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
 Sent: 30 June 2010 11:17
 To: users@tomcat.apache.org
 Subject: Hello and Tomcat issues with sticky sessions

 Hi everybody,

 I have been running Tomcat on production for a few years with no problem
 but now, after moving to a new company, I am completely unable to get
 session stickyness working.

 The setup is as follows:

 Apache 2.2.3 (CentOS 5.4 version) -  Tomcat 6.0.24.

 I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
 what I do, I can not get Apache to always send the requests to the
 Tomcat specified in the jsession.

 Firebug indicates that the JSESSIONID cookie is being set as it should
 but it still sees requests going to the other server. I have also tried
 changing the jvmRoute to exactly match the worker name for mod_jk but it
 still doesn't work.

 I would appreciate any help, as I am stuck.

 Here are the configurations I have tried. Obviously, only of them is
 active at any given time. httpd.conf is the standard one from the CentOS
 RPM.

 Tomcats:

 All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

 mod_proxy
 
 proxy.conf
 ---

 LoadModule proxy_module modules/mod_proxy.so
 LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
 LoadModule proxy_http_module modules/mod_proxy_http.so

 ProxyRequests Off

 Proxy balancer://public_web_cluster
   Order deny,allow
   Allow from all

   BalancerMember http://app01:8080 route=pub-app01
   BalancerMember http://app02:8080 route=pub-app02
   BalancerMember http://app03:8080 route=pub-app03
   BalancerMember http://app04:8080 route=pub-app04
   BalancerMember http://app05:8080 route=pub-app05
 /Proxy

 virtual.conf
 
 LogLevel Debug

 VirtualHost 10.1.2.1:80
   DocumentRoot /var/www/html
   ServerName www.myserver.com
   ServerAlias myserver.com

   RewriteEngine On
   RewriteRule ^/$ /appname/ [R]
   RewriteRule ^$ /appname/ [R]

 Location /
   AuthType Basic
   AuthName Please enter your details
   AuthUserFile /etc/httpd/conf.d/htpasswd
   Require valid-user

   ProxyPass balancer://public_web_cluster/
 stickysession=JSESSIONID lbmethod=byrequests
   ProxyPassReverse balancer://public_web_cluster/
 /Location
 /VirtualHost

 mod_ajp_proxy
 ===

 mod_proxy_ajp.conf
 --

 LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

 Proxy balancer://pubLB
 BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
 BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
 BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
 BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
 BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
 /Proxy

 virtual.conf
 ---
 ProxyRequests Off
 VirtualHost 10.1.2.1:80
   DocumentRoot /var/www/html
   ServerName www.myserver.com
   ServerAlias myserver.com

   RewriteEngine On
   RewriteRule ^$ /myapp [R]
   RewriteRule ^/$ /myapp 

Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović
Pid said on 29.6.2010 23:20:
 On 29/06/2010 19:29, Konstantin Kolinko wrote:
 2010/6/29 Caldarale, Charles Rchuck.caldar...@unisys.com:
 From: Tomislav Petrović [mailto:t.petro...@inet.hr]
 Subject: Re: Webapp reloading issue and intermittent 404 errors

 org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)

 IIRC, you are not the first person to report an exception at this spot in 
 the code.  (Unfortunately, I can't locate the other thread at the moment, 
 but it was fairly recent.)

 That was
 https://issues.apache.org/bugzilla/show_bug.cgi?id=49488

   The code in question has been run through many test cases, inside and 
 outside of Tomcat, and does not appear to contain any errors (although it 
 could be slightly more efficient).
 
 Weird.  I couldn't find that in bugzilla.  Anyhow, it's Windows this
 time too.
 
 
 Tomislav: where is the Tomcat installation on the filing system, and
 where are the webapps being deployed from, if not tomcat/webapps?
 
 What type of filing system is it?
 
 
 Also, did you manage to get hold of the config files yet?

Good news is when I put reloadable=false on context problem (both of them, 
intermittent 404 too) went away, so I have workaround. Bad news is server is 
going into production so no messing with it no more.

Yes, this is same bug as one in bugzilla, don't know if what triggered is same.

Here is detailed info (my first suspect is Resources in server.xml but this 
is only my guess.

Tomcat is Apache Tomcat/6.0.24, running without tcnative-1.dll

Java version is: 1.6 update 18

Windows version: 2003 SP2 (32 bit)

NTFS file system is used, Tomcat is installed in D:\Program Files\Apache 
Software Foundation\Tomcat 6.0 folder, webapp is in D:\Program Files\Apache 
Software Foundation\Tomcat 6.0\webapps\some_name folder.

This is content of server.xml, I believe that all other conf files are at their 
default values (except for pwd in users file), feel free to ask for any other 
conf file.

?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=SHUTDOWN

  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
Resource name=jdbc/SomeDB auth=Container type=javax.sql.DataSource 
  maxActive=48
  maxIdle=10
  maxWait=1
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  username=auser
  password=*
  
url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName;loginTimeout=5
  removeAbandoned=true
  removeAbandonedTimeout=60
  logAbandoned=true
  validationQuery=SELECT 1/
Resource name=jdbc/SomeDB2 auth=Container type=javax.sql.DataSource 
  maxActive=48
  maxIdle=10
  maxWait=1
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  username=auser2
  password=**
  url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName2
  removeAbandoned=true
  removeAbandonedTimeout=60
  logAbandoned=true
  validationQuery=SELECT 1/

  /GlobalNamingResources

  Service name=Catalina
  
Connector port=8080 protocol=HTTP/1.1 
   connectionTimeout=2 
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/

  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs  
   prefix=localhost_access_log. suffix=.txt pattern=common 
resolveHosts=false/

  Context path=/some_webapp docBase=/some_webapp debug=0 
reloadable=true crossContext=true
ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB 
type=javax.sql.DataSource /
ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2 
type=javax.sql.DataSource /
/Context
  /Host
/Engine
  /Service
/Server

Let me know if I can provide any more info or update 

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Pid
On 30/06/2010 11:33, M.H.G. Emmerig wrote:
 you beat me to it I think
 
 regards
 
 Milko Emmerig

 I'm not sure if this is what you are looking for but I just checked how
 our stuff is set up here and wondered if you have the jvm route mapped
 in the server xml for the tomcat instances you want loadbalanced?
 
 Engine jvmRoute=route_7 name=Catalina defaultHost=localhost
 
 Paul
 

 Tomcats:
 
 All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.
 
 mod_proxy
 
 proxy.conf
 ---
 

 
 ProxyPass balancer://public_web_cluster/
 stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
 /Location
 /VirtualHost
 
 mod_ajp_proxy
 ===
 
 mod_proxy_ajp.conf
 --

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
 /Location
 /VirtualHost
 


This isn't likely to be the core problem, but it's worth bearing in
mind.  If you're using mod_proxy you need to put:

 stickysession=JSESSIONID|jsessionid

to ensure you're capturing both the URL encoded and cookie based session
ids.  Unfortunately, because RHEL/Centos insist on deploying HTTPD with
the version number set when they released the OS, it's virtually
impossible to tell whether your HTTP is actually 2.2.3, or 2.2.3 +
important fixes, additions etc from 2.2.(n  3).

mod_proxy_ajp was first released in 2.2.3 for example, and many
improvements occurred in later releases.


p



signature.asc
Description: OpenPGP digital signature


Re: I'm not able to access to Tomcat Manager

2010-06-30 Thread Pid
On 30/06/2010 11:57, Paula Díaz Redondo wrote:
 
 
 Dear sr./madame
 
 I'have recently installed the apache-tomcat-6.0.26.exe (in a Windows XP), I 
 made the changes to insert the administrator in the tomcat-users.xml, now 
 this documents is like follows:
 
 tomcat-users
 role rolename=manager/
 user username=tomcat  password=TomcatAdm roles=manager/
   role rolename=tomcat/
   role rolename=role1/
   user username=tomcat password=tomcat roles=tomcat/
   user username=both password=tomcat roles=tomcat,role1/
   user username=role1 password=tomcat roles=role1/
 --

The line above is an indication that you haven't remove the XML comment
markers from the file - so Tomcat isn't seeing the contents.


p

 /tomcat-users

 
 
 The next step i'm trying to do it to access to the Tomcat Manager, but when 
 I insert as username tomcat and password TomcatAdm it doesn't allow me 
 the acces, what should I write?. Finaly, before trying it several times, my 
 acces was turned down:
 
 type Informe de estado
 
 mensaje El acceso al recurso pedido ha sido denegado
 
 descripción El acceso al recurso especificado (El acceso al recurso pedido ha 
 sido denegado) ha sido prohibido.
 
 I hope it could be solved, and i could access
 
 Than you for your attention,
 
 Paula Díaz
 
 Grup de Mètodes i Aplicacions en Teledetecció i SIG
 Departament de Geografia
 Universitat Autònoma de Barcelona
 08193 - Cerdanyola del Vallès
 (Barcelona) Spain
  
 Tel: 0034 93 581 43 43
 paula.d...@uab.es
 
  
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović

Tomislav Petrović said on 30.6.2010 12:59:

Pid said on 29.6.2010 23:20:

On 29/06/2010 19:29, Konstantin Kolinko wrote:

2010/6/29 Caldarale, Charles Rchuck.caldar...@unisys.com:

From: Tomislav Petrović [mailto:t.petro...@inet.hr]
Subject: Re: Webapp reloading issue and intermittent 404 errors

org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)


IIRC, you are not the first person to report an exception at this spot in the 
code.  (Unfortunately, I can't locate the other thread at the moment, but it 
was fairly recent.)


That was
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488


   The code in question has been run through many test cases, inside and 
outside of Tomcat, and does not appear to contain any errors (although it could 
be slightly more efficient).


Weird.  I couldn't find that in bugzilla.  Anyhow, it's Windows this
time too.


Tomislav: where is the Tomcat installation on the filing system, and
where are the webapps being deployed from, if not tomcat/webapps?

What type of filing system is it?


Also, did you manage to get hold of the config files yet?


Good news is when I put reloadable=false on context problem (both of them, 
intermittent 404 too) went away, so I have workaround. Bad news is server is 
going into production so no messing with it no more.

Yes, this is same bug as one in bugzilla, don't know if what triggered is same.

Here is detailed info (my first suspect isResources in server.xml but this is 
only my guess.

Tomcat is Apache Tomcat/6.0.24, running without tcnative-1.dll

Java version is: 1.6 update 18

Windows version: 2003 SP2 (32 bit)

NTFS file system is used, Tomcat is installed in D:\Program Files\Apache Software 
Foundation\Tomcat 6.0 folder, webapp is in D:\Program Files\Apache Software 
Foundation\Tomcat 6.0\webapps\some_name folder.

This is content of server.xml, I believe that all other conf files are at their 
default values (except for pwd in users file), feel free to ask for any other 
conf file.

?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=SHUTDOWN

   Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
   Listener className=org.apache.catalina.core.JasperListener /
   Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener 
/
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
   Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

   GlobalNamingResources
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /
 Resource name=jdbc/SomeDB auth=Container type=javax.sql.DataSource
  maxActive=48
  maxIdle=10
  maxWait=1
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  username=auser
  password=*
  
url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName;loginTimeout=5
  removeAbandoned=true
  removeAbandonedTimeout=60
  logAbandoned=true
  validationQuery=SELECT 1/
 Resource name=jdbc/SomeDB2 auth=Container type=javax.sql.DataSource
  maxActive=48
  maxIdle=10
  maxWait=1
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  username=auser2
  password=**
  url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName2
  removeAbandoned=true
  removeAbandonedTimeout=60
  logAbandoned=true
  validationQuery=SELECT 1/

   /GlobalNamingResources

   Service name=Catalina

 Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /
 Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

 Engine name=Catalina defaultHost=localhost

   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase/

   Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

 Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
prefix=localhost_access_log. suffix=.txt pattern=common 
resolveHosts=false/

Context path=/some_webapp docBase=/some_webapp debug=0 reloadable=true 
crossContext=true
ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB 
type=javax.sql.DataSource /
ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2 
type=javax.sql.DataSource /
 /Context
   /Host
 /Engine
   /Service
/Server

Let me know if I 

Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Pid
On 30/06/2010 11:59, Tomislav Petrović wrote:
 Context path=/some_webapp docBase=/some_webapp debug=0 
 reloadable=true crossContext=true
   ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB 
 type=javax.sql.DataSource /
   ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2 
 type=javax.sql.DataSource /

If these are the actual values then it's a miracle it's working at all.

Instead of defining it there, remove the debug, path and docBase
attributes and put it in

 some_webapp/META-INF/context.xml


Tomcat will work out the rest automatically.


p



signature.asc
Description: OpenPGP digital signature


Re: I'm not able to access to Tomcat Manager

2010-06-30 Thread Paweł Zuzelski
On Wed, 30 Jun 2010, Paula Díaz Redondo wrote:
 Dear sr./madame
 
 I'have recently installed the apache-tomcat-6.0.26.exe (in a Windows XP), I 
 made the changes to insert the administrator in the tomcat-users.xml, now 
 this documents is like follows:
 
 tomcat-users
 role rolename=manager/
 user username=tomcat  password=TomcatAdm roles=manager/
   role rolename=tomcat/
   role rolename=role1/
   user username=tomcat password=tomcat roles=tomcat/
   user username=both password=tomcat roles=tomcat,role1/
   user username=role1 password=tomcat roles=role1/
 --
 /tomcat-users
 
 
 The next step i'm trying to do it to access to the Tomcat Manager, but when 
 I insert as username tomcat and password TomcatAdm it doesn't allow me 
 the acces, what should I write?.

It seems that you have not removed XML comments from
tomcat-users.xml file :) It's good to use editor that highlight xml
markup, it helps to avoid such mistakes.

Hint: '--' closes comment.

-- 
Regards,
Paweł Zuzelski

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



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares

have you also set de directive in de workers.properties I suggested?



in your case that should look like

worker.pub-app01.domain=pub-app01
etc



My apologies, I am doing 10 things at the time and missed that bit.

I now have made the change and it seems to be working (fingers crossed). 
I have a couple of people testing it out, so fingers crossed!


It's weird because I've used mod_jk a lot and never had any domain 
specified.


Thanks for your help.

Gabriel



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



Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Pid
On 30/06/2010 12:04, Tomislav Petrović wrote:
 Tomislav Petrović said on 30.6.2010 12:59:
 Pid said on 29.6.2010 23:20:
 On 29/06/2010 19:29, Konstantin Kolinko wrote:
 2010/6/29 Caldarale, Charles Rchuck.caldar...@unisys.com:
 From: Tomislav Petrović [mailto:t.petro...@inet.hr]
 Subject: Re: Webapp reloading issue and intermittent 404 errors

 org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)

 IIRC, you are not the first person to report an exception at this
 spot in the code.  (Unfortunately, I can't locate the other thread
 at the moment, but it was fairly recent.)

 That was
 https://issues.apache.org/bugzilla/show_bug.cgi?id=49488

The code in question has been run through many test cases,
 inside and outside of Tomcat, and does not appear to contain any
 errors (although it could be slightly more efficient).

 Weird.  I couldn't find that in bugzilla.  Anyhow, it's Windows this
 time too.


 Tomislav: where is the Tomcat installation on the filing system, and
 where are the webapps being deployed from, if not tomcat/webapps?

 What type of filing system is it?


 Also, did you manage to get hold of the config files yet?

 Good news is when I put reloadable=false on context problem (both of
 them, intermittent 404 too) went away, so I have workaround. Bad news
 is server is going into production so no messing with it no more.

 Yes, this is same bug as one in bugzilla, don't know if what triggered
 is same.

 Here is detailed info (my first suspect isResources in server.xml
 but this is only my guess.

 Tomcat is Apache Tomcat/6.0.24, running without tcnative-1.dll

 Java version is: 1.6 update 18

 Windows version: 2003 SP2 (32 bit)

 NTFS file system is used, Tomcat is installed in D:\Program
 Files\Apache Software Foundation\Tomcat 6.0 folder, webapp is in
 D:\Program Files\Apache Software Foundation\Tomcat
 6.0\webapps\some_name folder.

 This is content of server.xml, I believe that all other conf files are
 at their default values (except for pwd in users file), feel free to
 ask for any other conf file.

 ?xml version='1.0' encoding='utf-8'?
 Server port=8005 shutdown=SHUTDOWN

Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /
Listener className=org.apache.catalina.core.JasperListener /
Listener
 className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener /
Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /


GlobalNamingResources
  Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
   
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml /
  Resource name=jdbc/SomeDB auth=Container
 type=javax.sql.DataSource
   maxActive=48
   maxIdle=10
   maxWait=1
   driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
   username=auser
   password=*
  
 url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName;loginTimeout=5

   removeAbandoned=true
   removeAbandonedTimeout=60
   logAbandoned=true
   validationQuery=SELECT 1/
  Resource name=jdbc/SomeDB2 auth=Container
 type=javax.sql.DataSource
   maxActive=48
   maxIdle=10
   maxWait=1
   driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
   username=auser2
   password=**
   url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName2
   removeAbandoned=true
   removeAbandonedTimeout=60
   logAbandoned=true
   validationQuery=SELECT 1/

/GlobalNamingResources

Service name=Catalina

  Connector port=8080 protocol=HTTP/1.1
 connectionTimeout=2
 redirectPort=8443 /
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

  Engine name=Catalina defaultHost=localhost

Realm className=org.apache.catalina.realm.UserDatabaseRealm
   resourceName=UserDatabase/

Host name=localhost  appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false

  Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 prefix=localhost_access_log. suffix=.txt
 pattern=common resolveHosts=false/

 Context path=/some_webapp docBase=/some_webapp debug=0
 reloadable=true crossContext=true
 ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB
 type=javax.sql.DataSource /
 ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2
 type=javax.sql.DataSource /
  /Context
/Host
  /Engine
/Service
 /Server

 Let me know if I can provide any more info or update bugzilla (don't
 have acc 

Re: ISAPI Redirector Help

2010-06-30 Thread Rainer Jung

On 30.06.2010 01:48, George Sexton wrote:

I'm trying to get the ISAPI redirector working on IIS 7.0 running under
Windows Server Data Center 64-bit.



When I make a request, I get served the isapi_redirector.dll. Here's the
detailed information.



IIS is running in 32 bit mode.



I have downloaded the latest 32-bit ISAPI redirector.



I have configured the registry entries in



HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Jakarta
Isapi Redirector\1.0



I have configured logging and set it to debug.



I do get a isapi_redirect.log file in the specified directory. Here are the
last few lines:





[Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588): Dump of
map: 'worker.list' -  'ajp13'

[Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588): Dump of
map: 'worker.ajp13.type' -  'ajp13'

[Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588): Dump of
map: 'worker.ajp13.host' -  'localhost'

[Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588): Dump of
map: 'worker.ajp13.port' -  '8009'







[Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_isapi_plugin.c (1835):
Filter started

[Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_uri_worker_map.c
(1036): Attempting to map URI '/mydigirad.com/calendar/View.html' from 1
maps

[Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_uri_worker_map.c
(850): Attempting to map context URI '/calendar/*=ajp13' source
'uriworkermap'

[Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_uri_worker_map.c
(850): Attempting to map context URI '/calendar/*=ajp13' source
'uriworkermap'

[Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_uri_worker_map.c
(863): Found a wildchar match '/calendar/*=ajp13'

[Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_isapi_plugin.c (1916):
check if [/calendar/View.html] points to the web-inf directory

[Tue Jun 29 19:25:45.926 2010] [4760:4676] [debug] jk_isapi_plugin.c (1932):
[/calendar/View.html] is a servlet url - should redirect to ajp13

[Tue Jun 29 19:25:45.926 2010] [4760:4676] [debug] jk_isapi_plugin.c (1972):
fowarding escaped URI [/calendar/View.html]



When I invoke /calendar/View.html, IIS services the ISAPI Redirector DLL
rather than the servlet content as expected.



I have confirmed by looking at the catalina.log file that tomcat is running
an AJP connector on port 8009



The jakarta application is running under the same application pool as the
virtual host (Network Service). I have confirmed the permissions on the
logs, tomcat conf directory, and the folder containing the isapi redirector
binary.



I checked the handler mappings and Tomcat Redirector *.dll shows up as
enabled. At the Top level, I verified that the handler mapping for ISAPI
Module *.dll is enabled.



It seems like I'm really close here. If anyone could point me in the right
direction, I would appreciate it.


Did you check item 9. in

http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html#Configuring%20the%20ISAPI%20Redirector

Regards,

Rainer


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



Re: FormAuthenticator exception with non-latin (UTF8) user name

2010-06-30 Thread Mark Thomas

On 30/06/2010 12:22, Chris Rafferty wrote:


This only occurs when I add the following valve to /conf/context.xml

 Valve className=org.apache.catalina.authenticator.FormAuthenticator
characterEncoding=UTF-8 /


Bad idea on a number of levels.

1. That change then applies to *every* context, and will break any that 
don't use FORM authentication.


2. The Manager app uses BASIC authentication...


If I do not add the valve then Tomcat will not authenticate any attempt to
access the list page with a user name containing non-Latin characters, it
works perfectly if the user name contains only Latin characters.


BASIC auth, browsers and UTF-8 is a combination that I suspect behaves 
differently from browser to browser.


Your best bet would be to modify the manager app to use FORM auth, 
making sure your login form correctly supports UTF-8.


Mark

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



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares

I'm not sure if this is what you are looking for but I just checked how

our stuff is set up here and wondered if you have the jvm route mapped
in the server xml for the tomcat instances you want loadbalanced?

Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

Paul

 
   

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

 
   

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--
 
   

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

 


This isn't likely to be the core problem, but it's worth bearing in
mind.  If you're using mod_proxy you need to put:

  stickysession=JSESSIONID|jsessionid

   
I have tried both ways and I still get no stickyness. I was trying to 
simplify it in order to check minimise the possibility of errors.



to ensure you're capturing both the URL encoded and cookie based session
ids.  Unfortunately, because RHEL/Centos insist on deploying HTTPD with
the version number set when they released the OS, it's virtually
impossible to tell whether your HTTP is actually 2.2.3, or 2.2.3 +
important fixes, additions etc from 2.2.(n  3).

mod_proxy_ajp was first released in 2.2.3 for example, and many
improvements occurred in later releases.

   


The CentOS version is 2.2.3 + a million patches. The only way to find 
out what they have changed is to go through the changelogs.


It makes things more stable from an API point of view but it surely 
makes hard not only finding out where the issue lies, but also if 
upgrading version will fix it.


Thanks

Gabriel

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



Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović

Pid said on 30.6.2010 13:12:

On 30/06/2010 12:04, Tomislav Petrović wrote:

Tomislav Petrović said on 30.6.2010 12:59:

Pid said on 29.6.2010 23:20:

On 29/06/2010 19:29, Konstantin Kolinko wrote:

2010/6/29 Caldarale, Charles Rchuck.caldar...@unisys.com:

From: Tomislav Petrović [mailto:t.petro...@inet.hr]
Subject: Re: Webapp reloading issue and intermittent 404 errors

org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)


IIRC, you are not the first person to report an exception at this
spot in the code.  (Unfortunately, I can't locate the other thread
at the moment, but it was fairly recent.)


That was
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488


The code in question has been run through many test cases,
inside and outside of Tomcat, and does not appear to contain any
errors (although it could be slightly more efficient).


Weird.  I couldn't find that in bugzilla.  Anyhow, it's Windows this
time too.


Tomislav: where is the Tomcat installation on the filing system, and
where are the webapps being deployed from, if not tomcat/webapps?

What type of filing system is it?


Also, did you manage to get hold of the config files yet?


Good news is when I put reloadable=false on context problem (both of
them, intermittent 404 too) went away, so I have workaround. Bad news
is server is going into production so no messing with it no more.

Yes, this is same bug as one in bugzilla, don't know if what triggered
is same.

Here is detailed info (my first suspect isResources in server.xml
but this is only my guess.

Tomcat is Apache Tomcat/6.0.24, running without tcnative-1.dll

Java version is: 1.6 update 18

Windows version: 2003 SP2 (32 bit)

NTFS file system is used, Tomcat is installed in D:\Program
Files\Apache Software Foundation\Tomcat 6.0 folder, webapp is in
D:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps\some_name folder.

This is content of server.xml, I believe that all other conf files are
at their default values (except for pwd in users file), feel free to
ask for any other conf file.

?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=SHUTDOWN

Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
Listener className=org.apache.catalina.core.JasperListener /
Listener
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener /
Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /


GlobalNamingResources
  Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved

factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml /
  Resource name=jdbc/SomeDB auth=Container
type=javax.sql.DataSource
   maxActive=48
   maxIdle=10
   maxWait=1
   driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
   username=auser
   password=*

url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName;loginTimeout=5

   removeAbandoned=true
   removeAbandonedTimeout=60
   logAbandoned=true
   validationQuery=SELECT 1/
  Resource name=jdbc/SomeDB2 auth=Container
type=javax.sql.DataSource
   maxActive=48
   maxIdle=10
   maxWait=1
   driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
   username=auser2
   password=**
   url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName2
   removeAbandoned=true
   removeAbandonedTimeout=60
   logAbandoned=true
   validationQuery=SELECT 1/

/GlobalNamingResources

Service name=Catalina

  Connector port=8080 protocol=HTTP/1.1
 connectionTimeout=2
 redirectPort=8443 /
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

  Engine name=Catalina defaultHost=localhost

Realm className=org.apache.catalina.realm.UserDatabaseRealm
   resourceName=UserDatabase/

Host name=localhost  appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false

  Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
 prefix=localhost_access_log. suffix=.txt
pattern=common resolveHosts=false/

 Context path=/some_webapp docBase=/some_webapp debug=0
reloadable=true crossContext=true
 ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB
type=javax.sql.DataSource /
 ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2
type=javax.sql.DataSource /
  /Context
/Host
  /Engine
/Service
/Server

Let me know if I can provide any more info or update bugzilla (don't
have acc but can open).

Thanks to all for your 

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Rainer Jung

On 30.06.2010 13:10, Gabriel Tabares wrote:

have you also set de directive in de workers.properties I suggested?



in your case that should look like

worker.pub-app01.domain=pub-app01
etc



My apologies, I am doing 10 things at the time and missed that bit.

I now have made the change and it seems to be working (fingers crossed).
I have a couple of people testing it out, so fingers crossed!

It's weird because I've used mod_jk a lot and never had any domain
specified.


You won't need a domain setting for stickyness to work. There was 
something else wrong with your setup.


Since your configuration looked OK, mod_jk should have logged any 
problems when doing stickyness in its log file.


Regards,

Rainer

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



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares



I now have made the change and it seems to be working (fingers crossed).
I have a couple of people testing it out, so fingers crossed!

OK, it now works correctly. The only issue I have is that Apache is now 
adding .number to the end of each request.


If I go to myapp/forum, the first time I get myapp/forum.1, the next 
time is myapp/forum.2, etc.


Any hints about this?


It's weird because I've used mod_jk a lot and never had any domain
specified.


You won't need a domain setting for stickyness to work. There was 
something else wrong with your setup.


Since your configuration looked OK, mod_jk should have logged any 
problems when doing stickyness in its log file.


I will look into it when I get more time after we launch the product. I 
will then have time to investigate why.


Regards,

Gabriel


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



Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović

Pid said on 30.6.2010 13:06:

On 30/06/2010 11:59, Tomislav Petrović wrote:

Context path=/some_webapp docBase=/some_webapp debug=0 reloadable=true 
crossContext=true
ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB 
type=javax.sql.DataSource /
ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2 
type=javax.sql.DataSource /


If these are the actual values then it's a miracle it's working at all.


Only app name/paths and jdbs names have been changed to dummy values.



Instead of defining it there, remove the debug, path and docBase
attributes and put it in

  some_webapp/META-INF/context.xml


Tomcat will work out the rest automatically.



Sorry for newbie question.
Can you post me how my new server.xml should look and how 
some_webapp/META-INF/context.xml should look.


Also would apprecite link to right documentation why it should be that 
way, thanks.


And do you really think this would solve my initial problem, or?

--
Tomy t.petro...@inet.hr

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



Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Michael Rodov
Hi All,
I have the following question:
In the apache 5.0 there was a file called cwc_labels.properties, its
attached
It had some interesting properties in it, such as ErrorPage.Message - you
could set a customer error message in it, and others

In 5.5 we could not find this file, theres the app_labels.properties file,
but it does not contain such settings as ErrorPage and many more.

Do you know if this or similar labels file exist in the 5.5 and older
Tomcats?
Or maybe how can I change the error message displayed on Tomcat errors?
thanks

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

RE: LockoutRealm configuration problem

2010-06-30 Thread Robillard, Greg L
Thanks, I will remove that as well.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, June 29, 2010 11:00 PM
To: Tomcat Users List
Subject: RE: LockoutRealm configuration problem

 From: Robillard, Greg L [mailto:greg.l.robill...@lmco.com]
 Subject: LockoutRealm configuration problem

One more thing...

 Jun 29, 2010 3:00:25 PM org.apache.catalina.loader.WebappClassLoader
 validateJarFile
 
 INFO: validateJarFile(C:\Program Files\Apache Software 
 Foundation\Tomcat 6.0\webapps\SystemAdministration\WEB-
 INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 
 9.7.2. Offending class: javax/servlet/Servlet.class

Get rid of that javaee.jar file - you don't want it anywhere on a system that 
Tomcat is running on, and absolutely never inside the webapp, regardless of 
what app server you're using.

 - 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


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



RE: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Webapp reloading issue and intermittent 404 errors
 
  JVM: have to check whether server or client, not sure at the moment.
 
 Server, one would hope.

Probably not - it's a 32-bit Windows, and you have to build your own JVM if you 
want a server version for that.

 Did you find out the exact version?

He stated 6u18.

 - 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: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Pid
On 30/06/2010 13:38, Caldarale, Charles R wrote:
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Webapp reloading issue and intermittent 404 errors

 JVM: have to check whether server or client, not sure at the moment.

 Server, one would hope.
 
 Probably not - it's a 32-bit Windows, and you have to build your own JVM if 
 you want a server version for that.

Really?!  I thought later versions had the server JVM too (for some
reason I now can't put my finger on).

 Did you find out the exact version?
 
 He stated 6u18.

I spotted it after I sent. Doh.


p

  - 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
 




signature.asc
Description: OpenPGP digital signature


Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread David kerber

On 6/30/2010 8:41 AM, Pid wrote:

On 30/06/2010 13:38, Caldarale, Charles R wrote:

From: Pid [mailto:p...@pidster.com]
Subject: Re: Webapp reloading issue and intermittent 404 errors


JVM: have to check whether server or client, not sure at the moment.


Server, one would hope.


Probably not - it's a 32-bit Windows, and you have to build your own JVM if you 
want a server version for that.


Really?!  I thought later versions had the server JVM too (for some
reason I now can't put my finger on).


They do; I've been using the server version for quite a while on32-bit 
windows (the performance jumps were huge for some of my apps), and have 
never built a JVM myself.


D

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



RE: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Webapp reloading issue and intermittent 404 errors
 
  Probably not - it's a 32-bit Windows, and you have to build your own
  JVM if you want a server version for that.
 
 Really?!  I thought later versions had the server JVM too (for some
 reason I now can't put my finger on).

You're right - I stand corrected; there are both server and client DLLs in the 
32-bit download.  The 64-bit one continues to have only the server version.

 - 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: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread David kerber

On 6/30/2010 8:38 AM, Caldarale, Charles R wrote:

From: Pid [mailto:p...@pidster.com]
Subject: Re: Webapp reloading issue and intermittent 404 errors


JVM: have to check whether server or client, not sure at the moment.


Server, one would hope.


Probably not - it's a 32-bit Windows, and you have to build your own JVM if you 
want a server version for that.


I think you've made your first mistake here, Chuck (at least the first 
one that I know enough about to catch!!).  If you download the jdk from 
Sun, you can get a server version of the jvm for Win32.  I've been using 
one for months for the performance gain in one of my apps.


D

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



Advanced LockoutRealm procedures

2010-06-30 Thread Robillard, Greg L
Using the LockoutRealm is running on my application.  I am looking for some 
advanced features.


1.I would like to re-direct a locked user to a different error page, 
informing them of their locked status.

2.   I would like to remove the lock time and force an administrator to 
remove the lock.

Has anyone worked in this realm, or should I just develop customized security.

Greg


RE: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Caldarale, Charles R
 From: Tomislav Petrović [mailto:t.petro...@inet.hr]
 Subject: Re: Webapp reloading issue and intermittent 404 errors
 
  Do you actually have an 'endorsed' directory in your Tomcat
  installation?  What's in it if you do?
 
 No I don't, this folder doesn't exist, will have to investigate 
 who put it in here.

Tomcat did, during the service installation.  Perfectly normal, but rarely 
useful.

 -XX:NewSize=16m
 -XX:MaxNewSize=16m

I would definitely remove both NewSize settings.  Not associated with the 
problem at hand, but probably detrimental to performance.  The JVM does a 
decent job of adjusting the NewSize value as needed for the current workload.

 Can you please point me in some doc documentation why it 
 isn't ok cause we had better experience with incgc than 
 default one on our load tests.

-Xincgc used to utilize the train GC model - which was a real dog and not 
capable of using multiple threads.  For current JVMs, -Xincgc triggers the 
concurrent (low pause) collector.  This will generally result in slightly less 
throughput, but much less stoppage time and somewhat less variation in response 
times.  If you're happy with it, leave it.

 - Chuck


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


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



Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Pid
On 30/06/2010 12:45, Tomislav Petrović wrote:
 Pid said on 30.6.2010 13:12:
 On 30/06/2010 12:04, Tomislav Petrović wrote:
 Tomislav Petrović said on 30.6.2010 12:59:
 Pid said on 29.6.2010 23:20:
 On 29/06/2010 19:29, Konstantin Kolinko wrote:
 2010/6/29 Caldarale, Charles Rchuck.caldar...@unisys.com:
 From: Tomislav Petrović [mailto:t.petro...@inet.hr]
 Subject: Re: Webapp reloading issue and intermittent 404 errors

 org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)


 IIRC, you are not the first person to report an exception at this
 spot in the code.  (Unfortunately, I can't locate the other thread
 at the moment, but it was fairly recent.)

 That was
 https://issues.apache.org/bugzilla/show_bug.cgi?id=49488

 The code in question has been run through many test cases,
 inside and outside of Tomcat, and does not appear to contain any
 errors (although it could be slightly more efficient).

 Weird.  I couldn't find that in bugzilla.  Anyhow, it's Windows this
 time too.


 Tomislav: where is the Tomcat installation on the filing system, and
 where are the webapps being deployed from, if not tomcat/webapps?

 What type of filing system is it?


 Also, did you manage to get hold of the config files yet?

 Good news is when I put reloadable=false on context problem (both of
 them, intermittent 404 too) went away, so I have workaround. Bad news
 is server is going into production so no messing with it no more.

 Yes, this is same bug as one in bugzilla, don't know if what triggered
 is same.

 Here is detailed info (my first suspect isResources in server.xml
 but this is only my guess.

 Tomcat is Apache Tomcat/6.0.24, running without tcnative-1.dll

 Java version is: 1.6 update 18

 Windows version: 2003 SP2 (32 bit)

 NTFS file system is used, Tomcat is installed in D:\Program
 Files\Apache Software Foundation\Tomcat 6.0 folder, webapp is in
 D:\Program Files\Apache Software Foundation\Tomcat
 6.0\webapps\some_name folder.

 This is content of server.xml, I believe that all other conf files are
 at their default values (except for pwd in users file), feel free to
 ask for any other conf file.

 ?xml version='1.0' encoding='utf-8'?
 Server port=8005 shutdown=SHUTDOWN

 Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /
 Listener className=org.apache.catalina.core.JasperListener /
 Listener
 className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
 Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener /
 Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 /


 GlobalNamingResources
   Resource name=UserDatabase auth=Container
 type=org.apache.catalina.UserDatabase
 description=User database that can be updated and
 saved

 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
 pathname=conf/tomcat-users.xml /
   Resource name=jdbc/SomeDB auth=Container
 type=javax.sql.DataSource
maxActive=48
maxIdle=10
maxWait=1
   
 driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
username=auser
password=*

 url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName;loginTimeout=5


removeAbandoned=true
removeAbandonedTimeout=60
logAbandoned=true
validationQuery=SELECT 1/
   Resource name=jdbc/SomeDB2 auth=Container
 type=javax.sql.DataSource
maxActive=48
maxIdle=10
maxWait=1
   
 driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
username=auser2
password=**
   
 url=jdbc:sqlserver://**.***.*.**:1433;databaseName=SomeName2
removeAbandoned=true
removeAbandonedTimeout=60
logAbandoned=true
validationQuery=SELECT 1/

 /GlobalNamingResources

 Service name=Catalina

   Connector port=8080 protocol=HTTP/1.1
  connectionTimeout=2
  redirectPort=8443 /
   Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

   Engine name=Catalina defaultHost=localhost

 Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/

 Host name=localhost  appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

   Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
  prefix=localhost_access_log. suffix=.txt
 pattern=common resolveHosts=false/

  Context path=/some_webapp docBase=/some_webapp debug=0
 reloadable=true crossContext=true
  ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB
 type=javax.sql.DataSource /
  ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2
 type=javax.sql.DataSource /
   /Context
 /Host
 

RE: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Caldarale, Charles R
 From: Tomislav Petrović [mailto:t.petro...@inet.hr]
 Subject: Re: Webapp reloading issue and intermittent 404 errors
 
 Can you post me how my new server.xml should look and how
 some_webapp/META-INF/context.xml should look.

Just remove all Context elements from server.xml - it's bad practice to have 
them there, since it violates the principle of self-contained webapps, and 
making any changes require restarting Tomcat, not just the webapp.

Context reloadable=true crossContext=true
  ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB 
type=javax.sql.DataSource /
  ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2 
type=javax.sql.DataSource /
/Context

 Also would apprecite link to right documentation why it 
 should be that way, thanks.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 And do you really think this would solve my initial problem, or?

Nope.

 - 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: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Pid
On 30/06/2010 13:07, Tomislav Petrović wrote:
 Pid said on 30.6.2010 13:06:
 On 30/06/2010 11:59, Tomislav Petrović wrote:
 Context path=/some_webapp docBase=/some_webapp debug=0
 reloadable=true crossContext=true
 ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB
 type=javax.sql.DataSource /
 ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2
 type=javax.sql.DataSource /

 If these are the actual values then it's a miracle it's working at all.
 
 Only app name/paths and jdbs names have been changed to dummy values.
 

 Instead of defining it there, remove the debug, path and docBase
 attributes and put it in

   some_webapp/META-INF/context.xml


 Tomcat will work out the rest automatically.
 
 
 Sorry for newbie question.
 Can you post me how my new server.xml should look and how
 some_webapp/META-INF/context.xml should look.

Nope.  Just do the following, it's not complicated:

0. Stop Tomcat.

1. Create a file (in each app) myappname/META-INF/context.xml.

2. Copy the entire Context definition  it's sub-elements into the file

3. Remove the 3 attributes I named (debug is deprecated, path  docBase
aren't used here)

4. Completely delete the Context definitions from server.xml.

5. Start Tomcat.


 Also would apprecite link to right documentation why it should be that
 way, thanks.

It's in the same place as the rest of the documentation:

 http://tomcat.apache.org/tomcat-6.0-doc/config/context.html


 And do you really think this would solve my initial problem, or?

Maybe, maybe not, but if we eliminate all the possible problems, we'll
know it's not one of those.


p




signature.asc
Description: OpenPGP digital signature


spring-webmvc-portlet annotations: File quot;/WEB-INF/servlet/viewquot; not found

2010-06-30 Thread Norris Shelton
I am using:
Tomcat 6.0.20
Vignette Portal Server 8.0
spring-webmvc-portlet  3.0.3.RELEASE

I get the following error when the portal is requested. 

Here is my log

2010-06-28 16:08:32  DEBUG - DispatcherPortlet with name 'weather' received 
render request 
org.springframework.web.portlet.DispatcherPortlet.doRenderService:694
2010-06-28 16:08:32  DEBUG - Testing handler map 
[org.springframework.web.portlet.mvc.annotation.defaultannotationhandlermapp...@20f764]
 in DispatcherPortlet with name 'weather' 
org.springframework.web.portlet.DispatcherPortlet.getHandler:988
2010-06-28 16:08:32  DEBUG - Key [view] - handler 
[{=com.bhsi.portlet.weather.weatherviewcontrol...@ad1c36}] 
org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping.getHandlerInternal:74
2010-06-28 16:08:32  DEBUG - Testing handler adapter 
[org.springframework.web.portlet.mvc.annotation.annotationmethodhandleradap...@51e1ff]
 org.springframework.web.portlet.DispatcherPortlet.getHandlerAdapter:1029
2010-06-28 16:08:32  DEBUG - Invoking model attribute method: public 
org.springframework.ui.ModelMap 
com.bhsi.portlet.weather.WeatherViewController.getNormalModel() 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod:154
2010-06-28 16:08:32  DEBUG - !! Found a cached modelMap 
com.bhsi.portlet.weather.WeatherViewController.getNormalModel:108
2010-06-28 16:08:32  DEBUG - Invoking request handler method: public 
org.springframework.web.portlet.ModelAndView 
com.bhsi.portlet.weather.WeatherViewController.renderNormal(org.springframework.ui.ModelMap)
 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod:172
2010-06-28 16:08:32  DEBUG - ** Entered renderNormal ** 
com.bhsi.portlet.weather.WeatherViewController.renderNormal:118
2010-06-28 16:08:32  DEBUG - Setting portlet response content type to 
view-determined type [text/html;charset=ISO-8859-1] 
org.springframework.web.portlet.DispatcherPortlet.render:1086
2010-06-28 16:08:32  DEBUG - Added model object 'NORMAL' of type 
[org.springframework.ui.ModelMap] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'lastUpdateFormatted' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'detailUrl' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 
'org.springframework.validation.BindingResult.currentWeather' of type 
[org.springframework.validation.BeanPropertyBindingResult] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'compassDirection' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'feelsLike' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 
'org.springframework.validation.BindingResult.NORMAL' of type 
[org.springframework.validation.BeanPropertyBindingResult] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'skyImageUrl' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'currentWeather' of type 
[com.bhsi.portlet.weather.currentweather.CurrentWeather] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Including resource [/WEB-INF/jsp/normal.jsp] in 
InternalResourceView 'normal' 
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel:227
2010-06-28 16:08:32  ERROR - Could not complete request 
org.springframework.web.portlet.FrameworkPortlet.processRequest:559 
javax.portlet.PortletException: javax.servlet.ServletException: File 
quot;/WEB-INF/servlet/viewquot; not found
at 
com.vignette.portal.portlet.jsrcontainer.internal.standardcontainer.invocation.apiimpl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:327)
 ~[na:na]
at 
org.springframework.web.portlet.DispatcherPortlet.doRender(DispatcherPortlet.java:1137)
 ~[spring-webmvc-portlet-3.0.3.RELEASE.jar:3.0.3.RELEASE]
at 

Re: Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Pid
On 30/06/2010 13:13, Michael Rodov wrote:
 Hi All,
 I have the following question:
 In the apache 5.0 there was a file called cwc_labels.properties, its
 attached 

The list strips attachments.

Where, exactly, was this file?

 It had some interesting properties in it, such as ErrorPage.Message -
 you could set a customer error message in it, and others
 
 In 5.5 we could not find this file, theres the app_labels.properties

Where is this file?


p

 file, but it does not contain such settings as ErrorPage and many more.
 
 Do you know if this or similar labels file exist in the 5.5 and older
 Tomcats?
 Or maybe how can I change the error message displayed on Tomcat errors?
 thanks
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




signature.asc
Description: OpenPGP digital signature


Re: spring-webmvc-portlet annotations: File quot;/WEB-INF/servlet/viewquot; not found

2010-06-30 Thread Pid
On 30/06/2010 14:06, Norris Shelton wrote:
 I am using:
 Tomcat 6.0.20
 Vignette Portal Server 8.0
 spring-webmvc-portlet  3.0.3.RELEASE
 
 I get the following error when the portal is requested. 
 
 Here is my log
 

-snip

 2010-06-28 16:08:32  DEBUG - Including resource [/WEB-INF/jsp/normal.jsp] in 
 InternalResourceView 'normal' 
 org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel:227
 2010-06-28 16:08:32  ERROR - Could not complete request 
 org.springframework.web.portlet.FrameworkPortlet.processRequest:559 
 javax.portlet.PortletException: javax.servlet.ServletException: File 
 quot;/WEB-INF/servlet/viewquot; not found
 at 
 com.vignette.portal.portlet.jsrcontainer.internal.standardcontainer.invocation.apiimpl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:327)
  ~[na:na]

-snip

 at java.lang.Thread.run(Thread.java:595) [na:1.5.0_21]
 Caused by: javax.servlet.ServletException: File 
 quot;/WEB-INF/servlet/viewquot; not found

-snip

 
 Here is my web.xml
 

Where?

 Displays the weather portlet. The main page (widget) page displays the 
 current conditions. The detail
 page shows weather alerts, the forecast, current regional radar.
  Weather Portlet 
  ViewRendererServlet org.springframework.web.servlet.ViewRendererServlet 
 1   ViewRendererServlet /WEB-INF/servlet/view   
 org.springframework.web.context.ContextLoaderListener  
 
 
 here is my portlet.xml


Where?

p


  Displays the weather portlet. The main page (widget) page displays the 
 current conditions. The
 detail page shows weather alerts, the forecast, current regional 
 radar.
  weather Weather Portlet 
 org.springframework.web.portlet.DispatcherPortlet  text/html VIEW 
 NORMAL MAXIMIZED  
 en 
  Weather Portlet Weather Portlet weather   
 
 
 
 
 
 
 
 
 
  
 Norris Shelton
 Software Engineer
 Sun Certified Java 1.1 Programmer
 Shelton Consulting, LLC
 ICQ# 26487421
 AIM NorrisEShelton
 YIM norrisshelton
 
 
 
   




signature.asc
Description: OpenPGP digital signature


Re: Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Michael Rodov
this is the link, but its not 100% sure since it depends on the installed
directories

C:\Program Files\Apache Software Foundation\Tomcat
5.5.26\work\Catalina\localhost\sm711\loader\*com\hp\ov\cwc\web*



On Wed, Jun 30, 2010 at 4:08 PM, Pid p...@pidster.com wrote:

 On 30/06/2010 13:13, Michael Rodov wrote:
  Hi All,
  I have the following question:
  In the apache 5.0 there was a file called cwc_labels.properties, its
  attached

 The list strips attachments.

 Where, exactly, was this file?

  It had some interesting properties in it, such as ErrorPage.Message -
  you could set a customer error message in it, and others
 
  In 5.5 we could not find this file, theres the app_labels.properties

 Where is this file?


 p

  file, but it does not contain such settings as ErrorPage and many more.
 
  Do you know if this or similar labels file exist in the 5.5 and older
  Tomcats?
  Or maybe how can I change the error message displayed on Tomcat errors?
  thanks
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org





RE: Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Caldarale, Charles R
 From: Michael Rodov [mailto:rodov.mich...@gmail.com]
 Subject: Apache Tomcat 5.5 and labels.properties
 
 In the apache 5.0 there was a file called cwc_labels.properties

Assuming you mean Tomcat 5.0 (Apache is an organization, not a product), there 
was no such file.  If you had one in your installation of Tomcat, someone added 
it locally - likely part of a webapp.  Note that the work directory in a Tomcat 
distribution is empty; deployment and execution of the webapp can result in 
files being placed there.

 - 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



spring-webmvc-portlet annotations: File quot;/WEB-INF/servlet/viewquot; not found

2010-06-30 Thread Norris Shelton
I have compared the configuration to multiple examples and it appears to be 
set-up correctly.  There is another question similar to this with the exact 
problem, also on Tomcat/Vignette.  


Attached are the files, since the pasting earlier did not work.





 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  2010-06-28 16:08:32  DEBUG - DispatcherPortlet with name 'weather' received 
render request 
org.springframework.web.portlet.DispatcherPortlet.doRenderService:694
2010-06-28 16:08:32  DEBUG - Testing handler map 
[org.springframework.web.portlet.mvc.annotation.defaultannotationhandlermapp...@20f764]
 in DispatcherPortlet with name 'weather' 
org.springframework.web.portlet.DispatcherPortlet.getHandler:988
2010-06-28 16:08:32  DEBUG - Key [view] - handler 
[{=com.bhsi.portlet.weather.weatherviewcontrol...@ad1c36}] 
org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping.getHandlerInternal:74
2010-06-28 16:08:32  DEBUG - Testing handler adapter 
[org.springframework.web.portlet.mvc.annotation.annotationmethodhandleradap...@51e1ff]
 org.springframework.web.portlet.DispatcherPortlet.getHandlerAdapter:1029
2010-06-28 16:08:32  DEBUG - Invoking model attribute method: public 
org.springframework.ui.ModelMap 
com.bhsi.portlet.weather.WeatherViewController.getNormalModel() 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod:154
2010-06-28 16:08:32  DEBUG - !! Found a cached modelMap 
com.bhsi.portlet.weather.WeatherViewController.getNormalModel:108
2010-06-28 16:08:32  DEBUG - Invoking request handler method: public 
org.springframework.web.portlet.ModelAndView 
com.bhsi.portlet.weather.WeatherViewController.renderNormal(org.springframework.ui.ModelMap)
 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod:172
2010-06-28 16:08:32  DEBUG - ** Entered renderNormal ** 
com.bhsi.portlet.weather.WeatherViewController.renderNormal:118
2010-06-28 16:08:32  DEBUG - Setting portlet response content type to 
view-determined type [text/html;charset=ISO-8859-1] 
org.springframework.web.portlet.DispatcherPortlet.render:1086
2010-06-28 16:08:32  DEBUG - Added model object 'NORMAL' of type 
[org.springframework.ui.ModelMap] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'lastUpdateFormatted' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'detailUrl' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 
'org.springframework.validation.BindingResult.currentWeather' of type 
[org.springframework.validation.BeanPropertyBindingResult] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'compassDirection' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'feelsLike' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 
'org.springframework.validation.BindingResult.NORMAL' of type 
[org.springframework.validation.BeanPropertyBindingResult] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'skyImageUrl' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'currentWeather' of type 
[com.bhsi.portlet.weather.currentweather.CurrentWeather] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Including resource [/WEB-INF/jsp/normal.jsp] in 
InternalResourceView 'normal' 
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel:227
2010-06-28 16:08:32  ERROR - Could not complete request 
org.springframework.web.portlet.FrameworkPortlet.processRequest:559 
javax.portlet.PortletException: javax.servlet.ServletException: File 
quot;/WEB-INF/servlet/viewquot; not found
at 

Re: Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Pid
On 30/06/2010 14:13, Michael Rodov wrote:
 this is the link, but its not 100% sure since it depends on the
 installed directories
 
 C:\Program Files\Apache Software Foundation\Tomcat
 5.5.26\work\Catalina\localhost\sm711\loader\*com\hp\ov\cwc\web*

So the clue there is in the package name.

This is not an Apache package, let alone Tomcat: com.hp.ov.cwc.web, it's
something to do with your application - or an app / jar you're using.


p

 On Wed, Jun 30, 2010 at 4:08 PM, Pid p...@pidster.com
 mailto:p...@pidster.com wrote:
 
 On 30/06/2010 13:13, Michael Rodov wrote:
  Hi All,
  I have the following question:
  In the apache 5.0 there was a file called cwc_labels.properties, its
  attached
 
 The list strips attachments.
 
 Where, exactly, was this file?
 
  It had some interesting properties in it, such as ErrorPage.Message -
  you could set a customer error message in it, and others
 
  In 5.5 we could not find this file, theres the app_labels.properties
 
 Where is this file?
 
 
 p
 
  file, but it does not contain such settings as ErrorPage and many
 more.
 
  Do you know if this or similar labels file exist in the 5.5 and older
  Tomcats?
  Or maybe how can I change the error message displayed on Tomcat
 errors?
  thanks
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 mailto:users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 mailto:users-h...@tomcat.apache.org
 
 
 




signature.asc
Description: OpenPGP digital signature


RE: FormAuthenticator exception with non-latin (UTF8) user name

2010-06-30 Thread Chris Rafferty
Thanks Mark,

That has worked a treat.   I changed the manager application's web.xml to
use FORM based authentication, added the valve to its context.xml rather
than specifying it globally and provided the login form. 

Cheers
Chris


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: 30 June 2010 12:28
To: Tomcat Users List
Subject: Re: FormAuthenticator exception with non-latin (UTF8) user name

On 30/06/2010 12:22, Chris Rafferty wrote:

 This only occurs when I add the following valve to /conf/context.xml

  Valve
className=org.apache.catalina.authenticator.FormAuthenticator
 characterEncoding=UTF-8 /

Bad idea on a number of levels.

1. That change then applies to *every* context, and will break any that 
don't use FORM authentication.

2. The Manager app uses BASIC authentication...

 If I do not add the valve then Tomcat will not authenticate any attempt to
 access the list page with a user name containing non-Latin characters, it
 works perfectly if the user name contains only Latin characters.

BASIC auth, browsers and UTF-8 is a combination that I suspect behaves 
differently from browser to browser.

Your best bet would be to modify the manager app to use FORM auth, 
making sure your login form correctly supports UTF-8.

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: spring-webmvc-portlet annotations: File quot;/WEB-INF/servlet/viewquot; not found

2010-06-30 Thread Martin Gainty

please include
./WEB-INF/portlet.xml
please include all the files that portlet.xml includes


also..please include the tomcat logs
Martin 
__ 
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: Wed, 30 Jun 2010 06:30:21 -0700
From: norrisshel...@yahoo.com
Subject: spring-webmvc-portlet annotations: File 
quot;/WEB-INF/servlet/viewquot; not found
To: users@tomcat.apache.org




I have compared the configuration to multiple examples and it appears to be 
set-up correctly.  There is another question similar to this with the exact 
problem, also on Tomcat/Vignette.  


Attached are the files, since the pasting earlier did not work.





 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Rainer Jung

On 30.06.2010 15:43, Pid wrote:

On 30/06/2010 14:13, Michael Rodov wrote:

this is the link, but its not 100% sure since it depends on the
installed directories

C:\Program Files\Apache Software Foundation\Tomcat
5.5.26\work\Catalina\localhost\sm711\loader\*com\hp\ov\cwc\web*


So the clue there is in the package name.

This is not an Apache package, let alone Tomcat: com.hp.ov.cwc.web, it's
something to do with your application - or an app / jar you're using.


Likely the application in question is HP Service Manager. It seems the 
file was part of that. It is definitely not a Tomcat file. Talk to hP or 
your integration partner, why they dropped the file and where you can 
find the missing functionality.


Regards,

Rainer

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



Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović

Pid said on 30.6.2010 15:05:

On 30/06/2010 13:07, Tomislav Petrović wrote:

Pid said on 30.6.2010 13:06:

On 30/06/2010 11:59, Tomislav Petrović wrote:

 Context path=/some_webapp docBase=/some_webapp debug=0
reloadable=true crossContext=true
 ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB
type=javax.sql.DataSource /
 ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2
type=javax.sql.DataSource /


If these are the actual values then it's a miracle it's working at all.


Only app name/paths and jdbs names have been changed to dummy values.



Instead of defining it there, remove the debug, path and docBase
attributes and put it in

   some_webapp/META-INF/context.xml


Tomcat will work out the rest automatically.



Sorry for newbie question.
Can you post me how my new server.xml should look and how
some_webapp/META-INF/context.xml should look.


Nope.  Just do the following, it's not complicated:

0. Stop Tomcat.

1. Create a file (in each app) myappname/META-INF/context.xml.

2. Copy the entire Context definition  it's sub-elements into the file

3. Remove the 3 attributes I named (debug is deprecated, path  docBase
aren't used here)

4. Completely delete the Context definitions from server.xml.

5. Start Tomcat.



Also would apprecite link to right documentation why it should be that
way, thanks.


It's in the same place as the rest of the documentation:

  http://tomcat.apache.org/tomcat-6.0-doc/config/context.html



And do you really think this would solve my initial problem, or?


Maybe, maybe not, but if we eliminate all the possible problems, we'll
know it's not one of those.




All advise them to do so in future installations but can't change that 
on this particular server anymore. Since workaround works server is 
going into production and hence freezed for all changes :(.


--
Tomy t.petro...@inet.hr

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



Re: spring-webmvc-portlet annotations: File quot;/WEB-INF/servlet/viewquot; not found

2010-06-30 Thread André Warnier

Norris Shelton wrote:
I have compared the configuration to multiple examples and it appears to be set-up correctly.  There is another question similar to this with the exact problem, also on Tomcat/Vignette.  



Attached are the files, since the pasting earlier did not work.


Norris,

I know nothing about portals, nor Vignette, nor spring or whatever, so the following is 
just a vague idea based on this portion of the logfile :


2010-06-28 16:08:32  DEBUG - Including resource [/WEB-INF/jsp/normal.jsp] in 
InternalResourceView 'normal' 
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel:227
2010-06-28 16:08:32  ERROR - Could not complete request 
org.springframework.web.portlet.FrameworkPortlet.processRequest:559 
javax.portlet.PortletException: javax.servlet.ServletException: File 
quot;/WEB-INF/servlet/viewquot; not found
at 
com.vignette.portal.portlet.jsrcontainer.internal.standardcontainer.invocation.apiimpl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:327) 
~[na:na]
at 
org.springframework.web.portlet.DispatcherPortlet.doRender(DispatcherPortlet.java:1137)



I doubt (but I am not sure) that a logging module would wilfully HTML-escape real 
quotation marks in a message before printing it to the logfile.


To me it thus looks like some module is trying to render some html code, in the course 
of which it is supposed to read, and interpret the file /WEB-INF/jsp/normal.jsp.
In that file, it finds some kind of include instruction which should give it the 
(relative?) path of another file/thing to include here.

That file/thing path should be :
/WEB-INF/servlet/view
or maybe the same between quotation marks :
/WEB-INF/servlet/view

However, instead it finds :
quot;/WEB-INF/servlet/viewquot;
which looks as if something already went through the page that contains this link 
(normal.jsp ?), and already HTML-escaped the surrounding quotation marks into

quot;
sequences, as if this was part of the html text of the page instead of an 
include instruction.

Of course, whatever is trying to open that to-include file/thing is never going to find 
it, because there is no file/thing starting with quot anywhere.


What does that include line look like, in the normal.jsp file ?



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



Re: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović

Caldarale, Charles R said on 30.6.2010 15:03:

From: Tomislav Petrović [mailto:t.petro...@inet.hr]
Subject: Re: Webapp reloading issue and intermittent 404 errors

Can you post me how my new server.xml should look and how
some_webapp/META-INF/context.xml should look.


Just remove allContext  elements from server.xml - it's bad practice to have 
them there, since it violates the principle of self-contained webapps, and making any 
changes require restarting Tomcat, not just the webapp.

Context reloadable=true crossContext=true
   ResourceLink global=jdbc/SomeDB name=jdbc/SomeDB 
type=javax.sql.DataSource /
   ResourceLink global=jdbc/SomeDB2 name=jdbc/SomeDB2 
type=javax.sql.DataSource /
/Context


Also would apprecite link to right documentation why it
should be that way, thanks.


http://tomcat.apache.org/tomcat-6.0-doc/config/context.html


And do you really think this would solve my initial problem, or?


Nope.


Thanks for info, but any idea what caused original problem? And if I can 
provide any additional info to help resolve it.
Unfortunately can't test it anymore since server where it happened 
(doesn't anymore with reloadable=false) is going into production.


--
Tomy t.petro...@inet.hr

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



Re: Apache Tomcat 5.5 and labels.properties

2010-06-30 Thread Michael Rodov
Ok thanks guys

On Wed, Jun 30, 2010 at 4:43 PM, Pid p...@pidster.com wrote:

 On 30/06/2010 14:13, Michael Rodov wrote:
  this is the link, but its not 100% sure since it depends on the
  installed directories
 
  C:\Program Files\Apache Software Foundation\Tomcat
  5.5.26\work\Catalina\localhost\sm711\loader\*com\hp\ov\cwc\web*

 So the clue there is in the package name.

 This is not an Apache package, let alone Tomcat: com.hp.ov.cwc.web, it's
 something to do with your application - or an app / jar you're using.


 p

  On Wed, Jun 30, 2010 at 4:08 PM, Pid p...@pidster.com
  mailto:p...@pidster.com wrote:
 
  On 30/06/2010 13:13, Michael Rodov wrote:
   Hi All,
   I have the following question:
   In the apache 5.0 there was a file called cwc_labels.properties,
 its
   attached
 
  The list strips attachments.
 
  Where, exactly, was this file?
 
   It had some interesting properties in it, such as ErrorPage.Message
 -
   you could set a customer error message in it, and others
  
   In 5.5 we could not find this file, theres the
 app_labels.properties
 
  Where is this file?
 
 
  p
 
   file, but it does not contain such settings as ErrorPage and many
  more.
  
   Do you know if this or similar labels file exist in the 5.5 and
 older
   Tomcats?
   Or maybe how can I change the error message displayed on Tomcat
  errors?
   thanks
  
  
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  mailto:users-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  mailto:users-h...@tomcat.apache.org
 
 
 





Re: Question about BASIC Authentication

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthew,

On 6/30/2010 12:07 AM, Matthew Mauriello wrote:
 I have two directories in 'webapps' other than ROOT. ROOT redirects users
 to webappA. WebappA does not use tomcat's basic authentication but if you
 log into the application there are links inside it that sends the user to
 the SOLR webapp via http://user:passw...@website.com/SOLR.

Ok.

 SOLR uses basic authentication. The problem is once the browser logs into
 SOLR the error message pops up when navigating back to WebappA.

Where is webappA deployed? /webappA? Generally, when the server requests
BASIC authentication, the client will then provide credentials to the
server for the original URL plus any URLs that are under it. I wonder
if you used http://user:passw...@website.com/SOLR/; (note the trailing
slash) if you might avoid this behavior. I think the browser sees
http://user:passw...@website.com/SOLR, removes the SOLR from the end
(because it thinks that's the name of the resource), and then anything
starting with http://website.com/ will then get the HTTP AUTH headers.

 I understand this isn't the greatest setup but other than the constant pop
 up message after logging into SOLR it meets the needs of the very few
 users on the website.

It's odd that your web browser complains about this... it implies that
the browser pre-fetches the URL /without/ the authentication header,
just to see if the server replies with a request-for-authentication
header. That's actually kind of a nice security feature.

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

iEYEARECAAYFAkwrUfoACgkQ9CaO5/Lv0PAETACeONnx4nYQFXLwud13KCb9Nu0Z
GkkAnj28Iz5yxZaZzJGOi7sZThMcZY62
=50Ze
-END PGP SIGNATURE-

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



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread János Löbb
 workers.properties
 ---
 ps=/
 
 worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb
 
 worker.pub-app01.type=ajp13
 worker.pub-app01.host=app01
 worker.pub-app01.port=8009
 worker.pub-app01.socket_keepalive=1
 
 worker.pub-app02.type=ajp13
 worker.pub-app02.host=app02
 worker.pub-app02.port=8009
 worker.pub-app02.socket_keepalive=1
 
 worker.pub-app03.type=ajp13
 worker.pub-app03.host=app03
 worker.pub-app03.port=8009
 worker.pub-app03.socket_keepalive=1
 
 worker.pub-app04.type=ajp13
 worker.pub-app04.host=app04
 worker.pub-app04.port=8009
 worker.pub-app04.socket_keepalive=1
 
 worker.pub-app05.type=ajp13
 worker.pub-app05.host=app05
 worker.pub-app05.port=8009
 worker.pub-app05.socket_keepalive=1
 
 worker.ajp13.lbfactor=1
 
 worker.pub-lb.type=lb
 worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
 worker.pub-lb.sticky_session=1
 

- I think this is what worker.list should look like:

worker.list=pub-lb

- You might also need for every balance_worker the 
worker.pub-app0x.redirect=machine_name_where_the_session_from_this_machine_should_be_redirected

- For the load balance worker you might need something like:
worker.pub-lb.sticky_session_force=False
worker.pub-lb.sticky_session=True

I am getting these from my 6.0.18 config, so they might be outdated.

János


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



FW: problem with org.apache.catalina.core.ApplicationHttpRequest method.

2010-06-30 Thread Ranjix R

Hi guys, sorry for the bother. I do have a question related to how a certain 
feature was implemented in Tomcat (6.0, probably 
all of them), that's why I address the question to the dev-list and the 
user-list. 
I do have a fairly complicated case, in which I have a filter for jsp's, and I 
use a custom request wrapper in the respective filter. 
My request wrapper overrides setAttribute and getAttribute (does some internal 
management, not relying on the super), 
and I had the surprise to see that the setAttribute from my wrapper doesn't get 
called from the 
org.apache.catalina.core.ApplicationHttpRequest setAttribute, at least not for 
the special attributes (and I need the 
javax.servlet.include attributes, which Tomcat considers special). 

The code that I find is problematic is copied underneath (the if(!setSpecial) 
part), and the question is why doesn't the 
getRequest.setAttribute get called ALL THE TIME. The problem manifests when I 
do a jsp:include, and when the
filter on the included jsp checks my wrapper, can't find the 
javax.servlet.include.* attributes. This is somewhat bothering, 
considering that I don't have this issue with Weblogic and Websphere, both do 
call my wrapper's set/getAttribute... 

p.s. the code I believe is at fault is:

org.apache.catalina.core.ApplicationHttpRequest
...
public  void setAttribute(String name,
Object value) 
{
if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
dispatcherType = value;
return;
} else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
requestDispatcherPath = value;
return;
}
if (!setSpecial(name, value)) {
getRequest().setAttribute(name, value);
}
}So, the questions are: 

1. do you think is a big issue if I remove the if and I just use instead to 
instructions - 
- setSpecial(name, attribute);
- getRequest().setAttribute...
In my tests it seemed to work fine, but maybe I don't grasp all the 
implications. 

2. any particular reason for calling the getRequest().setAttribute only for 
some (non-special) attributes, but not for others (javax.servlet.include.*)? 

thanks for any suggestion/
ranjix 



  
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. 
Learn more.  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

RE: FormAuthenticator exception with non-latin (UTF8) user name

2010-06-30 Thread Caldarale, Charles R
 From: Chris Rafferty [mailto:chris.raffe...@sidonis.com]
 Subject: RE: FormAuthenticator exception with non-latin (UTF8) user
 name
 
 I changed the manager application's web.xml to use FORM 
 based authentication, added the valve to its context.xml

You really should not be explicitly adding the Valve; Tomcat will include the 
proper valve as required by the security specifications in the webapp's 
WEB-INF/web.xml file.

 - 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: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Caldarale, Charles R
 From: Tomislav Petrović [mailto:t.petro...@inet.hr]
 Subject: Re: Webapp reloading issue and intermittent 404 errors
 
 any idea what caused original problem? And if I can
 provide any additional info to help resolve it.

Again, we believe this to be a JVM bug, not specific to Tomcat.  Since it's so 
infrequent, it's hard to pin down.  Unfortunately, Sun/Oracle's changelog 
probably won't be explicit enough to tell us if the problem has been addressed 
in a later JVM.

 - 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: Webapp reloading issue and intermittent 404 errors

2010-06-30 Thread Tomislav Petrović

Forgot to say:
Tomcat service is started with following parameters:

JVM: have to check whether server or client, not sure at the moment.


Server, one would hope.  Did you find out the exact version?



Yup JVM path for tomcat is ..\jdk1.6.0_18\jre\bin\server\jvm.dll, so 
Java 6 update 18 server.


--
Tomy t.petro...@inet.hr

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



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Rainer Jung

On 30.06.2010 16:18, János Löbb wrote:

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1



- I think this is what worker.list should look like:

worker.list=pub-lb


Aaaah, right. The above won't work, the lb worker needs to be in the 
list, not the members of the lb. with recent versions of mod_jk you 
would find a message in the log, that the worker pub-lb used in your 
JkMount isn't known to mod_jk (because it is missing in the list attribute).



- You might also need for every balance_worker the
worker.pub-app0x.redirect=machine_name_where_the_session_from_this_machine_should_be_redirected


You can use it if you have a very special idea, which node should fail 
over to which other node, but you can omit it and the balancer will 
choose one on a per request basis, if there is a problem with a node.



- For the load balance worker you might need something like:
worker.pub-lb.sticky_session_force=False
worker.pub-lb.sticky_session=True


Those are both defaults.

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



Re: spring-webmvc-portlet annotations: File /WEB-INF/servlet/view not found

2010-06-30 Thread Norris Shelton
Sorry, none of my files were included.  I sent another email with all of the 
files as attachments.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Norris Shelton norrisshel...@yahoo.com
To: users@tomcat.apache.org
Sent: Wed, June 30, 2010 9:06:18 AM
Subject: spring-webmvc-portlet annotations: File 
quot;/WEB-INF/servlet/viewquot; not found

I am using:
Tomcat 6.0.20
Vignette Portal Server 8.0
spring-webmvc-portlet  3.0.3.RELEASE

I get the following error when the portal is requested. 

Here is my log

2010-06-28 16:08:32  DEBUG - DispatcherPortlet with name 'weather' received 
render request 
org.springframework.web.portlet.DispatcherPortlet.doRenderService:694
2010-06-28 16:08:32  DEBUG - Testing handler map 
[org.springframework.web.portlet.mvc.annotation.defaultannotationhandlermapp...@20f764]
 in DispatcherPortlet with name 'weather' 
org.springframework.web.portlet.DispatcherPortlet.getHandler:988
2010-06-28 16:08:32  DEBUG - Key [view] - handler 
[{=com.bhsi.portlet.weather.weatherviewcontrol...@ad1c36}] 
org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping.getHandlerInternal:74
2010-06-28 16:08:32  DEBUG - Testing handler adapter 
[org.springframework.web.portlet.mvc.annotation.annotationmethodhandleradap...@51e1ff]
 org.springframework.web.portlet.DispatcherPortlet.getHandlerAdapter:1029
2010-06-28 16:08:32  DEBUG - Invoking model attribute method: public 
org.springframework.ui.ModelMap 
com.bhsi.portlet.weather.WeatherViewController.getNormalModel() 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod:154
2010-06-28 16:08:32  DEBUG - !! Found a cached modelMap 
com.bhsi.portlet.weather.WeatherViewController.getNormalModel:108
2010-06-28 16:08:32  DEBUG - Invoking request handler method: public 
org.springframework.web.portlet.ModelAndView 
com.bhsi.portlet.weather.WeatherViewController.renderNormal(org.springframework.ui.ModelMap)
 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod:172
2010-06-28 16:08:32  DEBUG - ** Entered renderNormal ** 
com.bhsi.portlet.weather.WeatherViewController.renderNormal:118
2010-06-28 16:08:32  DEBUG - Setting portlet response content type to 
view-determined type [text/html;charset=ISO-8859-1] 
org.springframework.web.portlet.DispatcherPortlet.render:1086
2010-06-28 16:08:32  DEBUG - Added model object 'NORMAL' of type 
[org.springframework.ui.ModelMap] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'lastUpdateFormatted' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'detailUrl' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 
'org.springframework.validation.BindingResult.currentWeather' of type 
[org.springframework.validation.BeanPropertyBindingResult] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'compassDirection' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'feelsLike' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 
'org.springframework.validation.BindingResult.NORMAL' of type 
[org.springframework.validation.BeanPropertyBindingResult] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'skyImageUrl' of type 
[java.lang.String] to request in view with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Added model object 'currentWeather' of type 
[com.bhsi.portlet.weather.currentweather.CurrentWeather] to request in view 
with name 'normal' 
org.springframework.web.servlet.view.AbstractView.exposeModelAsRequestAttributes:328
2010-06-28 16:08:32  DEBUG - Including resource [/WEB-INF/jsp/normal.jsp] in 
InternalResourceView 'normal' 
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel:227
2010-06-28 16:08:32  ERROR - Could not complete request 
org.springframework.web.portlet.FrameworkPortlet.processRequest:559 

Re: Advanced LockoutRealm procedures

2010-06-30 Thread Mark Thomas

On 30/06/2010 14:50, Robillard, Greg L wrote:

Using the LockoutRealm is running on my application.  I am looking for some 
advanced features.


1.I would like to re-direct a locked user to a different error page, 
informing them of their locked status.


That would require customizing the Realm. A patch to do this would not 
be accepted in the Tomcat code base since it is a (minor) security 
vulnerability (it tells an attacker they have a valid user id but an 
invalid password).



2.   I would like to remove the lock time and force an administrator to 
remove the lock.


That would also require customizing the Realm. A patch to do this would 
be accepted providing that the current practice of using a size limited 
LRU cache for the locked out users remained. I'd suggest values  0 
representing infinite lockout. Note the unlock feature already exists 
and can be accessed via JMX.



Has anyone worked in this realm, or should I just develop customized security.


Apart from me (I wrote it) I don't recall anyone touching that part of 
the code.


Mark

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



Re: FormAuthenticator exception with non-latin (UTF8) user name

2010-06-30 Thread Mark Thomas

On 30/06/2010 16:20, Caldarale, Charles R wrote:

From: Chris Rafferty [mailto:chris.raffe...@sidonis.com]
Subject: RE: FormAuthenticator exception with non-latin (UTF8) user
name

I changed the manager application's web.xml to use FORM
based authentication, added the valve to its context.xml


You really should not be explicitly adding theValve; Tomcat will include the 
proper valve as required by the security specifications in the webapp's 
WEB-INF/web.xml file.


You do need to add the valve if you want to change any of the default 
settings. Whilst the request body *should* be in UTF-8 if the login form 
is written correctly, I believe there are issues with some browsers not 
following the spec and failing to declare the character encoding being used.


Mark

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



RE: Advanced LockoutRealm procedures

2010-06-30 Thread Robillard, Greg L
Thanks

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Wednesday, June 30, 2010 9:37 AM
To: Tomcat Users List
Subject: Re: Advanced LockoutRealm procedures

On 30/06/2010 14:50, Robillard, Greg L wrote:
 Using the LockoutRealm is running on my application.  I am looking for some 
 advanced features.


 1.I would like to re-direct a locked user to a different error page, 
 informing them of their locked status.

That would require customizing the Realm. A patch to do this would not be 
accepted in the Tomcat code base since it is a (minor) security vulnerability 
(it tells an attacker they have a valid user id but an invalid password).

 2.   I would like to remove the lock time and force an administrator to 
 remove the lock.

That would also require customizing the Realm. A patch to do this would be 
accepted providing that the current practice of using a size limited LRU cache 
for the locked out users remained. I'd suggest values  0 representing infinite 
lockout. Note the unlock feature already exists and can be accessed via JMX.

 Has anyone worked in this realm, or should I just develop customized security.

Apart from me (I wrote it) I don't recall anyone touching that part of the code.

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: ISAPI Redirector Help

2010-06-30 Thread George Sexton
I'm using IIS 7.0 so that step would not apply.

George Sexton
MH Software, Inc.
303 438-9585
www.mhsoftware.com


 -Original Message-
 From: Rainer Jung [mailto:rainer.j...@kippdata.de]
 Sent: Wednesday, June 30, 2010 5:19 AM
 To: Tomcat Users List
 Subject: Re: ISAPI Redirector Help
 
 On 30.06.2010 01:48, George Sexton wrote:
  I'm trying to get the ISAPI redirector working on IIS 7.0 running
 under
  Windows Server Data Center 64-bit.
 
 
 
  When I make a request, I get served the isapi_redirector.dll. Here's
 the
  detailed information.
 
 
 
  IIS is running in 32 bit mode.
 
 
 
  I have downloaded the latest 32-bit ISAPI redirector.
 
 
 
  I have configured the registry entries in
 
 
 
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software
 Foundation\Jakarta
  Isapi Redirector\1.0
 
 
 
  I have configured logging and set it to debug.
 
 
 
  I do get a isapi_redirect.log file in the specified directory. Here
 are the
  last few lines:
 
 
 
 
 
  [Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588):
 Dump of
  map: 'worker.list' -  'ajp13'
 
  [Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588):
 Dump of
  map: 'worker.ajp13.type' -  'ajp13'
 
  [Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588):
 Dump of
  map: 'worker.ajp13.host' -  'localhost'
 
  [Tue Jun 29 19:11:30.520 2010] [1752:3920] [debug] jk_map.c (588):
 Dump of
  map: 'worker.ajp13.port' -  '8009'
 
 
 
 
 
 
 
  [Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_isapi_plugin.c
 (1835):
  Filter started
 
  [Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug]
 jk_uri_worker_map.c
  (1036): Attempting to map URI '/mydigirad.com/calendar/View.html'
 from 1
  maps
 
  [Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug]
 jk_uri_worker_map.c
  (850): Attempting to map context URI '/calendar/*=ajp13' source
  'uriworkermap'
 
  [Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug]
 jk_uri_worker_map.c
  (850): Attempting to map context URI '/calendar/*=ajp13' source
  'uriworkermap'
 
  [Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug]
 jk_uri_worker_map.c
  (863): Found a wildchar match '/calendar/*=ajp13'
 
  [Tue Jun 29 19:25:45.911 2010] [4760:4676] [debug] jk_isapi_plugin.c
 (1916):
  check if [/calendar/View.html] points to the web-inf directory
 
  [Tue Jun 29 19:25:45.926 2010] [4760:4676] [debug] jk_isapi_plugin.c
 (1932):
  [/calendar/View.html] is a servlet url - should redirect to ajp13
 
  [Tue Jun 29 19:25:45.926 2010] [4760:4676] [debug] jk_isapi_plugin.c
 (1972):
  fowarding escaped URI [/calendar/View.html]
 
 
 
  When I invoke /calendar/View.html, IIS services the ISAPI Redirector
 DLL
  rather than the servlet content as expected.
 
 
 
  I have confirmed by looking at the catalina.log file that tomcat is
 running
  an AJP connector on port 8009
 
 
 
  The jakarta application is running under the same application pool as
 the
  virtual host (Network Service). I have confirmed the permissions on
 the
  logs, tomcat conf directory, and the folder containing the isapi
 redirector
  binary.
 
 
 
  I checked the handler mappings and Tomcat Redirector *.dll shows up
 as
  enabled. At the Top level, I verified that the handler mapping for
 ISAPI
  Module *.dll is enabled.
 
 
 
  It seems like I'm really close here. If anyone could point me in the
 right
  direction, I would appreciate it.
 
 Did you check item 9. in
 
 http://tomcat.apache.org/connectors-
 doc/webserver_howto/iis.html#Configuring%20the%20ISAPI%20Redirector
 
 Regards,
 
 Rainer
 
 
 -
 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: ISAPI Redirector Help

2010-06-30 Thread Rainer Jung

On 30.06.2010 16:57, George Sexton wrote:

I'm using IIS 7.0 so that step would not apply.


Sure? The docs talk about version 6 because that was the last time they 
were updated.


Rainer

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



RE: ISAPI Redirector Help

2010-06-30 Thread George Sexton
In IIS 7 the equivalent function is done by enabling/disabling handler
mappings.


George Sexton
MH Software, Inc.
303 438-9585
www.mhsoftware.com


 -Original Message-
 From: Rainer Jung [mailto:rainer.j...@kippdata.de]
 Sent: Wednesday, June 30, 2010 9:01 AM
 To: Tomcat Users List
 Subject: Re: ISAPI Redirector Help
 
 On 30.06.2010 16:57, George Sexton wrote:
  I'm using IIS 7.0 so that step would not apply.
 
 Sure? The docs talk about version 6 because that was the last time they
 were updated.
 
 Rainer
 
 -
 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



[OT] Using httpd's mod_rewrite with mod_jk

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

Slightly off-topic, but relevant.

On our development servers, I'm trying to enforce a rule that all our
users have the most up-to-date web browser available (yeah, it's an
uphill battle, I know... just go with it).

I decided to use mod_rewrite to check for a User-Agent pattern and then
forward to a bad browser page, which works well for static content,
but not for requests destined to be handled by mod_jk.

Here's what I've got:

# Handle Mozilla Firefox
RewriteCond %{HTTP_USER_AGENT} Firefox/
RewriteCond %{HTTP_USER_AGENT}
!(Firefox/(3\.0\.19|3\.5\.9|3\.6\.3)($|[^\.0-9]))
RewriteRule .* /bad-browser.shtml [L]

For dynamic requests, this will happily allow the request to go through
to mod_jk.

I also tried this:

RewriteRule .* /bad-browser.shtml [L,H=alias]

This works in the sense that I get the page I want, but I also get a
404 error because the URL doesn't map to anything mod_alias can handle
successfully.

I also tried this:

RewriteRule .* /bad-browser.shtml [L,F]

This gives me a 403 response code, httpd's standard forbidden page,
and a 500 response code in the access log (looks like a runaway
redirect... I'll have to fix that).

Does anyone have any suggestions for getting:

1. My custom page rendered
2. A 403 (or any specific) response code sent to the browser

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

iEYEARECAAYFAkwreD0ACgkQ9CaO5/Lv0PAdXACfaFIM1rOEuuUi57+9tQfC0m/C
OMAAnix1Hk+xb2YT6UvffIVWABYooT1R
=GFja
-END PGP SIGNATURE-

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



One question about change port to 80

2010-06-30 Thread Yue Yuanyuan
Hi,
  I am setting a server on Amazon cloud. Cent OS 5.3 and tomcat 6.0.26.
Everything works fine. Then I want to change the port from 8080 to 80.
The server.xml file was modified to
Connector port=80 protocol=HTTP/1.1
nnector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
I restarted the server and  got the error that permission denied. But I am
using root directly to do the operation. So the permission should not be a
problem.
Then I tried to change the port into  or others. They all do not work.
 Is there any other setting I should change?  Thank you so much.
best regards,
gavin


JK connector and extra characters showing up

2010-06-30 Thread David Brown
Problem:

Extra characters showing up in some content delivered from tomcat. I believe
they are from the JK connector when it breaks up the content into 8k
packets.


Setup:

Tomcat 5.5  -  JK 1.2.30  - SunOne 6.1sp11


I tested using Apache2 and the problem does not show up there. Using apache
is not an option here.



Here are some snippets of packet captures (tcpdump) to show what I mean.



Tomcat to web server through JK connector, same for Sun One and Apache


0090   20 47 4d 54 00 00 0c 43 6f 6e 74 65 6e 74 2d 54   GMT...Content-T

00a0   79 70 65 00 00 08 74 65 78 74 2f 63 73 73 00 00  ype...text/css..

00b0   0e 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 00  .Content-Length.

00c0   00 05 32 32 33 37 33 00 41 42 1f fc 03 1f f8 40  ..22373.AB.@

00d0   43 48 41 52 53 45 54 20 22 55 54 46 2d 38 22 3b  CHARSET UTF-8;

00e0   23 74 70 63 72 7b 62 61 63 6b 67 72 6f 75 6e 64  #tpcr{background

00f0   2d 63 6f 6c 6f 72 3a 57 68 69 74 65 3b 6d 61 72  -color:White;mar

0100   67 69 6e 3a 31 30 70 78 20 30 20 32 30 70 78 20  gin:10px 0 20px



Browser from Apache


0120   76 65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65  ve..Content-Type

0130   3a 20 74 65 78 74 2f 63 73 73 0d 0a 0d 0a 40 43  : text/css@c

0140   48 41 52 53 45 54 20 22 55 54 46 2d 38 22 3b 23  HARSET UTF-8;#

0150   74 70 63 72 7b 62 61 63 6b 67 72 6f 75 6e 64 2d  tpcr{background-

0160   63 6f 6c 6f 72 3a 57 68 69 74 65 3b 6d 61 72 67  color:White;marg

0170   69 6e 3a 31 30 70 78 20 30 20 32 30 70 78 20 30  in:10px 0 20px 0



Browser from SunOne


00e0   47 4d 54 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70  GMT..Content-Typ

00f0   65 3a 20 74 65 78 74 2f 63 73 73 0d 0a 43 6f 6e  e: text/css..Con

0100   74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 32 33  tent-Length: 223

0110   37 33 0d 0a 54 72 61 6e 73 66 65 72 2d 65 6e 63  73..Transfer-enc

0120   6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a  oding: chunked..

0130   0d 0a 31 66 66 38 0d 0a 40 43 48 41 52 53 45 54  ..1ff...@charset

0140   20 22 55 54 46 2d 38 22 3b 23 74 70 63 72 7b 62   UTF-8;#tpcr{b

0150   61 63 6b 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a  ackground-color:

0160   57 68 69 74 65 3b 6d 61 72 67 69 6e 3a 31 30 70  White;margin:10p

0170   78 20 30 20 32 30 70 78 20 30 3b 7d 0a 23 74 70  x 0 20px 0;}.#tp



The first snippet is from between the web server and tomcat through the JK
connector. This looks the same for either Apache or SunOne.

The thing to note is line 00c0 where the hex is 1f f8.


The second snippet is when a browser hits Apache. The thing to note is line
0130 where the hex is 0d 0a 0d 0a. (carriage return, line feed, carriage
return, line feed)


The third snippet is when a browser hits SunOne for the same file. Here on
line 0130 there is  0d 0a 31 66 66 38 0d 0a, notice the extra 4 characters
between the carriage return/line feeds.


And that is where my problem lies. These characters 1ff8 are showing up in
the body of the content and is causing errors.


I've been looking over the jk_nsapi_plugin.c code but I haven't worked in C
in over a decade so I'm fairly lost.


Is there any way to get the JK Connector to work the same for SunOne as it
does for Apache?


RE: One question about change port to 80

2010-06-30 Thread Caldarale, Charles R
 From: Yue Yuanyuan [mailto:yue.yuany...@gmail.com]
 Subject: One question about change port to 80
 
 The server.xml file was modified to
 Connector port=80 protocol=HTTP/1.1
 nnector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /

Well, that 'nnector port=8080' you've got in there doesn't look particularly 
attractive...

 But I am using root directly to do the operation.

Which you really, really shouldn't be doing.
http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F

 Then I tried to change the port into  or others. 
 They all do not work.

Fix your editing of the Connector element, then check the firewall and 
iptables settings.

 - 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: One question about change port to 80

2010-06-30 Thread Yue Yuanyuan
Thank you. That is just the copy/paste mistake.
Even the file is right:
 Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
It still does not work.  I tried iptables -F. It still does not work.
And I tried to install apache httpd on the server. It could work on port 80
and there is no problem for apache.
By the way, when I changed the port to . I could see that the tomcat is
listening on  but I cannot connect to it.  Only 8080 works.
Thank you for the helps.
best,
gavin


On Wed, Jun 30, 2010 at 3:31 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Yue Yuanyuan [mailto:yue.yuany...@gmail.com]
  Subject: One question about change port to 80
 
  The server.xml file was modified to
  Connector port=80 protocol=HTTP/1.1
  nnector port=8080 protocol=HTTP/1.1
 connectionTimeout=2
 redirectPort=8443 /

 Well, that 'nnector port=8080' you've got in there doesn't look
 particularly attractive...

  But I am using root directly to do the operation.

 Which you really, really shouldn't be doing.

 http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F

  Then I tried to change the port into  or others.
  They all do not work.

 Fix your editing of the Connector element, then check the firewall and
 iptables settings.

  - 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: One question about change port to 80

2010-06-30 Thread Caldarale, Charles R
 From: Yue Yuanyuan [mailto:yue.yuany...@gmail.com]
 Subject: Re: One question about change port to 80
 
 And I tried to install apache httpd on the server. It 
 could work on port 80 and there is no problem for apache.

So have you tried using the non-root mechanisms for Tomcat as described in the 
link I gave you?

 By the way, when I changed the port to . I could see 
 that the tomcat is listening on  but I cannot connect
 to it.

Since you're running on an Amazon VM, they might not have opened up that port 
on the underlying real 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.


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



Re: One question about change port to 80

2010-06-30 Thread Yue Yuanyuan
I think i figure out what is going on. I need to run tomcat using root. But
even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
stills runs under tomcat users.
So how could I run it using root?
Thank you.
Best,
Gavin

On Wed, Jun 30, 2010 at 3:46 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Yue Yuanyuan [mailto:yue.yuany...@gmail.com]
  Subject: Re: One question about change port to 80
 
  And I tried to install apache httpd on the server. It
  could work on port 80 and there is no problem for apache.

 So have you tried using the non-root mechanisms for Tomcat as described in
 the link I gave you?

  By the way, when I changed the port to . I could see
  that the tomcat is listening on  but I cannot connect
  to it.

 Since you're running on an Amazon VM, they might not have opened up that
 port on the underlying real 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.


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




Re: One question about change port to 80

2010-06-30 Thread Paweł Zuzelski
On Wed, 30 Jun 2010, Yue Yuanyuan wrote:

 I think i figure out what is going on. I need to run tomcat using root. But
 even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
 stills runs under tomcat users.
 So how could I run it using root?

It is a bad idea. Just use iptables to redirect 80 to .

iptables -A PREROUTING -t nat -p tcp -dport 80 -j REDIRECT --to-ports 

(not tested, see man iptables for details).

It is the simplest and the most reliable way to run tomcat on port 80.

-- 
Regards,
Paweł

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



Re: One question about change port to 80

2010-06-30 Thread Yue Yuanyuan
is it a good idea to use vhost like this :
http://www.javathinking.com/2007/10/tomcat-with-apache2-virtual-hosts/
Thank you.
Best,
Gavin

2010/6/30 Paweł Zuzelski z...@xatka.net

 On Wed, 30 Jun 2010, Yue Yuanyuan wrote:

  I think i figure out what is going on. I need to run tomcat using root.
 But
  even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
  stills runs under tomcat users.
  So how could I run it using root?

 It is a bad idea. Just use iptables to redirect 80 to .

 iptables -A PREROUTING -t nat -p tcp -dport 80 -j REDIRECT --to-ports 

 (not tested, see man iptables for details).

 It is the simplest and the most reliable way to run tomcat on port 80.

 --
 Regards,
 Paweł

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




Re: One question about change port to 80

2010-06-30 Thread Pid
On 30/06/2010 21:51, Yue Yuanyuan wrote:
 is it a good idea to use vhost like this :
 http://www.javathinking.com/2007/10/tomcat-with-apache2-virtual-hosts/
 Thank you.
 Best,
 Gavin

That's an article from 2007.  Things have moved on since then.

Unless you really need HTTPD for some reason - you'll know if you do -
Tomcat is perfectly adequate and serves static files just as fast as HTTPD.

Instead of trying lots of different ways of installing Tomcat when you
run into a problem, let's try and resolve the particular issue you're
having.


If you've run Tomcat as root, and then run it as user 'tomcat' using
jsvc, you must remember to check all of the ownership permissions have
been changed on the tomcat installation to the 'tomcat' user.

Was the server actually running?

Did you check to see if Tomcat was actually listening on the port?


p


 2010/6/30 Paweł Zuzelski z...@xatka.net
 
 On Wed, 30 Jun 2010, Yue Yuanyuan wrote:

 I think i figure out what is going on. I need to run tomcat using root.
 But
 even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
 stills runs under tomcat users.
 So how could I run it using root?

 It is a bad idea. Just use iptables to redirect 80 to .

 iptables -A PREROUTING -t nat -p tcp -dport 80 -j REDIRECT --to-ports 

 (not tested, see man iptables for details).

 It is the simplest and the most reliable way to run tomcat on port 80.

 --
 Regards,
 Paweł

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


 




signature.asc
Description: OpenPGP digital signature


need help setting up tomcat with ssl client authentication

2010-06-30 Thread Ralph Carlson
tomcat version 6.0.20
os: windows xp sp3 professional edition
sun java jdk 1.5.11

I am trying to do the following
(a) create a certificate authority and self sign server and client certificates 
using openssl and keytool
(b) import the keytool keystore into tomcat
(c) verify the certificate chaing using openssl verify (which does work and 
returns ok for all 3 certificates)
(d) have client Authorization on - with it off tomcat ssl works just fine, when 
its turned on I get this error
so far I have been following the steps listed in this tomcat user group message
http://marc.info/?l=tomcat-userm=106293430225790w=2

but get this message from openssl s_client -cert c:\ssl\client\client.pem 
-CAfile c:\ssl\ca\ca.pem -connect localhost:443

3772:error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate 
unknown:.\ssl\s3_pkt.c:1061:SSL alert number 46
3772:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake 
failure:.\ssl\s23_lib.c:188:

and these messages from firefox (after importing the certificate)
initially 'sslv3 alert certificate unknown' , then just 'SSL peer was not 
expecting a handshake message it received' after a few tries

does anyone know how to do this or has anyone done this before,
thanks for you help in advance

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



Re: One question about change port to 80

2010-06-30 Thread Yue Yuanyuan
It is running. I did iptables now it works fine. I also did test on my
ubuntu. There is no problem. I just do not get it why I run the tomcat using
ROOT, but still I do not have the privilege to bind 80 port.


2010/6/30 Pid p...@pidster.com

 On 30/06/2010 21:51, Yue Yuanyuan wrote:
  is it a good idea to use vhost like this :
  http://www.javathinking.com/2007/10/tomcat-with-apache2-virtual-hosts/
  Thank you.
  Best,
  Gavin

 That's an article from 2007.  Things have moved on since then.

 Unless you really need HTTPD for some reason - you'll know if you do -
 Tomcat is perfectly adequate and serves static files just as fast as HTTPD.

 Instead of trying lots of different ways of installing Tomcat when you
 run into a problem, let's try and resolve the particular issue you're
 having.


 If you've run Tomcat as root, and then run it as user 'tomcat' using
 jsvc, you must remember to check all of the ownership permissions have
 been changed on the tomcat installation to the 'tomcat' user.

 Was the server actually running?

 Did you check to see if Tomcat was actually listening on the port?


 p


  2010/6/30 Paweł Zuzelski z...@xatka.net
 
  On Wed, 30 Jun 2010, Yue Yuanyuan wrote:
 
  I think i figure out what is going on. I need to run tomcat using root.
  But
  even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
  stills runs under tomcat users.
  So how could I run it using root?
 
  It is a bad idea. Just use iptables to redirect 80 to .
 
  iptables -A PREROUTING -t nat -p tcp -dport 80 -j REDIRECT --to-ports
 
 
  (not tested, see man iptables for details).
 
  It is the simplest and the most reliable way to run tomcat on port 80.
 
  --
  Regards,
  Paweł
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 





Re: need help setting up tomcat with ssl client authentication

2010-06-30 Thread Pid
On 30/06/2010 22:07, Ralph Carlson wrote:
 tomcat version 6.0.20
 os: windows xp sp3 professional edition
 sun java jdk 1.5.11
 
 I am trying to do the following
 (a) create a certificate authority and self sign server and client 
 certificates using openssl and keytool
 (b) import the keytool keystore into tomcat
 (c) verify the certificate chaing using openssl verify (which does work and 
 returns ok for all 3 certificates)
 (d) have client Authorization on - with it off tomcat ssl works just fine, 
 when its turned on I get this error

Which error?  What is in the Tomcat logs when the problem occurs?

 so far I have been following the steps listed in this tomcat user group 
 message
 http://marc.info/?l=tomcat-userm=106293430225790w=2

How did you configure Tomcat to use the certificates in (b)?

What is your Tomcat Connector config in server.xml?


p


 but get this message from openssl s_client -cert c:\ssl\client\client.pem 
 -CAfile c:\ssl\ca\ca.pem -connect localhost:443
 
 3772:error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate 
 unknown:.\ssl\s3_pkt.c:1061:SSL alert number 46
 3772:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake 
 failure:.\ssl\s23_lib.c:188:
 
 and these messages from firefox (after importing the certificate)
 initially 'sslv3 alert certificate unknown' , then just 'SSL peer was not 
 expecting a handshake message it received' after a few tries
 
 does anyone know how to do this or has anyone done this before,
 thanks for you help in advance
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


Re: spring-webmvc-portlet annotations: File /WEB-INF/servlet/view not found

2010-06-30 Thread Norris Shelton
After much trial an error.  I found the problem.  Vignette Portal does not map 
URLs below WEB-INF.

I had to map it to /somePublicUrl and it worked fine.





 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: André Warnier a...@ice-sa.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, June 30, 2010 10:08:51 AM
Subject: Re: spring-webmvc-portlet annotations: File 
quot;/WEB-INF/servlet/viewquot; not found

Norris Shelton wrote:
 I have compared the configuration to multiple examples and it appears to be 
 set-up correctly.  There is another question similar to this with the exact 
 problem, also on Tomcat/Vignette.  
 
 Attached are the files, since the pasting earlier did not work.
 
Norris,

I know nothing about portals, nor Vignette, nor spring or whatever, so the 
following is just a vague idea based on this portion of the logfile :

2010-06-28 16:08:32  DEBUG - Including resource [/WEB-INF/jsp/normal.jsp] in 
InternalResourceView 'normal' 
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel:227
2010-06-28 16:08:32  ERROR - Could not complete request 
org.springframework.web.portlet.FrameworkPortlet.processRequest:559 
javax.portlet.PortletException: javax.servlet.ServletException: File 
quot;/WEB-INF/servlet/viewquot; not found
at 
com.vignette.portal.portlet.jsrcontainer.internal.standardcontainer.invocation.apiimpl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:327)
 ~[na:na]
at 
org.springframework.web.portlet.DispatcherPortlet.doRender(DispatcherPortlet.java:1137)


I doubt (but I am not sure) that a logging module would wilfully HTML-escape 
real quotation marks in a message before printing it to the logfile.

To me it thus looks like some module is trying to render some html code, in 
the course of which it is supposed to read, and interpret the file 
/WEB-INF/jsp/normal.jsp.
In that file, it finds some kind of include instruction which should give it 
the (relative?) path of another file/thing to include here.
That file/thing path should be :
/WEB-INF/servlet/view
or maybe the same between quotation marks :
/WEB-INF/servlet/view

However, instead it finds :
quot;/WEB-INF/servlet/viewquot;
which looks as if something already went through the page that contains this 
link (normal.jsp ?), and already HTML-escaped the surrounding quotation marks 
into
quot;
sequences, as if this was part of the html text of the page instead of an 
include instruction.

Of course, whatever is trying to open that to-include file/thing is never going 
to find it, because there is no file/thing starting with quot anywhere.

What does that include line look like, in the normal.jsp file ?



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


  

Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly

2010-06-30 Thread rahul
Dear Users,

We are trying to upgrade the Tomcat version from existing
4.1.31 to the latest available release 6.0.26. In the
process, I did the following changes – 

1. Downloaded the Tomcat 6.0.26 basic distribution file -
apache-tomcat-6.0.26.zip from the website.
2. Unbundled it and deployed the web application on my
workstation – Windows XP SP2 - first.
3. Ran the Tomcat and the application worked without any
trouble. 
4. Now, tried to test the same in UNIX (As the productive
environment is UNIX) – the version and details of the
system is as given in the subject line - , by copying the
distribution and the source code with ANT build.
5. Built and deployed the application in the UNIX itself. 
6. Ran the application and observed that it did not work
properly. The details are as explained below- 


First Page - The index page comes fine where some menu
items are displayed.
Second Page - After clicking on Work List Details it
loads the second page that displays all the search criteria
- perfectly.
Third Page - After selecting the criteria, the user click
on Search button and there is a page opens with 404 -
Page is unavailable. However, on clicking the back button
of the IE, the search result appears. 

Attached are the log files extracts. For Windows log -
windowsLog.log and for UNIX it is UnixLog.log. 

Apparently, this particular information goes missing from
the log on pressing Search button while running in UNIX.
Its only after clicking browser's back button that the
following appears in the log and the page gets displayed as
well. There is absolutely no error/exception that is visible
in any of the logs. **NOTE - these logs extracts are from
Catalina.bat/Catalina.sh output. Also attached is the screen
short for page cannot be displayed message. 

{ Information Message | 2010-06-30 11:46:49.479 |
Thread[http-8080-1,5,main] | 
org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service()
start - URI=/workbench/Jsp/WorkOrderList.jsp
{ SQL Statement | 2010-06-30 11:46:49.479 |
Thread[http-8080-1,5,main] | 
com.salmonllc.sql.DBStatement} executeQuery() SELECT
WEB_USER.USER_ID,WEB_USER.DISABLED,WEB_USER_ROLE.ROLE_ID,WEB_ROLE_COMP_ACS_LVLS.APPLICATION_ID,WEB_ROLE_COMP_ACS_LVLS.SCREEN_ID,WEB_ROLE_COMP_ACS_LVLS.COMPONENT_ID,WEB_ROLE_COMP_ACS_LVLS.ROLE_ID
 
FROM WEB_USER,WEB_USER_ROLE,WEB_ROLE_COMP_ACS_LVLS 
WHERE (WEB_USER.USER_ID=WEB_USER_ROLE.USER_ID AND
WEB_USER_ROLE.ROLE_ID=WEB_ROLE_COMP_ACS_LVLS.ROLE_ID) AND
(WEB_USER.USER_ID='MSDOMAIN\rrahul' AND
WEB_USER.DISABLED='N' AND
WEB_ROLE_COMP_ACS_LVLS.SCREEN_ID='work_order_list')
{ Debug | 2010-06-30 11:46:49.494 |
Thread[http-8080-1,5,main] | 
com.salmonllc.jsp.tags.DataSourceTag} Returning SKIP_BODY {
Information Message | 2010-06-30 11:46:49.557 |
Thread[http-8080-1,5,main] | 
org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service()
end - URI=/workbench/Jsp/WorkOrderList.jsp Time=78
Init=false


Please assist me in figuring out what is going on or what
am I doing wrong. Please reply me on: iamrahu...@yahoo.com
or/and rahul.ra...@eb-services.com.au



Thanks and Regards,
Rahul
EB-Services (SP-Ausnet) EAI Team
Mobile: +61 413650106
Phone: +61 3 96068387


      




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

using Servlet Filter to rewrite domain of JSESSIONID cookie?

2010-06-30 Thread Nikita Tovstoles
I'd like to make session cookie domain-wide, and ignore subdomains - in
Tomcat 6. So for app reachable via my.site.com and www.site.com, I'd like to
have session cookie's domain be .site.com. I thought of doing so using a
ServletResponseWrapper and a servlet Filter:

@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException,
ServletException
{
if (!(response instanceof
SessionCookieDomainSettingServletResponseWrapper))
{
response = new
SessionCookieDomainSettingServletResponseWrapper((HttpServletResponse)
response);
}
chain.doFilter(request, response);
}

and in wrapper:
@Override
public void addCookie(Cookie cookie)
{
if (cookie != null  SESSION_COOKIE_NAME.equals(cookie.getName()))
{
// update domain name to just the domain
stripSubDomain(cookie);
}
super.addCookie(cookie);
}

However, JSESSIONID continues to be set to FQ host name (my.site.com).

Is it because Tomcat internals do not use HttpServletResponse.addCookie() to
set JSESSIONID or is that cookie set before filter chain gets executed?

If so, sounds like Filter is (sadly) not applicable for this case, and I
have to create a custom Valve? Any tips on how to
wrap org.apache.catalina.connector.Response - valve.invoke() does not take
HttpServletResponse...

thanks
-nikita


RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly

2010-06-30 Thread Caldarale, Charles R
 From: rahul [mailto:iamrahu...@yahoo.com]
 Subject: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc -
 Web application unable to execute properly
 
 5. Built and deployed the application in the UNIX itself.

If the application is pure Java, that step was unnecessary.  What happens if 
you take the .war file (or .class files) from the Solaris box and run them on 
Windows?  Does the app misbehave there as well?

Likewise, what happens if you take what's running on Windows and deploy it on 
Solaris?  Does it run properly?

Also, post your server.xml for Tomcat 6.0.26; lots of things changed between 
4.1 and 6.0, and if any config items were copied over verbatim, that might 
create problems.

 Third Page - After selecting the criteria, the user click
 on Search button and there is a page opens with 404 -
 Page is unavailable. However, on clicking the back button
 of the IE, the search result appears.

Turn on Tomcat's access logging and see what's coming in.

 Attached are the log files extracts.

Nope; the mailing list strips almost all attachments.  Post them inline, or put 
them in some public location on the web.

 Please assist me in figuring out what is going on or what
 am I doing wrong.

Case problems?  Windows is not case-sensitive, Solaris is.

 Please reply me on: iamrahu...@yahoo.com
 or/and rahul.ra...@eb-services.com.au

No, replies should go only to the mailing list, not to individuals.

 - 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: need help setting up tomcat with ssl client authentication

2010-06-30 Thread Ralph Carlson
the tomcats logs have no errors in them, they end after start up (I haven't 
installed any apps yet, just trying to get to the tomcat manager with ssl)


Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=true 
   keystoreFile=/server.ks 
   keystorePass=MC126801$
   sslProtocol=TLS /


I configured the tomcat keystore as follows (openssl commands included):

   [1] create folders c:\ssl\ca, c:\ssl\server and c:\ssl\client and ca.srl 
with 02
   [2] openssl req -new -newkey rsa:1024 -nodes -out c:\ssl\ca\ca.csr -keyout 
c:\ssl\ca\ca.key -config C:\ssl\openssl.cnf
  country=US
  state=newyork
  city=fishkill
  organization_name=myca
  organization_unit=myca
  common_name=myca
  email=racarl...@medaicomcc.com
   [3] openssl x509 -trustout -signkey c:\ssl\ca\ca.key -days 365 -req -in 
c:\ssl\ca\ca.csr -out c:\ssl\ca\ca.pem
   [4] keytool -import -keystore %JAVA_HOME%/jre/lib/security/cacerts -file 
C:\ssl\ca\ca.pem -alias my_ca
**[5] keytool -genkey -alias tomcat -keyalg RSA -keysize 1024 -keystore 
C:\ssl\server\server.ks -storetype JKS
What is your first and last name? myserver.localhost.com
What is the name of your organizational unit? mycompany
What is the name of your organization? mycompany
What is the name of your City or Locality? fishkill
What is the name of your State or Province? newyork
What is the two-letter country code for this unit?  US
**[6] keytool -certreq -keyalg RSA -alias tomcat -file C:\ssl\server\server.csr 
-keystore C:\ssl\server\server.ks
   [7] amend the text which reads NEW CERTIFICATE REQUEST to CERTIFICATE 
REQUEST
   [8] openssl x509 -CA C:\ssl\ca\ca.pem -CAkey C:\ssl\ca\ca.key -CAserial 
C:\ssl\ca\ca.srl -req -in C:\ssl\server\server.csr -out 
C:\ssl\server\server.crt -days 365
**[9] keytool -import -alias tomcat -keystore C:\ssl\server\server.ks 
-trustcacerts -file C:\ssl\server\server.crt
**[10] keytool -import -alias my_ca -keystore C:\ssl\server\server.ks 
-trustcacerts -file C:\ssl\ca\ca.pem
   [11] openssl req -new -newkey rsa:512 -nodes -out C:\ssl\client\client1.req 
-keyout C:\ssl\client\client1.key
Country Name ? US
State or Province Name ? newyork
Locality Name (eg, city) ? fishkill
Organization Name ? mycompany
Organizational Unit Name ? mycompany
Common Name (eg, YOUR name) ? localhost -- this value is in 
tomcat-users.xml
Email Address ? racarl...@mediacomcc.com
   [12] openssl x509 -CA C:\ssl\ca\ca.pem -CAkey C:\ssl\ca\ca.key 
-CAserial C:\ssl\ca\ca.srl -req -in C:\ssl\client\client1.req -out 
C:\ssl\client\client1.pem -days 365
   [13] openssl pkcs12 -export -clcerts -in C:\ssl\client\client1.pem 
-inkey C:\ssl\client\client1.key -out C:\ssl\client\client1.p12 -name 
my_client_certificate

I also tried importing the client.pem and apache.pem from below into the 
keystore (not change in error)
openssl pkcs12 -in c:\ssl\client\client1.p12 -out c:\ssl\client\apache.pem 
-nodes -passin pass:MC126801$



From: users-return-214164-racarlson=mediacomcc@tomcat.apache.org 
[users-return-214164-racarlson=mediacomcc@tomcat.apache.org] On Behalf Of 
Pid [...@pidster.com]
Sent: Wednesday, June 30, 2010 5:25 PM
To: Tomcat Users List
Subject: Re: need help setting up tomcat with ssl client authentication

On 30/06/2010 22:07, Ralph Carlson wrote:
 tomcat version 6.0.20
 os: windows xp sp3 professional edition
 sun java jdk 1.5.11

 I am trying to do the following
 (a) create a certificate authority and self sign server and client 
 certificates using openssl and keytool
 (b) import the keytool keystore into tomcat
 (c) verify the certificate chaing using openssl verify (which does work and 
 returns ok for all 3 certificates)
 (d) have client Authorization on - with it off tomcat ssl works just fine, 
 when its turned on I get this error

Which error?  What is in the Tomcat logs when the problem occurs?

 so far I have been following the steps listed in this tomcat user group 
 message
 http://marc.info/?l=tomcat-userm=106293430225790w=2

How did you configure Tomcat to use the certificates in (b)?

What is your Tomcat Connector config in server.xml?


p


 but get this message from openssl s_client -cert c:\ssl\client\client.pem 
 -CAfile c:\ssl\ca\ca.pem -connect localhost:443

 3772:error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate 
 unknown:.\ssl\s3_pkt.c:1061:SSL alert number 46
 3772:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake 
 failure:.\ssl\s23_lib.c:188:

 and these messages from firefox (after importing the certificate)
 initially 'sslv3 alert certificate unknown' , then just 'SSL peer was not 
 expecting a handshake message it received' after a few tries

 does anyone know how to do this or has anyone done this before,
 thanks for you help in advance

 

RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly

2010-06-30 Thread rahul
Hello Charles

Thanks for extremely prompt reply :). First answers to your question:
1. Replacing the Windows war file with the one in UNIX, works fine. 
2. Replacing the UNIX war file with that in Windows mis-behaves. 

Some more clarification - 
When I started the upgrade test after testing successfully in the workstation, 
I copied the entire war from Windows to UNIX. The application uses certain 
properties files where the file system references are provided. Those 
references were changed to map to the UNIX file systems in the properties 
files. The server.xml ports were chamnged. I am attaching the same here with as 
requested. Also, tomcat-users.xml was changed to add the admin user for 
manager role. It did not work that is mis-behaved the same way as explained 
in my first email.

Then I tried copying the whole source code to UNIX with ANT utility. Built 
there and deployed there itself, ending up with the same result. 

Please let me know whether I am able to get you a bit clearer picture. Is there 
any way  I can give you a call, if you have any contact number? Where are you 
located? May be this way we can clarify the things more quickly. I have become 
a bit desperate now, trying to get some hint on this issue for around 2 days 
now.:)

Your help is appreciated. 

Best Regards,
Rahul
--- On Thu, 7/1/10, Caldarale, Charles R chuck.caldar...@unisys.com wrote:

 From: Caldarale, Charles R chuck.caldar...@unisys.com
 Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - 
 Web application unable to execute properly
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, July 1, 2010, 3:49 AM
  From: rahul [mailto:iamrahu...@yahoo.com]
  Subject: Tomcat 6.0.26 with Java 6 update 20 on Sun
 Solaris 5.8 Sparc -
  Web application unable to execute properly
  
  5. Built and deployed the application in the UNIX
 itself.
 
 If the application is pure Java, that step was
 unnecessary.  What happens if you take the .war file
 (or .class files) from the Solaris box and run them on
 Windows?  Does the app misbehave there as well?
 
 Likewise, what happens if you take what's running on
 Windows and deploy it on Solaris?  Does it run
 properly?
 
 Also, post your server.xml for Tomcat 6.0.26; lots of
 things changed between 4.1 and 6.0, and if any config items
 were copied over verbatim, that might create problems.
 
  Third Page - After selecting the criteria, the user
 click
  on Search button and there is a page opens with 404
 -
  Page is unavailable. However, on clicking the back
 button
  of the IE, the search result appears.
 
 Turn on Tomcat's access logging and see what's coming in.
 
  Attached are the log files extracts.
 
 Nope; the mailing list strips almost all attachments. 
 Post them inline, or put them in some public location on the
 web.
 
  Please assist me in figuring out what is going on or
 what
  am I doing wrong.
 
 Case problems?  Windows is not case-sensitive, Solaris
 is.
 
  Please reply me on: iamrahu...@yahoo.com
  or/and rahul.ra...@eb-services.com.au
 
 No, replies should go only to the mailing list, not to
 individuals.
 
  - 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.
 



  ?xml version='1.0' encoding='utf-8'?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
!-- Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves at this level.
 Documentation at /docs/config/server.html
 --
Server port=5005 shutdown=SHUTDOWN

  !--APR library loader. Documentation at /docs/apr.html --
  Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on /
  !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --
  Listener className=org.apache.catalina.core.JasperListener /
  !-- Prevent memory leaks due to use of particular java/javax APIs--
  Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
  !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --
  Listener 

Re: One question about change port to 80

2010-06-30 Thread André Warnier

Yue Yuanyuan wrote:

It is running. I did iptables now it works fine. I also did test on my
ubuntu. There is no problem. I just do not get it why I run the tomcat using
ROOT, but still I do not have the privilege to bind 80 port.



Probably because you are /not/ running Tomcat as root.
You are running the script /etc/init.d/tomcatx.y as root.
But that script does not run Tomcat directly. It runs jsvc, which runs Tomcat as another 
user (probably tomcat, check with ps -ef).

Examine the script /etc/init.d/tomcatx.y, to see what it does.

It is a good way to run Tomcat, so don't change it.


By the way, that script is not a part of the official Tomcat distribution from 
http://tomcat.apache.org. It is a script created by the people who packaged Tomcat for 
CentOS.  So not many people here know what it really does.





2010/6/30 Pid p...@pidster.com


On 30/06/2010 21:51, Yue Yuanyuan wrote:

is it a good idea to use vhost like this :
http://www.javathinking.com/2007/10/tomcat-with-apache2-virtual-hosts/
Thank you.
Best,
Gavin

That's an article from 2007.  Things have moved on since then.

Unless you really need HTTPD for some reason - you'll know if you do -
Tomcat is perfectly adequate and serves static files just as fast as HTTPD.

Instead of trying lots of different ways of installing Tomcat when you
run into a problem, let's try and resolve the particular issue you're
having.


If you've run Tomcat as root, and then run it as user 'tomcat' using
jsvc, you must remember to check all of the ownership permissions have
been changed on the tomcat installation to the 'tomcat' user.

Was the server actually running?

Did you check to see if Tomcat was actually listening on the port?


p



2010/6/30 Paweł Zuzelski z...@xatka.net


On Wed, 30 Jun 2010, Yue Yuanyuan wrote:


I think i figure out what is going on. I need to run tomcat using root.

But

even I su to root and start tomcat using /etc/init.d/tomcat6 start. It
stills runs under tomcat users.
So how could I run it using root?

It is a bad idea. Just use iptables to redirect 80 to .

iptables -A PREROUTING -t nat -p tcp -dport 80 -j REDIRECT --to-ports



(not tested, see man iptables for details).

It is the simplest and the most reliable way to run tomcat on port 80.

--
Regards,
Paweł

-
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: need help setting up tomcat with ssl client authentication

2010-06-30 Thread Pid
On 30/06/2010 23:45, Ralph Carlson wrote:
 the tomcats logs have no errors in them, they end after start up (I haven't 
 installed any apps yet, just trying to get to the tomcat manager with ssl)

Are you using APR?

This path:

keystoreFile=/server.ks 

doesn't appear to match this path:

 C:\ssl\server\server.ks 

Are there any errors in the logs, or displayed on the console, when
Tomcat starts up?  (How are you starting the server, as a service, or
using startup.bat?)


p



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly

2010-06-30 Thread Pid
On 30/06/2010 23:58, rahul wrote:

 Is there any way  I can give you a call, if you have any contact number? 

See below.

 No, replies should go only to the mailing list, not to
 individuals.

We keep all discussions on the list, that way other people can learn
from them too.  You can think of it as the 'price' of free help.


p



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly

2010-06-30 Thread rahul
Thanks Pid. Your points noted. 

Any pointers to the issues will be appreciated. 

Kind Regards,
Rahul

--- On Thu, 7/1/10, Pid p...@pidster.com wrote:

 From: Pid p...@pidster.com
 Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - 
 Web application unable to execute properly
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, July 1, 2010, 4:51 AM
 On 30/06/2010 23:58, rahul wrote:
 
  Is there any way  I can give you a call, if you
 have any contact number? 
 
 See below.
 
  No, replies should go only to the mailing list,
 not to
  individuals.
 
 We keep all discussions on the list, that way other people
 can learn
 from them too.  You can think of it as the 'price' of
 free help.
 
 
 p
 
 




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



[OT] Using httpd's mod_rewrite with mod_jk

2010-06-30 Thread Terence M. Bandoian

Hi, Chris-

This should redirect to /bad-browser.shtml:

   RewriteCond %{HTTP_USER_AGENT} Firefox/
   RewriteCond %{HTTP_USER_AGENT} 
!Firefox/(3\.0\.19|3\.5\.9|3\.6\.3)($|[^\.0-9])

   RewriteRule .* /bad-browser.shtml [R=307,L]

Looks just about like what you already had though.

I'm not sure the substitution is applied with F(orbidden).

-Terence Bandoian


Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

Slightly off-topic, but relevant.

On our development servers, I'm trying to enforce a rule that all our
users have the most up-to-date web browser available (yeah, it's an
uphill battle, I know... just go with it).

I decided to use mod_rewrite to check for a User-Agent pattern and then
forward to a bad browser page, which works well for static content,
but not for requests destined to be handled by mod_jk.

Here's what I've got:

# Handle Mozilla Firefox
RewriteCond %{HTTP_USER_AGENT} Firefox/
RewriteCond %{HTTP_USER_AGENT}
!(Firefox/(3\.0\.19|3\.5\.9|3\.6\.3)($|[^\.0-9]))
RewriteRule .* /bad-browser.shtml [L]

For dynamic requests, this will happily allow the request to go through
to mod_jk.

I also tried this:

RewriteRule .* /bad-browser.shtml [L,H=alias]

This works in the sense that I get the page I want, but I also get a
404 error because the URL doesn't map to anything mod_alias can handle
successfully.

I also tried this:

RewriteRule .* /bad-browser.shtml [L,F]

This gives me a 403 response code, httpd's standard forbidden page,
and a 500 response code in the access log (looks like a runaway
redirect... I'll have to fix that).

Does anyone have any suggestions for getting:

1. My custom page rendered
2. A 403 (or any specific) response code sent to the browser

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

iEYEARECAAYFAkwreD0ACgkQ9CaO5/Lv0PAdXACfaFIM1rOEuuUi57+9tQfC0m/C
OMAAnix1Hk+xb2YT6UvffIVWABYooT1R
=GFja
-END PGP SIGNATURE-

  


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



RE: need help setting up tomcat with ssl client authentication

2010-06-30 Thread Ralph Carlson
I am starting and stopping tomcat using startup.bat and shutdown.bat from the 
command line
I am not using the apr

I copied /server.ks into c:\tomcat folder in an attempt to get it working
if I change it to a fake name it throws an error so I think its reading it

the console looks like:
Jun 30, 2010 7:46:25 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\Program
Files\Java\jdk1.5.0_17\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;
C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Co
re-Static;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\Java\jdk1.5
.0_17\bin;C:\openssl\bin;
Jun 30, 2010 7:46:25 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 30, 2010 7:46:27 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
Jun 30, 2010 7:46:27 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2248 ms
Jun 30, 2010 7:46:27 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 30, 2010 7:46:27 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Jun 30, 2010 7:46:28 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 30, 2010 7:46:28 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-443
Jun 30, 2010 7:46:28 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 30, 2010 7:46:28 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=null
Jun 30, 2010 7:46:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1274 ms


From: users-return-214173-racarlson=mediacomcc@tomcat.apache.org 
[users-return-214173-racarlson=mediacomcc@tomcat.apache.org] On Behalf Of 
Pid [...@pidster.com]
Sent: Wednesday, June 30, 2010 7:19 PM
To: Tomcat Users List
Subject: Re: need help setting up tomcat with ssl client authentication

On 30/06/2010 23:45, Ralph Carlson wrote:
 the tomcats logs have no errors in them, they end after start up (I haven't 
 installed any apps yet, just trying to get to the tomcat manager with ssl)

Are you using APR?

This path:

keystoreFile=/server.ks

doesn't appear to match this path:

 C:\ssl\server\server.ks

Are there any errors in the logs, or displayed on the console, when
Tomcat starts up?  (How are you starting the server, as a service, or
using startup.bat?)


p


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



RE: using Servlet Filter to rewrite domain of JSESSIONID cookie?

2010-06-30 Thread Ralph Carlson
can you extend org.apache.catalina.connector.Response adding the HttpResponse 
object and its getter/setter
and call that before valve.invoke()

also depending on what you are putting in your cookie and if the users are 
logging on or not (you could also use ipaddress but that is flaky is they are 
using proxies) I usually just put the custom user settings in a database now as 
most virus scanner and malware scanner keep removing my users cookies anyway



From: users-return-214168-racarlson=mediacomcc@tomcat.apache.org 
[users-return-214168-racarlson=mediacomcc@tomcat.apache.org] On Behalf Of 
Nikita Tovstoles [nikita.tovsto...@gmail.com]
Sent: Wednesday, June 30, 2010 6:20 PM
To: Tomcat Users List
Subject: using Servlet Filter to rewrite domain of JSESSIONID cookie?

I'd like to make session cookie domain-wide, and ignore subdomains - in
Tomcat 6. So for app reachable via my.site.com and www.site.com, I'd like to
have session cookie's domain be .site.com. I thought of doing so using a
ServletResponseWrapper and a servlet Filter:

@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException,
ServletException
{
if (!(response instanceof
SessionCookieDomainSettingServletResponseWrapper))
{
response = new
SessionCookieDomainSettingServletResponseWrapper((HttpServletResponse)
response);
}
chain.doFilter(request, response);
}

and in wrapper:
@Override
public void addCookie(Cookie cookie)
{
if (cookie != null  SESSION_COOKIE_NAME.equals(cookie.getName()))
{
// update domain name to just the domain
stripSubDomain(cookie);
}
super.addCookie(cookie);
}

However, JSESSIONID continues to be set to FQ host name (my.site.com).

Is it because Tomcat internals do not use HttpServletResponse.addCookie() to
set JSESSIONID or is that cookie set before filter chain gets executed?

If so, sounds like Filter is (sadly) not applicable for this case, and I
have to create a custom Valve? Any tips on how to
wrap org.apache.catalina.connector.Response - valve.invoke() does not take
HttpServletResponse...

thanks
-nikita

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



Re: Question about BASIC Authentication

2010-06-30 Thread Matthew Mauriello
Christopher,

The behavior seems rather strange to me in fact, I've seen other websites
run on what looks to be BASIC Authentication without popping these browser
messages when leaving secured sections.

See the http://user:passw...@website.com/SOLR is only used once and it
might actually be http://user:passw...@website.com/SOLR/ I have to look
into this.

I feel like the authentication cookie is being created for the user and
then being forwarded to every page the user visits after that.

I am hoping to find some way of preventing this behavior.

~Matt

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Matthew,

 On 6/30/2010 12:07 AM, Matthew Mauriello wrote:
 I have two directories in 'webapps' other than ROOT. ROOT redirects
 users
 to webappA. WebappA does not use tomcat's basic authentication but if
 you
 log into the application there are links inside it that sends the user
 to
 the SOLR webapp via http://user:passw...@website.com/SOLR.

 Ok.

 SOLR uses basic authentication. The problem is once the browser logs
 into
 SOLR the error message pops up when navigating back to WebappA.

 Where is webappA deployed? /webappA? Generally, when the server requests
 BASIC authentication, the client will then provide credentials to the
 server for the original URL plus any URLs that are under it. I wonder
 if you used http://user:passw...@website.com/SOLR/; (note the trailing
 slash) if you might avoid this behavior. I think the browser sees
 http://user:passw...@website.com/SOLR, removes the SOLR from the end
 (because it thinks that's the name of the resource), and then anything
 starting with http://website.com/ will then get the HTTP AUTH headers.

 I understand this isn't the greatest setup but other than the constant
 pop
 up message after logging into SOLR it meets the needs of the very few
 users on the website.

 It's odd that your web browser complains about this... it implies that
 the browser pre-fetches the URL /without/ the authentication header,
 just to see if the server replies with a request-for-authentication
 header. That's actually kind of a nice security feature.

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

 iEYEARECAAYFAkwrUfoACgkQ9CaO5/Lv0PAETACeONnx4nYQFXLwud13KCb9Nu0Z
 GkkAnj28Iz5yxZaZzJGOi7sZThMcZY62
 =50Ze
 -END PGP SIGNATURE-

 -
 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: JK connector and extra characters showing up

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 6/30/2010 3:32 PM, David Brown wrote:
 Problem:
 
 Extra characters showing up in some content delivered from tomcat. I believe
 they are from the JK connector when it breaks up the content into 8k
 packets.
 
 Setup:
 
 Tomcat 5.5  -  JK 1.2.30  - SunOne 6.1sp11

So you're using mod_jk 1.2.30 to connect Tomcat 5.5 and SunOne?

 I tested using Apache2 and the problem does not show up there. Using apache
 is not an option here.

Okay.

 Tomcat to web server through JK connector, same for Sun One and Apache

Is this data /from/ Tomcat /to/ Sun One, or from Sun One /to/ Tomcat?
That is, are we looking at a request or a response? It kind of looks
like a response, but I just want to be sure.

 0090   20 47 4d 54 00 00 0c 43 6f 6e 74 65 6e 74 2d 54   GMT...Content-T
 00a0   79 70 65 00 00 08 74 65 78 74 2f 63 73 73 00 00  ype...text/css..
 00b0   0e 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 00  .Content-Length.
 00c0   00 05 32 32 33 37 33 00 41 42 1f fc 03 1f f8 40  ..22373.AB.@
 00d0   43 48 41 52 53 45 54 20 22 55 54 46 2d 38 22 3b  CHARSET UTF-8;
 00e0   23 74 70 63 72 7b 62 61 63 6b 67 72 6f 75 6e 64  #tpcr{background
 00f0   2d 63 6f 6c 6f 72 3a 57 68 69 74 65 3b 6d 61 72  -color:White;mar
 0100   67 69 6e 3a 31 30 70 78 20 30 20 32 30 70 78 20  gin:10px 0 20px

Can you dump the whole response?

 Browser from Apache
 
 0120   76 65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65  ve..Content-Type
 0130   3a 20 74 65 78 74 2f 63 73 73 0d 0a 0d 0a 40 43  : text/css@c
 0140   48 41 52 53 45 54 20 22 55 54 46 2d 38 22 3b 23  HARSET UTF-8;#
 0150   74 70 63 72 7b 62 61 63 6b 67 72 6f 75 6e 64 2d  tpcr{background-
 0160   63 6f 6c 6f 72 3a 57 68 69 74 65 3b 6d 61 72 67  color:White;marg
 0170   69 6e 3a 31 30 70 78 20 30 20 32 30 70 78 20 30  in:10px 0 20px 0

Why are the hex offsets different? Differing standard headers? Again,
can you post the whole response?

 Browser from SunOne
 
 00e0   47 4d 54 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70  GMT..Content-Typ
 00f0   65 3a 20 74 65 78 74 2f 63 73 73 0d 0a 43 6f 6e  e: text/css..Con
 0100   74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 32 33  tent-Length: 223
 0110   37 33 0d 0a 54 72 61 6e 73 66 65 72 2d 65 6e 63  73..Transfer-enc
 0120   6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a  oding: chunked..
 0130   0d 0a 31 66 66 38 0d 0a 40 43 48 41 52 53 45 54  ..1ff...@charset
 0140   20 22 55 54 46 2d 38 22 3b 23 74 70 63 72 7b 62   UTF-8;#tpcr{b
 0150   61 63 6b 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a  ackground-color:
 0160   57 68 69 74 65 3b 6d 61 72 67 69 6e 3a 31 30 70  White;margin:10p
 0170   78 20 30 20 32 30 70 78 20 30 3b 7d 0a 23 74 70  x 0 20px 0;}.#tp

Are all of these dumps from the same response, but at different points
in the process?

I can see that there is a 1ff8 (in text) in that last dump. What is that?

It appears that some component is switching the Transfer-encoding to
chunked. Do you know if that's intentional?

 The first snippet is from between the web server and tomcat through the JK
 connector. This looks the same for either Apache or SunOne.
 
 The thing to note is line 00c0 where the hex is 1f f8.

Is that a Greek Omicron? Or something else?

 The second snippet is when a browser hits Apache. The thing to note is line
 0130 where the hex is 0d 0a 0d 0a. (carriage return, line feed, carriage
 return, line feed)

The CR LF CR LF seems to be more likely to be correct.

 The third snippet is when a browser hits SunOne for the same file. Here on
 line 0130 there is  0d 0a 31 66 66 38 0d 0a, notice the extra 4 characters
 between the carriage return/line feeds.

Those 4 extra characters are likely to be the chunk size. 31 66 66 38
is, well, 1ff8, which is 792 in decimal. So, the chunk size is 792
bytes. Did you get 792 bytes after the next CR LF? Again, a complete
response would be helpful in determining what's happening.

 And that is where my problem lies. These characters 1ff8 are showing up in
 the body of the content and is causing errors.

Technically speaking, this is not content: it's header. Your client is
misinterpreting the data it's receiving from the server.

Take a look at http://www.httpwatch.com/httpgallery/chunked/ - the page
is chunked with each line of text in a separate chunk. I think it will
demonstrate what I'm talking about. If you can't view it any other way,
you can do this:

$ telnet www.httpwatch.com 80  temp.out
GET /httpgallery/chunked/
Connection closed by foreign host.
$ less temp.out

You should see content like this:

[snip]
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: -1
Content-Type: text/html

7b
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

2d
html xmlns=http://www.w3.org/1999/xhtml;

[and so on]
9
/body

9
/html

2


0

[the 0 indicates the last chunk, which contains no data].

Is this what you're observing, here? If so, I think it's 

Re: [OT] Using httpd's mod_rewrite with mod_jk

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Terrence,

On 6/30/2010 7:55 PM, Terence M. Bandoian wrote:
 This should redirect to /bad-browser.shtml:
 
RewriteCond %{HTTP_USER_AGENT} Firefox/
RewriteCond %{HTTP_USER_AGENT}
 !Firefox/(3\.0\.19|3\.5\.9|3\.6\.3)($|[^\.0-9])
RewriteRule .* /bad-browser.shtml [R=307,L]

That's an interesting suggestion, but one that will result in one
request getting a 403 response and then a second getting a 200 response.
I'd prefer only a single request if possible.

 Looks just about like what you already had though.
 
 I'm not sure the substitution is applied with F(orbidden).

It turns out that when using [F], my ErrorDocument was kicking-in, which
was then being re-redirected by the RewriteRule, resulting in an endless
loop that httpd finally terminated, which explains this:

 RewriteRule .* /bad-browser.shtml [L,F]
 
 This gives me a 403 response code, httpd's standard forbidden page,
 and a 500 response code in the access log (looks like a runaway
 redirect... I'll have to fix that).

One option would be to set up a pass-through rule like this:

RewriteRule /forbidden.html - [L]

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

iEYEARECAAYFAkwr7BQACgkQ9CaO5/Lv0PC89wCfYHB7N53ux0sqVRMR//0T6FQh
rAoAn3WoY4/4KsU8fsglHFT88TLxkUja
=lqk6
-END PGP SIGNATURE-

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



Re: using Servlet Filter to rewrite domain of JSESSIONID cookie?

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nikita,

On 6/30/2010 6:20 PM, Nikita Tovstoles wrote:
 I'd like to make session cookie domain-wide, and ignore subdomains - in
 Tomcat 6.

You could use the emptySessionPath=true setting in your Connector.

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

 So for app reachable via my.site.com and www.site.com, I'd like to
 have session cookie's domain be .site.com. I thought of doing so using a
 ServletResponseWrapper and a servlet Filter:

A filter won't work, as the cookie is (typically) created at the Valve
level, before your filter has a chance to run.

 However, JSESSIONID continues to be set to FQ host name (my.site.com).

If you use a properly-configured Valve that does roughly the same thing,
I think it'll work.

 Is it because Tomcat internals do not use HttpServletResponse.addCookie() to
 set JSESSIONID or is that cookie set before filter chain gets executed?

Definitely the latter, but possibly also the former: the authenticator
valve might call methods directly on the non-spec Request object,
instead of a ServletRequest object.

 If so, sounds like Filter is (sadly) not applicable for this case, and I
 have to create a custom Valve? Any tips on how to
 wrap org.apache.catalina.connector.Response - valve.invoke() does not take
 HttpServletResponse...

See the handy configuration parameter above and save yourself a lot of
headache.

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

iEYEARECAAYFAkwr7qgACgkQ9CaO5/Lv0PDX2gCgw6h+ShBbsh+eA8weblUdcVBg
LmsAoIDhIneS/KWhhgZ6ed1+zF82tnAD
=OMFW
-END PGP SIGNATURE-

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



Re: Question about BASIC Authentication

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthew,

On 6/30/2010 8:20 PM, Matthew Mauriello wrote:
 The behavior seems rather strange to me in fact, I've seen other websites
 run on what looks to be BASIC Authentication without popping these browser
 messages when leaving secured sections.

Most websites use HTTP AUTH consistently, at least for a particular URL
prefix.

 See the http://user:passw...@website.com/SOLR is only used once and it
 might actually be http://user:passw...@website.com/SOLR/ I have to look
 into this.
 
 I feel like the authentication cookie is being created for the user and
 then being forwarded to every page the user visits after that.
 
 I am hoping to find some way of preventing this behavior.

Well, for starters, what web browser are you using? Can you give me a
sample URL that I can use to play with a test version of your webapp?

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

iEYEARECAAYFAkwr76cACgkQ9CaO5/Lv0PACLQCgjmn6kpeN1L3uQPuxpUEbHT8C
W/UAn1iaKySqcMfZNuttx7MjHYr6EqX4
=Yxdn
-END PGP SIGNATURE-

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



Re: need help setting up tomcat with ssl client authentication

2010-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ralph,

On 6/30/2010 5:07 PM, Ralph Carlson wrote:
 (d) have client Authorization on - with it off tomcat ssl works just fine, 
 when its turned on I get this error
 so far I have been following the steps listed in this tomcat user group 
 message
 http://marc.info/?l=tomcat-userm=106293430225790w=2

Try something a bit more recent than 2003. I was able to get client
certs working with my own CA, and I was manually checking the client
cert instead of having Tomcat do it. However, if your code can do it, so
can Tomcat.

Try reading-through this thread:
http://markmail.org/message/kzxsamuiu6bldjmv

 Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=true
clientAuth=true 
keystoreFile=/server.ks 
keystorePass=[...]
sslProtocol=TLS /

I think you also need a truststoreFile and friends. Try re-reading the
Connector documentation at
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html specifically
looking for client cert.

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

iEYEARECAAYFAkwr8f0ACgkQ9CaO5/Lv0PDFxQCcDrMdAJbl0adm44Dgnyd6fWqV
aPEAnjPNCOXwmU847G/7IvZuBU9hnK2A
=mNS+
-END PGP SIGNATURE-

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



Re: Question about BASIC Authentication

2010-06-30 Thread Matthew Mauriello
Christopher,

First off, I really appreciate your responses.

Unfortunately I do not have a link that I can send out.

I generally use Mozilla Firefox, Microsoft recently implemented a patch
that prevents http://user:passw...@website.com/SOLR/ from working.

So on this consistent implementation method, how do websites grant access
to public sites and secure certain sections? Or is this a problem because
I have two separate applications deployed and I am trying to navigate
between both?

Thanks again,

~Matt



 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Matthew,

 On 6/30/2010 8:20 PM, Matthew Mauriello wrote:
 The behavior seems rather strange to me in fact, I've seen other
 websites
 run on what looks to be BASIC Authentication without popping these
 browser
 messages when leaving secured sections.

 Most websites use HTTP AUTH consistently, at least for a particular URL
 prefix.

 See the http://user:passw...@website.com/SOLR is only used once and it
 might actually be http://user:passw...@website.com/SOLR/ I have to look
 into this.

 I feel like the authentication cookie is being created for the user and
 then being forwarded to every page the user visits after that.

 I am hoping to find some way of preventing this behavior.

 Well, for starters, what web browser are you using? Can you give me a
 sample URL that I can use to play with a test version of your webapp?

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

 iEYEARECAAYFAkwr76cACgkQ9CaO5/Lv0PACLQCgjmn6kpeN1L3uQPuxpUEbHT8C
 W/UAn1iaKySqcMfZNuttx7MjHYr6EqX4
 =Yxdn
 -END PGP SIGNATURE-

 -
 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: Question about BASIC Authentication

2010-06-30 Thread Matthew Mauriello
Christopher,

I may have found a problem in the SOLR header.jsp file that I am using in
navigation. The header.jsp file might be trying to send headers,
unfortunately I am not in the same location as the server so I will have
to check this out tomorrow.

I'll keep you posted,

~Matt

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Matthew,

 On 6/30/2010 8:20 PM, Matthew Mauriello wrote:
 The behavior seems rather strange to me in fact, I've seen other
 websites
 run on what looks to be BASIC Authentication without popping these
 browser
 messages when leaving secured sections.

 Most websites use HTTP AUTH consistently, at least for a particular URL
 prefix.

 See the http://user:passw...@website.com/SOLR is only used once and it
 might actually be http://user:passw...@website.com/SOLR/ I have to look
 into this.

 I feel like the authentication cookie is being created for the user and
 then being forwarded to every page the user visits after that.

 I am hoping to find some way of preventing this behavior.

 Well, for starters, what web browser are you using? Can you give me a
 sample URL that I can use to play with a test version of your webapp?

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

 iEYEARECAAYFAkwr76cACgkQ9CaO5/Lv0PACLQCgjmn6kpeN1L3uQPuxpUEbHT8C
 W/UAn1iaKySqcMfZNuttx7MjHYr6EqX4
 =Yxdn
 -END PGP SIGNATURE-

 -
 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: Application vars -

2010-06-30 Thread Eric P

Shay,

Forgive all potential newbness in my responses below.  I'm still learning this 
stuff.

Shay Rojansky wrote:

Hi Eric.

Would making your servlet reload all application vars not be akin to simply
reloading your servlet altogether, by changing context/init params in your
web.xml or context.xml?



Do you mean reloading your 'application' altogether?  If so wouldn't that cause disruption to users currently on the 
app?  This disruption is what I'd like to avoid.



If you really want to avoid an application reload, why not just have your
app read its values from a properties config file instead of a DB? It would
be much more lightweight and standard.



That's an idea.  But wouldn't file I/O every time a servlet needs an application value be way more expensive than 
storing settings in a record, reading and setting them to the application scope once, and only resetting these vars 
manually when needed?


Is this standard documented somewhere?

Thanks... I appreciate the ideas.
Eric


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



Fw: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly

2010-06-30 Thread rahul
A further information - 

I installed Mozilla Firefox and on clicking search it printed out an error 
message that The requested URL /workbench/Jsp/WorkOrderList.jsp was not found 
on this server.. Ran the same application parallaly on Windows and that works 
fine with Firefox as well. 

Best Regards,
Rahul

--- On Thu, 7/1/10, rahul iamrahu...@yahoo.com wrote:

 From: rahul iamrahu...@yahoo.com
 Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - 
 Web application unable to execute properly
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, July 1, 2010, 4:28 AM
 Hello Charles
 
 Thanks for extremely prompt reply :). First answers to your
 question:
 1. Replacing the Windows war file with the one in UNIX,
 works fine. 
 2. Replacing the UNIX war file with that in Windows
 mis-behaves. 
 
 Some more clarification - 
 When I started the upgrade test after testing successfully
 in the workstation, I copied the entire war from Windows to
 UNIX. The application uses certain properties files where
 the file system references are provided. Those references
 were changed to map to the UNIX file systems in the
 properties files. The server.xml ports were chamnged. I am
 attaching the same here with as requested. Also,
 tomcat-users.xml was changed to add the admin user for
 manager role. It did not work that is mis-behaved the same
 way as explained in my first email.
 
 Then I tried copying the whole source code to UNIX with ANT
 utility. Built there and deployed there itself, ending up
 with the same result. 
 
 Please let me know whether I am able to get you a bit
 clearer picture. Is there any way  I can give you a
 call, if you have any contact number? Where are you located?
 May be this way we can clarify the things more quickly. I
 have become a bit desperate now, trying to get some hint on
 this issue for around 2 days now.:)
 
 Your help is appreciated. 
 
 Best Regards,
 Rahul
 --- On Thu, 7/1/10, Caldarale, Charles R chuck.caldar...@unisys.com
 wrote:
 
  From: Caldarale, Charles R chuck.caldar...@unisys.com
  Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on
 Sun Solaris 5.8 Sparc - Web application unable to execute
 properly
  To: Tomcat Users List users@tomcat.apache.org
  Date: Thursday, July 1, 2010, 3:49 AM
   From: rahul [mailto:iamrahu...@yahoo.com]
   Subject: Tomcat 6.0.26 with Java 6 update 20 on
 Sun
  Solaris 5.8 Sparc -
   Web application unable to execute properly
   
   5. Built and deployed the application in the
 UNIX
  itself.
  
  If the application is pure Java, that step was
  unnecessary.  What happens if you take the .war file
  (or .class files) from the Solaris box and run them
 on
  Windows?  Does the app misbehave there as well?
  
  Likewise, what happens if you take what's running on
  Windows and deploy it on Solaris?  Does it run
  properly?
  
  Also, post your server.xml for Tomcat 6.0.26; lots of
  things changed between 4.1 and 6.0, and if any config
 items
  were copied over verbatim, that might create
 problems.
  
   Third Page - After selecting the criteria, the
 user
  click
   on Search button and there is a page opens with
 404
  -
   Page is unavailable. However, on clicking the
 back
  button
   of the IE, the search result appears.
  
  Turn on Tomcat's access logging and see what's coming
 in.
  
   Attached are the log files extracts.
  
  Nope; the mailing list strips almost all
 attachments. 
  Post them inline, or put them in some public location
 on the
  web.
  
   Please assist me in figuring out what is going on
 or
  what
   am I doing wrong.
  
  Case problems?  Windows is not case-sensitive,
 Solaris
  is.
  
   Please reply me on: iamrahu...@yahoo.com
   or/and rahul.ra...@eb-services.com.au
  
  No, replies should go only to the mailing list, not
 to
  individuals.
  
   - 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.
  
 
 
 
       


  ?xml version='1.0' encoding='utf-8'?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
!-- Note:  A Server is not 

  1   2   >