DO NOT REPLY [Bug 37078] - JULI, Remote, JMX

2005-10-14 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=37078


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-10-14 17:33 ---
This JMX feature cannot be made to work with non core loggers.
Why did you file a bug ? This is [EMAIL PROTECTED] material ...

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



Latest mod_jk?

2005-10-14 Thread Fenlason, Josh
What is the latest stable mod_jk?  I know there was a vote for 1.2.15.
What is the status of that?  
On the download page it has links to 1.2.14, but these links are broken.
(http://tomcat.apache.org/download-connectors.cgi)
On the documentation page, 1.2.13 is the latest listed.
(http://tomcat.apache.org/connectors-doc/)
If anyone would be able to clarify this for me, I would be grateful.
Thanks in advance.
,
Josh.


DO NOT REPLY [Bug 37044] - JAASRealm / RealmBase role checking bug ?

2005-10-14 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=37044


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2005-10-14 19:07 ---
I have also experienced this bug with a custom JAAS LoginModule.

If Request.getUserPrincipal is changed to this:

public Principal getUserPrincipal() {
//if (userPrincipal instanceof GenericPrincipal) {
//return ((GenericPrincipal) userPrincipal).getUserPrincipal();
//} else {
return (userPrincipal);
//}
}

Things seem to work fine (though I don't know if this might have negative
impacts elsewhere).

-- 
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 37098] New: - Cannot create attributes conditionally in tags

2005-10-14 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=37098

   Summary: Cannot create attributes conditionally in 
tags
   Product: Tomcat 5
   Version: 5.5.7
  Platform: Macintosh
   URL: http://www.talkaboutprogramming.com/group/comp.lang.java
.programmer/messages/630086.html
OS/Version: Mac OS X 10.4
Status: NEW
  Severity: critical
  Priority: P3
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]





return overlib('foo');



bar



-> Attribute onmouseover invalid for tag if according to TLD

As a workaround
- can put the if condition into the attribute in order to generate an empty 
attribute but this is not quite well-formed XML. This only works in some cases
- use CDATA to define elements

Both of these are poor alternatives.

-- 
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 37098] - Cannot create attributes conditionally in tags

2005-10-14 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=37098


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-10-14 23:40 ---
The JSP spec does not allow custom tags inside the body of .

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



svn commit: r321299 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java

2005-10-14 Thread costin
Author: costin
Date: Fri Oct 14 23:43:41 2005
New Revision: 321299

URL: http://svn.apache.org/viewcvs?rev=321299&view=rev
Log:
Added a couple of comments.

Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java?rev=321299&r1=321298&r2=321299&view=diff
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java 
Fri Oct 14 23:43:41 2005
@@ -33,6 +33,8 @@
  * to be able to parse the request without converting to string.
  */
 
+// TODO: This class could either extend ByteBuffer, or better a ByteBuffer 
inside
+// this way it could provide the search/etc on ByteBuffer, as a helper.
 
 /**
  * This class is used to represent a chunk of bytes, and
@@ -40,6 +42,19 @@
  *
  * The buffer can be modified and used for both input and output.
  *
+ * There are 2 modes: The chunk can be associated with a sink - 
ByteInputChannel or ByteOutputChannel,
+ * which will be used when the buffer is empty ( on input ) or filled ( on 
output ).
+ * For output, it can also grow. This operating mode is selected by calling 
setLimit() or
+ * allocate(initial, limit) with limit != -1.
+ *
+ * Various search and append method are defined - similar with String and 
StringBuffer, but
+ * operating on bytes.
+ *
+ * This is important because it allows processing the http headers directly on 
the received bytes,
+ * without converting to chars and Strings until the strings are needed. In 
addition, the charset
+ * is determined later, from headers or user code.
+ *
+ *
  * @author [EMAIL PROTECTED]
  * @author James Todd [EMAIL PROTECTED]
  * @author Costin Manolache
@@ -47,7 +62,10 @@
  */
 public final class ByteChunk implements Cloneable, Serializable {
 
-// Input interface, used when the buffer is emptied.
+/** Input interface, used when the buffer is emptiy
+ *
+ * Same as java.nio.channel.ReadableByteChannel
+ */
 public static interface ByteInputChannel {
 /** 
  * Read new bytes ( usually the internal conversion buffer ).
@@ -57,7 +75,9 @@
 public int realReadBytes(byte cbuf[], int off, int len)
 throws IOException;
 }
-// Output interface, used when the buffer is filled.
+
+/** Same as java.nio.channel.WrittableByteChannel.
+ */
 public static interface ByteOutputChannel {
 /** 
  * Send the bytes ( usually the internal conversion buffer ).
@@ -105,7 +125,7 @@
 }
 
 //
-public ByteChunk getClone() {
+public ByteChunk getClone() {
try {
return (ByteChunk)this.clone();
} catch( Exception ex) {
@@ -251,6 +271,11 @@
 }
 
 //  Adding data to the buffer 
+/** Append a char, by casting it to byte. This IS NOT intended for unicode.
+ *
+ * @param c
+ * @throws IOException
+ */
 public void append( char c )
throws IOException
 {
@@ -392,6 +417,11 @@
 }
 
 
+/** Send the buffer to the sink. Called by append() when the limit is 
reached.
+ *  You can also call it explicitely to force the data to be written.
+ *
+ * @throws IOException
+ */
 public void flushBuffer()
throws IOException
 {
@@ -777,7 +807,7 @@
 
 
 /**
- * Convert specified String to a byte array.
+ * Convert specified String to a byte array. This ONLY WORKS for ascii, 
UTF chars will be truncated.
  * 
  * @param value to convert to byte array
  * @return the byte array value



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



svn commit: r321300 - in /tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader: Loader.java Module.java ModuleClassLoader.java Repository.java RepositoryClassLoader.java

2005-10-14 Thread costin
Author: costin
Date: Fri Oct 14 23:45:43 2005
New Revision: 321300

URL: http://svn.apache.org/viewcvs?rev=321300&view=rev
Log:
More refactoring ( this package is not used in any existing code AFAIK,
please let me know if I'm wrong ). This code is based on tomcat loader,
but modified to make it more flexible and support reloading of tomcat
components.

Added:

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/RepositoryClassLoader.java
Modified:

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Loader.java

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Module.java

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/ModuleClassLoader.java

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Repository.java

Modified: 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Loader.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Loader.java?rev=321300&r1=321299&r2=321300&view=diff
==
--- 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Loader.java 
(original)
+++ 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Loader.java 
Fri Oct 14 23:45:43 2005
@@ -854,7 +854,7 @@
 }
 
 void notifyModuleStop(Module module) {
-listener.moduleStop(module);
+if( listener!=null ) listener.moduleStop(module);
 }
 
 /** Add a module listener. 

Modified: 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Module.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Module.java?rev=321300&r1=321299&r2=321300&view=diff
==
--- 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Module.java 
(original)
+++ 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Module.java 
Fri Oct 14 23:45:43 2005
@@ -167,6 +167,8 @@
 ("Already started");
 started = true;
 
+log("start()");
+
 // Construct a class loader based on our current repositories list
 try {
 

Modified: 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/ModuleClassLoader.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/ModuleClassLoader.java?rev=321300&r1=321299&r2=321300&view=diff
==
--- 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/ModuleClassLoader.java
 (original)
+++ 
tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/ModuleClassLoader.java
 Fri Oct 14 23:45:43 2005
@@ -191,13 +191,16 @@
 }
 
 private boolean dirCheck(File dir ) {
-log("Checking " + dir );
+//log("Checking " + dir );
 File subd[]=dir.listFiles();
 for( int i=0; i< subd.length; i++ ) {
 long lm=subd[i].lastModified();
-if( lm > lastModified ) return true;
+if( lm > lastModified ) {
+log("Modified file: " + dir + " " + subd[i] + " " + lm + " " + 
lastModified);
+return true;
+}
 if( subd[i].isDirectory() ) {
-if( dirCheck(subd[i]) ) return true;
+return  dirCheck(subd[i]);
 }
 }
 return false;
@@ -215,10 +218,13 @@
 for (int i = 0; i  lastModified ) return true;
+if( lm > lastModified ) {
+log( "Modified file: " + f + " " + lm + " " + 
lastModified);
+return true;
+}
 // assume dirs are used only for debug and small
 if( f.isDirectory() ) {
-if( dirCheck(f) ) return true;
+return dirCheck(f);
 }
 }
 }
@@ -242,7 +248,14 @@
  * @exception ClassNotFoundException if the class was not found
  */
 public Class findClass(String name) throws ClassNotFoundException {
-
+return findClass2(name, true);
+}
+
+public Class findClass2(String name, boolean del2repo) throws 
ClassNotFoundException {
+if( del2repo ) {
+return 
((RepositoryClassLoader)repository.getClassLoader()).findClass(name);   
 
+} // else 
+ 
 Class clazz = null;
 
 try {
@@ -309,6 +322,13 @@
  * @param name Name of the resource to be found
  */
 public URL findResource(final String name) {
+return findResource2( name, true);
+}
+
+public URL findResource2(final String name, boolean del2repo ) {
+if( del2repo ) {
+return 
((RepositoryClassLoader)repository.getClassLoader()).findResource(name);
+} // 

svn commit: r321301 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java

2005-10-14 Thread costin
Author: costin
Date: Fri Oct 14 23:56:28 2005
New Revision: 321301

URL: http://svn.apache.org/viewcvs?rev=321301&view=rev
Log:
Add few more comments, and a special case dealing with invalid shutdown
ports - if -1 or -2 are specified, don't open any shutdown port, instead
rely on the embedding app. 

This is only intended for 'runtime' - i.e. embeded case, where there is
no reason to have a shutdown port for tomcat. It shouldn't hurt any
existing use case tough. If you have a better suggestion, please let me
know - I can easily replace this with something equivalent.


Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java?rev=321301&r1=321300&r2=321301&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 Fri Oct 14 23:56:28 2005
@@ -179,6 +179,7 @@
  */
 protected PropertyChangeSupport support = new PropertyChangeSupport(this);
 
+private boolean stopAwait = false;
 
 // - Properties
 
@@ -331,12 +332,31 @@
 
 }
 
+public void stopAwait() {
+stopAwait=true;
+}
 
 /**
  * Wait until a proper shutdown command is received, then return.
+ * This keeps the main thread alive - the thread pool listening for http 
+ * connections is daemon threads.
  */
 public void await() {
-
+// Negative values - don't wait on port - tomcat is embedded or we 
just don't like ports
+if( port == -2 ) {
+// undocumented yet - for embedding apps that are around, alive.
+return;
+}
+if( port==-1 ) {
+while( true ) {
+try {
+Thread.sleep( 10 );
+} catch( InterruptedException ex ) {
+}
+if( stopAwait ) return;
+}
+}
+
 // Set up a server socket to wait on
 ServerSocket serverSocket = null;
 try {



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