DO NOT REPLY [Bug 20608] - context.xml not bound from WAR file

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=20608





--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 11:29 ---
(In reply to comment #1)
> Not a bug but a wish = enhancement.

I thing *IT IS A BUG*
simply the catalina-ant's deploy task doesn't respect the config attribute;
here's the code from 5.5.15:

if ((war == null) && (config != null)) {
sb.append("&config=");
sb.append(URLEncoder.encode(config, getCharset()));
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38414] New: - the catalina-ant's deploy task doesn't respect the config attribute;

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38414

   Summary: the catalina-ant's deploy task doesn't respect the
config attribute;
   Product: Tomcat 5
   Version: 5.5.14
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


the catalina-ant's deploy task doesn't respect the config attribute;
here's the code from 5.5.15 (this code hasn't been changed at least from 
5.0...):

if ((war == null) && (config != null)) {
sb.append("&config=");
sb.append(URLEncoder.encode(config, getCharset()));
}

as you see, it appends the "config" info to the url only ,
when the war is null.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38415] New: - JULI logs to catalina.date.log if no in

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38415

   Summary: JULI logs to catalina.date.log if no  in 
   Product: Tomcat 5
   Version: Unknown
  Platform: All
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


First, if I've miscategorized this bug, please accept my apologies.

With a vanilla logging.properties in ../WEB-INF/classes and no  specified
in server.xml, and the  specified in ROOT.xml - the logging file is
created as zero length, and any messages are logged in catalina.data.log.  Move
the  tag to server.xml and logging occurs as expected.

There is a message thread on users@tomcat.apache.org with the following subject
concerning this issue:

"tomcat 5.5.15 - does JULI required a host tag defined realm?"

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



new versions of Tomcat

2006-01-27 Thread Lucio Ribeiro
Hi, I'm new here i'm having problems with new versions of Tomcat.
 
 I was using tomcat 5.0.27 and i have a web application made in Java. My code 
has to get URL using the following code:
 
 String url = request.getRequestURL().toString();
 
 I use Struts and my URL is 
http://localhost:8080/terp/list.client.do?metodo=insert.
 The code above returned the string 
"http://localhost:8080/terp/list.client.do?metodo=insert";. That's what i want.
 
 When i updated tomcat (I tested with tomcat 5.5.9 and 5.5.15), the code did 
not work anymore. The code now is returning the path of the page like 
"http://localhost:7070/terp/WEB-INF/templates/client/ListClient.vm";.
 
 And now?? what can i do to solve this How can i get the correct URL???
 
 Thanks and I'm waiting for your answer.
 
 


-
 Yahoo! doce lar. Faça do Yahoo! sua homepage.

Fwd: eclipse compiler bug?

2006-01-27 Thread Yoav Shapira
Hi,
Forwarding a message from the solr-dev list, one of my new hangouts,
that is relevant to Tomcat.

Yoav

-- Forwarded message --
From: Yonik Seeley <[EMAIL PROTECTED]>
Date: Jan 26, 2006 4:48 PM
Subject: eclipse compiler bug?
To: solr-dev@lucene.apache.org


Yoav, you might be interested in this one...

I had to comment out some generics stuff to get the JSP to work on
Tomcat 5.5.12.  I didn't have time to look into it but my guess is
that the eclipse compiler got the signature incorrect for the generic
comparator.  So if there is a newer version of the compiler, you might
want to upgrade.

Here is the modification I made to get it to work:

/***
// This generics version works fine with Resin, but fails with Tomcat 5.5
// with java.lang.AbstractMethodError
//at java.util.Arrays.mergeSort(Arrays.java:1284)
//at java.util.Arrays.sort(Arrays.java:1223)
Arrays.sort(arr, new Comparator>() {
  public int compare(List toks, List toks1) {
return toks.get(0).pos - toks1.get(0).pos;
  }
}
***/
Arrays.sort(arr, new Comparator() {
  public int compare(Object a, Object b) {
List toks = (List)a;
List toks1 = (List)b;
return toks.get(0).pos - toks1.get(0).pos;
  }
}

);

 
https://svn.apache.org/repos/asf/incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
search down for Tomcat

-Yonik


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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



DO NOT REPLY [Bug 38416] New: - Change Jakarta Tomcat Connector - Apache HowTo page

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38416

   Summary: Change Jakarta Tomcat Connector - Apache HowTo page
   Product: Tomcat 5
   Version: 5.5.14
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Native:JK
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Hello,

I would like to contibute a little to the docs of the tomcat connector, but our
company does not let the CVS protocol through our firewall.

I would like to add the following to the apache.xml file in the xdocs/howto
documentation of the jakarta-tomcat-connectors-1.2.15:


At least one +ForwardURIxxx is required. By default, the ForwardURICompat
is turned on. So if you
turn this off you will need to switch on one of the other two described below.




Right under the explanation of the JkOptions ForwardURICompat paragraph.

I bounced into this problem and it was resolved on the news groups.
My apache kept on telling that it could not initialize a worker.

It would be nice one to add to the howto pages of the apache connector, since I
lost a lot of time on this.

Is there any way this can be added?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: eclipse compiler bug?

2006-01-27 Thread Peter Rossbach

I fix this issue for 5.5.16.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38389

Regards
Peter


Am 27.01.2006 um 14:06 schrieb Yoav Shapira:


Hi,
Forwarding a message from the solr-dev list, one of my new hangouts,
that is relevant to Tomcat.

Yoav

-- Forwarded message --
From: Yonik Seeley <[EMAIL PROTECTED]>
Date: Jan 26, 2006 4:48 PM
Subject: eclipse compiler bug?
To: solr-dev@lucene.apache.org


Yoav, you might be interested in this one...

I had to comment out some generics stuff to get the JSP to work on
Tomcat 5.5.12.  I didn't have time to look into it but my guess is
that the eclipse compiler got the signature incorrect for the generic
comparator.  So if there is a newer version of the compiler, you might
want to upgrade.

Here is the modification I made to get it to work:

/***
// This generics version works fine with Resin, but fails with  
Tomcat 5.5

// with java.lang.AbstractMethodError
//at java.util.Arrays.mergeSort(Arrays.java:1284)
//at java.util.Arrays.sort(Arrays.java:1223)
Arrays.sort(arr, new Comparator>() {
  public int compare(List toks, List toks1) {
return toks.get(0).pos - toks1.get(0).pos;
  }
}
***/
Arrays.sort(arr, new Comparator() {
  public int compare(Object a, Object b) {
List toks = (List)a;
List toks1 = (List)b;
return toks.get(0).pos - toks1.get(0).pos;
  }
}

);

 https://svn.apache.org/repos/asf/incubator/solr/trunk/src/webapp/ 
resources/admin/analysis.jsp

search down for Tomcat

-Yonik


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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





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



DO NOT REPLY [Bug 38416] - Change Jakarta Tomcat Connector - Apache HowTo page

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38416





--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 14:20 ---
Created an attachment (id=17514)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17514&action=view)
Modified XML document

The correction I described.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38416] - Change Jakarta Tomcat Connector - Apache HowTo page

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38416





--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 14:26 ---
Created an attachment (id=17515)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17515&action=view)
The diff output of the file

The diff output between the original and modified file from cygwin.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: eclipse compiler bug?

2006-01-27 Thread Yoav Shapira
Cool, thanks.

Yoav

On 1/27/06, Peter Rossbach <[EMAIL PROTECTED]> wrote:
> I fix this issue for 5.5.16.
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=38389
>
> Regards
> Peter
>
>
> Am 27.01.2006 um 14:06 schrieb Yoav Shapira:
>
> > Hi,
> > Forwarding a message from the solr-dev list, one of my new hangouts,
> > that is relevant to Tomcat.
> >
> > Yoav
> >
> > -- Forwarded message --
> > From: Yonik Seeley <[EMAIL PROTECTED]>
> > Date: Jan 26, 2006 4:48 PM
> > Subject: eclipse compiler bug?
> > To: solr-dev@lucene.apache.org
> >
> >
> > Yoav, you might be interested in this one...
> >
> > I had to comment out some generics stuff to get the JSP to work on
> > Tomcat 5.5.12.  I didn't have time to look into it but my guess is
> > that the eclipse compiler got the signature incorrect for the generic
> > comparator.  So if there is a newer version of the compiler, you might
> > want to upgrade.
> >
> > Here is the modification I made to get it to work:
> >
> > /***
> > // This generics version works fine with Resin, but fails with
> > Tomcat 5.5
> > // with java.lang.AbstractMethodError
> > //at java.util.Arrays.mergeSort(Arrays.java:1284)
> > //at java.util.Arrays.sort(Arrays.java:1223)
> > Arrays.sort(arr, new Comparator>() {
> >   public int compare(List toks, List toks1) {
> > return toks.get(0).pos - toks1.get(0).pos;
> >   }
> > }
> > ***/
> > Arrays.sort(arr, new Comparator() {
> >   public int compare(Object a, Object b) {
> > List toks = (List)a;
> > List toks1 = (List)b;
> > return toks.get(0).pos - toks1.get(0).pos;
> >   }
> > }
> >
> > );
> >
> >  https://svn.apache.org/repos/asf/incubator/solr/trunk/src/webapp/
> > resources/admin/analysis.jsp
> > search down for Tomcat
> >
> > -Yonik
> >
> >
> > --
> > Yoav Shapira
> > System Design and Management Fellow
> > MIT Sloan School of Management
> > Cambridge, MA, USA
> > [EMAIL PROTECTED] / www.yoavshapira.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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



svn commit: r372854 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java

2006-01-27 Thread remm
Author: remm
Date: Fri Jan 27 05:56:55 2006
New Revision: 372854

URL: http://svn.apache.org/viewcvs?rev=372854&view=rev
Log:
- Always initialize loggers in realm start rather than at a random time earlier.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=372854&r1=372853&r2=372854&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
 Fri Jan 27 05:56:55 2006
@@ -175,7 +175,6 @@
 
 Container oldContainer = this.container;
 this.container = container;
-this.containerLog = container.getLogger();
 support.firePropertyChange("container", oldContainer, this.container);
 
 }
@@ -1268,6 +1267,7 @@
 protected boolean initialized=false;
 
 public void init() {
+this.containerLog = container.getLogger();
 if( initialized && container != null ) return;
 
 initialized=true;



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



DO NOT REPLY [Bug 38415] - JULI logs to catalina.date.log if no in

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38415


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 14:57 ---
Most likely fixed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38414] - the catalina-ant's deploy task doesn't respect the config attribute;

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38414


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38372] - tcnative-1.dll response overflow corruption, partial pages

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38372





--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 15:00 ---
We are not going to be able to confirm or reproduce this, so you're on your own
to investigate, fix or bring definite proof of this behavior.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



IllegalState during invalidate a (Delta)Session.

2006-01-27 Thread [EMAIL PROTECTED]

Hi there,

I've a little cluster with 4 Tomcats 5.5.12 running.
During tests I have found that exception while I
logged out a user on this cluster.

I hope this is the right Maillist for that problem...

java.lang.IllegalStateException: Cannot find message associated with key 
standardSession.getLastAccessedTime
   at 
org.apache.catalina.cluster.session.DeltaSession.getLastAccessedTime(DeltaSession.java:437)
   at 
org.apache.catalina.authenticator.SingleSignOn.sessionEvent(SingleSignOn.java:298)
   at 
org.apache.catalina.cluster.session.DeltaSession.fireSessionEvent(DeltaSession.java:1553)
   at 
org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:735)
   at 
org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:674)
   at 
org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:662)
   at 
org.apache.catalina.cluster.session.DeltaSession.invalidate(DeltaSession.java:1068)
   at 
org.apache.catalina.cluster.session.DeltaSessionFacade.invalidate(DeltaSessionFacade.java:150)


I've searched the source-tree and changed the corresponding method from :
---
public long getLastAccessedTime() {
   if (!isValid) {
   throw new IllegalStateException(sm
   .getString("standardSession.getLastAccessedTime"));
   }
  return (this.lastAccessedTime);
}

to (now it will call the isValid()-method instead of the isValid field)

public long getLastAccessedTime() {
   if (!isValid()) {
   throw new IllegalStateException(sm
   .getString("standardSession.getLastAccessedTime"));

   }  
   return (this.lastAccessedTime);

}
---

This fixed my logout process immediately.
The same problem was with Tomcat 5.5.15.

Is that a known bug? Has anyone fixed this problem in an offical patch?



--

regards,
   Tom Neumann / tone


"Der Heitere ist der Meister seiner Seele."

William Shakespeare (1564 - 1616)



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



svn commit: r372876 - /tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java

2006-01-27 Thread fhanik
Author: fhanik
Date: Fri Jan 27 07:26:12 2006
New Revision: 372876

URL: http://svn.apache.org/viewcvs?rev=372876&view=rev
Log:
Removed invalid UTF character

Modified:

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java?rev=372876&r1=372875&r2=372876&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java
 Fri Jan 27 07:26:12 2006
@@ -116,7 +116,7 @@
 protected boolean primaryIndicator = false ;
 
 /**
- * Name of primary change indicator as request attributeâ 
+ * Name of primary change indicator as request attribute
  */
 protected String primaryIndicatorName = 
"org.apache.catalina.cluster.tcp.isPrimarySession";




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



svn commit: r372881 - in /tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster: ./ mcast/ tcp/

2006-01-27 Thread fhanik
Author: fhanik
Date: Fri Jan 27 07:41:01 2006
New Revision: 372881

URL: http://svn.apache.org/viewcvs?rev=372881&view=rev
Log:
Correct English spelling

Modified:

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/LocalStrings.properties

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/LocalStrings.properties

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/LocalStrings.properties?rev=372881&r1=372880&r2=372881&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/LocalStrings.properties
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/LocalStrings.properties
 Fri Jan 27 07:41:01 2006
@@ -1 +1 @@
-cluster.mbean.register.allready=MBean {0} allready registered!
+cluster.mbean.register.already=MBean {0} already registered!

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/LocalStrings.properties?rev=372881&r1=372880&r2=372881&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/LocalStrings.properties
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/LocalStrings.properties
 Fri Jan 27 07:41:01 2006
@@ -1 +1 @@
-cluster.mbean.register.allready=MBean {0} allready registered!
+cluster.mbean.register.already=MBean {0} already registered!

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java?rev=372881&r1=372880&r2=372881&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java
 Fri Jan 27 07:41:01 2006
@@ -363,7 +363,7 @@
 if (mserver.isRegistered(mcastName)) {
 if (log.isWarnEnabled())
 log.warn(sm.getString(
-"cluster.mbean.register.allready", mcastName));
+"cluster.mbean.register.already", mcastName));
 return;
 }
 setObjectName(mcastName);

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java?rev=372881&r1=372880&r2=372881&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
 Fri Jan 27 07:41:01 2006
@@ -341,7 +341,7 @@
 if (mserver.isRegistered(receiverName)) {
 if (log.isWarnEnabled())
 log.warn(sm.getString(
-"cluster.mbean.register.allready",
+"cluster.mbean.register.already",
 receiverName));
 return;
 }

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties?rev=372881&r1=372880&r2=372881&view=diff
==
--- 
tomcat/c

svn commit: r372886 - in /tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session: DeltaSession.java LocalStrings.properties

2006-01-27 Thread fhanik
Author: fhanik
Date: Fri Jan 27 07:56:57 2006
New Revision: 372886

URL: http://svn.apache.org/viewcvs?rev=372886&view=rev
Log:
Added in missing message, should be converted or shared

Modified:

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java?rev=372886&r1=372885&r2=372886&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 Fri Jan 27 07:56:57 2006
@@ -1679,4 +1679,4 @@
 
 }
 
-}
\ No newline at end of file
+}

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties?rev=372886&r1=372885&r2=372886&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties
 Fri Jan 27 07:56:57 2006
@@ -76,3 +76,21 @@
 jvmRoute.set.orignalsessionid=Set Orginal Session id at request attriute {0} 
value: {1}
 standardSession.getId.ise=getId: Session already invalidated
 standardSession.attributeEvent=Session attribute event listener threw exception
+standardSession.attributeEvent=Session attribute event listener threw exception
+standardSession.bindingEvent=Session binding event listener threw exception
+standardSession.invalidate.ise=invalidate: Session already invalidated
+standardSession.isNew.ise=isNew: Session already invalidated
+standardSession.getAttribute.ise=getAttribute: Session already invalidated
+standardSession.getAttributeNames.ise=getAttributeNames: Session already 
invalidated
+standardSession.getCreationTime.ise=getCreationTime: Session already 
invalidated
+standardSession.getLastAccessedTime.ise=getLastAccessedTime: Session already 
invalidated
+standardSession.getId.ise=getId: Session already invalidated
+standardSession.getMaxInactiveInterval.ise=getMaxInactiveInterval: Session 
already invalidated
+standardSession.getValueNames.ise=getValueNames: Session already invalidated
+standardSession.notSerializable=Cannot serialize session attribute {0} for 
session {1}
+standardSession.removeAttribute.ise=removeAttribute: Session already 
invalidated
+standardSession.sessionEvent=Session event listener threw exception
+standardSession.setAttribute.iae=setAttribute: Non-serializable attribute
+standardSession.setAttribute.ise=setAttribute: Session already invalidated
+standardSession.setAttribute.namenull=setAttribute: name parameter cannot be 
null
+standardSession.sessionCreated=Created Session id = {0}



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



svn commit: r372887 - /tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java

2006-01-27 Thread fhanik
Author: fhanik
Date: Fri Jan 27 07:58:58 2006
New Revision: 372887

URL: http://svn.apache.org/viewcvs?rev=372887&view=rev
Log:
Call the right message

Modified:

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java?rev=372887&r1=372886&r2=372887&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
 Fri Jan 27 07:58:58 2006
@@ -445,7 +445,7 @@
 public long getLastAccessedTime() {
 if (!isValid) {
 throw new IllegalStateException(sm
-.getString("standardSession.getLastAccessedTime"));
+.getString("standardSession.getLastAccessedTime.ise"));
 
 }
 return (this.lastAccessedTime);



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



Re: IllegalState during invalidate a (Delta)Session.

2006-01-27 Thread Filip Hanik - Dev Lists
I can't implement the change you suggest as it could result in a 
circular loop,
expire - fire event - last access -> isValid() -> expire -> fire event 
-> last access


I have added in the missing message for this event, if you are not happy 
with that solution, please provide a simple test case for me and I will 
make the adjustments


Filip


[EMAIL PROTECTED] wrote:


Hi there,

I've a little cluster with 4 Tomcats 5.5.12 running.
During tests I have found that exception while I
logged out a user on this cluster.

I hope this is the right Maillist for that problem...

java.lang.IllegalStateException: Cannot find message associated with 
key standardSession.getLastAccessedTime
   at 
org.apache.catalina.cluster.session.DeltaSession.getLastAccessedTime(DeltaSession.java:437) 

   at 
org.apache.catalina.authenticator.SingleSignOn.sessionEvent(SingleSignOn.java:298) 

   at 
org.apache.catalina.cluster.session.DeltaSession.fireSessionEvent(DeltaSession.java:1553) 

   at 
org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:735) 

   at 
org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:674) 

   at 
org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:662) 

   at 
org.apache.catalina.cluster.session.DeltaSession.invalidate(DeltaSession.java:1068) 

   at 
org.apache.catalina.cluster.session.DeltaSessionFacade.invalidate(DeltaSessionFacade.java:150) 



I've searched the source-tree and changed the corresponding method from :
---
public long getLastAccessedTime() {
   if (!isValid) {
   throw new IllegalStateException(sm
   .getString("standardSession.getLastAccessedTime"));
   }
  return (this.lastAccessedTime);
}

to (now it will call the isValid()-method instead of the isValid field)

public long getLastAccessedTime() {
   if (!isValid()) {
   throw new IllegalStateException(sm
   .getString("standardSession.getLastAccessedTime"));

   } return (this.lastAccessedTime);
}
---

This fixed my logout process immediately.
The same problem was with Tomcat 5.5.15.

Is that a known bug? Has anyone fixed this problem in an offical patch?



--

regards,
   Tom Neumann / tone


"Der Heitere ist der Meister seiner Seele."

William Shakespeare (1564 - 1616)



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




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



Re: new versions of Tomcat

2006-01-27 Thread Mark Thomas
Lucio Ribeiro wrote:
> Hi, I'm new here i'm having problems with new versions of Tomcat.
>  
>  I was using tomcat 5.0.27 and i have a web application made in Java. My code 
> has to get URL using the following code:
>  
>  String url = request.getRequestURL().toString();
>  
>  I use Struts and my URL is 
> http://localhost:8080/terp/list.client.do?metodo=insert.
>  The code above returned the string 
> "http://localhost:8080/terp/list.client.do?metodo=insert";. That's what i want.
>  
>  When i updated tomcat (I tested with tomcat 5.5.9 and 5.5.15), the code did 
> not work anymore. The code now is returning the path of the page like 
> "http://localhost:7070/terp/WEB-INF/templates/client/ListClient.vm";.
>  
>  And now?? what can i do to solve this How can i get the correct URL???
>  
>  Thanks and I'm waiting for your answer.

This question belongs on the users list where I will be happy to
answer it for you.

Mark


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



Re: IllegalState during invalidate a (Delta)Session.

2006-01-27 Thread Peter Rossbach

Hey,

a)  DeltaSession and StandardSession has the exact same behaviour.
b)  SingleSignOn valve can't detect invalidation with call isValid()
	 expiring flag is true at the exipre call. It set to false after  
SessionDestroy event is called. But before the event is fired, the  
isValid flag is set to false.


--- DeltaSession and StandardSession
public boolean isValid() {

if (this.expiring) {
return true;
}

if (!this.isValid ) {
return false;
}


Only chance seams change lastAccessedTime condition
public long getLastAccessedTime() {
if (!expiring && !isValid) {
throw new IllegalStateException(sm
.getString 
("standardSession.getLastAccessedTime.ise"));


}
return (this.lastAccessedTime);

}

or we must handle the ISE exception at SingleSignOn valve.

A testcase is very welcomed

Peter


Am 27.01.2006 um 17:00 schrieb Filip Hanik - Dev Lists:

I can't implement the change you suggest as it could result in a  
circular loop,
expire - fire event - last access -> isValid() -> expire -> fire  
event -> last access


I have added in the missing message for this event, if you are not  
happy with that solution, please provide a simple test case for me  
and I will make the adjustments


Filip


[EMAIL PROTECTED] wrote:


Hi there,

I've a little cluster with 4 Tomcats 5.5.12 running.
During tests I have found that exception while I
logged out a user on this cluster.

I hope this is the right Maillist for that problem...

java.lang.IllegalStateException: Cannot find message associated  
with key standardSession.getLastAccessedTime
   at  
org.apache.catalina.cluster.session.DeltaSession.getLastAccessedTime( 
DeltaSession.java:437)
   at  
org.apache.catalina.authenticator.SingleSignOn.sessionEvent 
(SingleSignOn.java:298)
   at  
org.apache.catalina.cluster.session.DeltaSession.fireSessionEvent 
(DeltaSession.java:1553)
   at org.apache.catalina.cluster.session.DeltaSession.expire 
(DeltaSession.java:735)
   at org.apache.catalina.cluster.session.DeltaSession.expire 
(DeltaSession.java:674)
   at org.apache.catalina.cluster.session.DeltaSession.expire 
(DeltaSession.java:662)
   at  
org.apache.catalina.cluster.session.DeltaSession.invalidate 
(DeltaSession.java:1068)
   at  
org.apache.catalina.cluster.session.DeltaSessionFacade.invalidate 
(DeltaSessionFacade.java:150)


I've searched the source-tree and changed the corresponding method  
from :

---
public long getLastAccessedTime() {
   if (!isValid) {
   throw new IllegalStateException(sm
   .getString 
("standardSession.getLastAccessedTime"));

   }
  return (this.lastAccessedTime);
}

to (now it will call the isValid()-method instead of the isValid  
field)


public long getLastAccessedTime() {
   if (!isValid()) {
   throw new IllegalStateException(sm
   .getString 
("standardSession.getLastAccessedTime"));


   } return (this.lastAccessedTime);
}
---

This fixed my logout process immediately.
The same problem was with Tomcat 5.5.15.

Is that a known bug? Has anyone fixed this problem in an offical  
patch?




--

regards,
   Tom Neumann / tone


"Der Heitere ist der Meister seiner Seele."

William Shakespeare (1564 - 1616)



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




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





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



DO NOT REPLY [Bug 38427] New: - ServletContextListener Notified Multiple Times When Using Virtual Hosting

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38427

   Summary: ServletContextListener Notified Multiple Times When
Using Virtual Hosting
   Product: Tomcat 5
   Version: 5.5.12
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The ServletContextListener is getting notified multiple times when virtual 
hosting is used.

I created an app and deployed it under the Tomcat 5.5.15\webapps directory 
where it worked as expected. 

I then deployed the same app using virtual hosting and found that the 
ServletContextListener is notified 2 times. If I put a static counter variable 
in it the variable does not get incremented. 

A Singleton registry object I created shows that items are getting registered 
into it 2 times, I'm logging when items are registered in it. But no exception 
is generated. I throw an exception if objects are being bound using the same 
name. It seems there are 2 of them in existence.

Here is the entry I'm using in the server.xml file to set up the virtual 
hosting.

  

 www.test.struts

 
 
 
  

I also get the same behavior under the 5.5.15 version. That wasn't an 
available option I could select when filling in the report.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



AprEndpoint and IPv6

2006-01-27 Thread Jim Jagielski

There's a bug report (37788) regarding allowing AprEndpoint
to use APR IPv6 addresses. Their patch is almost right, but
instead the value should be to use APR_UNSPEC instead
of APR_INET6 (or the current APR_INET) to allow APR
to correctly determine IP version and do a graceful
recovery... As well as handle cases where APR wasn't
built with IPv6 support.

I'd like to commit that change... comments?

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



DO NOT REPLY [Bug 35252] - jasper2 produced malformed expanded XML view

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35252


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 21:49 ---
is this really fixed?  i have tomcat 5.5.15 and get the exact same error:  
org.apache.jasper.JasperException: Error on line 1 of document  : Attribute
"star" bound to namespace "http://www.w3.org/2000/xmlns/"; was already specified
for element "star:content-block". Nested exception: Attribute "star" bound to
namespace "http://www.w3.org/2000/xmlns/"; was already specified for element
"star:content-block".

thanks.
nn

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 37424] - welcome-file list not working with extensions

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37424





--- Additional Comments From [EMAIL PROTECTED]  2006-01-27 23:51 ---
I don't see where exactly the problem of supporting an extension match for
welcome pages lies.

I've searched both the servlet and jsp specs for references to default
(implicit) welcome pages, but could not find any.

Notice that in the list of welcome pages declared in default-web.xml:

  
index.html
index.htm
index.jsp
  

index.jsp comes last. Also notice this comment in default-web.xml:

  
  
  
  

Re: AprEndpoint and IPv6

2006-01-27 Thread Remy Maucherat

Jim Jagielski wrote:

There's a bug report (37788) regarding allowing AprEndpoint
to use APR IPv6 addresses. Their patch is almost right, but
instead the value should be to use APR_UNSPEC instead
of APR_INET6 (or the current APR_INET) to allow APR
to correctly determine IP version and do a graceful
recovery... As well as handle cases where APR wasn't
built with IPv6 support.

I'd like to commit that change... comments?


If it works, it's fine. I can't test this.

Rémy

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



svn commit: r373023 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm: DataSourceRealm.java JDBCRealm.java JNDIRealm.java MemoryRealm.java UserDatabaseRealm.java

2006-01-27 Thread markt
Author: markt
Date: Fri Jan 27 15:17:43 2006
New Revision: 373023

URL: http://svn.apache.org/viewcvs?rev=373023&view=rev
Log:
Fix NPEs and potential NPEs now containerLog is initialized in RealmBase.start()

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java?rev=373023&r1=373022&r2=373023&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java
 Fri Jan 27 15:17:43 2006
@@ -620,6 +620,9 @@
  */
 public void start() throws LifecycleException {
 
+// Perform normal superclass initialization
+super.start();
+
 // Create the roles PreparedStatement string
 preparedRoles = new StringBuffer("SELECT ");
 preparedRoles.append(roleNameCol);
@@ -637,9 +640,6 @@
 preparedCredentials.append(" WHERE ");
 preparedCredentials.append(userNameCol);
 preparedCredentials.append(" = ?");
-
-// Perform normal superclass initialization
-super.start();
 
 }
 

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java?rev=373023&r1=373022&r2=373023&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
 Fri Jan 27 15:17:43 2006
@@ -757,6 +757,9 @@
  */
 public void start() throws LifecycleException {
 
+// Perform normal superclass initialization
+super.start();
+
 // Validate that we can open our connection - but let tomcat
 // startup in case the database is temporarily unavailable
 try {
@@ -764,9 +767,6 @@
 } catch (SQLException e) {
 containerLog.error(sm.getString("jdbcRealm.open"), e);
 }
-
-// Perform normal superclass initialization
-super.start();
 
 }
 

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java?rev=373023&r1=373022&r2=373023&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
 Fri Jan 27 15:17:43 2006
@@ -1596,15 +1596,15 @@
  */
 public void start() throws LifecycleException {
 
+// Perform normal superclass initialization
+super.start();
+
 // Validate that we can open our connection
 try {
 open();
 } catch (NamingException e) {
 throw new LifecycleException(sm.getString("jndiRealm.open"), e);
 }
-
-// Perform normal superclass initialization
-super.start();
 
 }
 

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java?rev=373023&r1=373022&r2=373023&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
 Fri Jan 27 15:17:43 2006
@@ -290,6 +290,9 @@
  */
 public synchronized void start() throws LifecycleException {
 
+// Perform normal superclass initialization
+super.start();
+
 // Validate the existence of our database file
 File file = new File(pathname);
 if (!file.isAbsolute())
@@ -314,9 +317,6 @@
 } finally {
 digester.reset();
 }
-
-// Perform normal superclass initialization
-super.start();
 
 

svn commit: r373029 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java

2006-01-27 Thread markt
Author: markt
Date: Fri Jan 27 15:27:16 2006
New Revision: 373029

URL: http://svn.apache.org/viewcvs?rev=373029&view=rev
Log:
Bug 7831
Add basic support for CLIENT-CERT authentication in JNDIRealm
It is likely that users will have to extend JNDIRealm and override
getPrincipal(X509Certificate) for their particular configuration.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java?rev=373029&r1=373028&r2=373029&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
 Fri Jan 27 15:27:16 2006
@@ -986,10 +986,6 @@
 // Form the dn from the user pattern
 String dn = userPatternFormatArray[curUserPattern].format(new String[] 
{ username });
 
-// Return if no attributes to retrieve
-if (attrIds == null || attrIds.length == 0)
-return new User(username, dn, null, null);
-
 // Get required attributes from user entry
 Attributes attrs = null;
 try {
@@ -1485,17 +1481,80 @@
 
 }
 
-
 /**
  * Return the Principal associated with the given user name.
  */
 protected Principal getPrincipal(String username) {
 
-return (null);
+DirContext context = null;
+Principal principal = null;
+
+try {
+
+// Ensure that we have a directory context available
+context = open();
+
+// Occassionally the directory context will timeout.  Try one more
+// time before giving up.
+try {
+
+// Authenticate the specified username if possible
+principal = getPrincipal(context, username);
+
+} catch (CommunicationException e) {
+
+// log the exception so we know it's there.
+containerLog.warn(sm.getString("jndiRealm.exception"), e);
+
+// close the connection so we know it will be reopened.
+if (context != null)
+close(context);
+
+// open a new directory context.
+context = open();
+
+// Try the authentication again.
+principal = getPrincipal(context, username);
+
+}
+
+
+// Release this context
+release(context);
+
+// Return the authenticated Principal (if any)
+return (principal);
+
+} catch (NamingException e) {
+
+// Log the problem for posterity
+containerLog.error(sm.getString("jndiRealm.exception"), e);
+
+// Close the connection so that it gets reopened next time
+if (context != null)
+close(context);
+
+// Return "not authenticated" for this request
+return (null);
+
+}
+
 
 }
 
 
+/**
+ * Return the Principal associated with the given user name.
+ */
+protected synchronized Principal getPrincipal(DirContext context,
+  String username)
+throws NamingException {
+
+User user = getUser(context, username);
+
+return new GenericPrincipal(this, user.username, user.password ,
+getRoles(context, user));
+}
 
 /**
  * Open (if necessary) and return a connection to the configured



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



DO NOT REPLY [Bug 7831] - [PATCH] JNDIRealm does not work with CLIENT-CERT auth method

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=7831





--- Additional Comments From [EMAIL PROTECTED]  2006-01-28 00:40 ---
I have committed a couple of changes that should make this a lot easier.

Given the wide variety of options for mapping from certificates to users in the
directory, I have left the default as certificate DN == user DN.

To change this you will need to extend JNDIRealm and override
getPrincipal(X509Certificate). In my testing I used the following:

protected Principal getPrincipal(X509Certificate usercert) {
StringTokenizer dnTokens =
new StringTokenizer(usercert.getSubjectDN().getName(),",");

while (dnTokens.hasMoreTokens()) {
String token = dnTokens.nextToken(); 
if (token.substring(0, 3).equalsIgnoreCase("cn=")) {
return getPrincipal(token.substring(3));
}
}

return null;
}

Since the user certificate is public, it isn't much use (on its own) as a
credential for authentication. It is the combination of the user's possession of
the private key associated with the certifcate, the subject of the certificate
and the chain of certificates back to a CA you trust that matters. Therefore, I
have not incorporated a direct comparission of the certificate presented by the
user with what may be held in the directory.

Let me know how you get on. Barring any major problems in your testing, I'll
port the changes back to 4.1.x and close this bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 37788] - Use IPv6 with APR Connectors

2006-01-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37788





--- Additional Comments From [EMAIL PROTECTED]  2006-01-28 00:50 ---
Upon further testing here, the better solution is to use APR_UNSPEC, which 
allows for APR to correctly 
make the required selection. Can you also test with the change of APR_INET -> 
APR_UNSPEC in your 
environment as well. I'd like to commit this.

Thanks!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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