DO NOT REPLY [Bug 14538] New: - ISAPI filter does not remove the jsessionid parameter

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14538.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14538

ISAPI filter does not remove the jsessionid parameter

   Summary: ISAPI filter does not remove the jsessionid parameter
   Product: Tomcat 4
   Version: 4.1.12
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote JK 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


The ISAPI filter does not remove the ;jsessionid= parameter from requests that 
are served directly by IIS.

This causes links to css, script and image files to be broken with jsp files.

Best regards,
Petteri Stenius

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 14515] - Documents are transmitted twice when calling via POST from external source

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14515.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14515

Documents are transmitted twice when calling via POST from external source

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-11-14 09:20 ---
Under certain conditions the filter described in the bug report calls
doFilter(reqestwrapper, response) twice which causes the described
behaviour.

Sorry ;-/

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




[ANNOUNCEMENT] Apache Tomcat 4.1.15 Alpha released

2002-11-14 Thread Remy Maucherat
Apache Tomcat 4.1.15 Alpha has just been released. Please help improve 
upcoming Tomcat releases by testing it.

Note: This release is intended only for testing purposes, not for 
production use.

Downloads:
http://www.apache.org/dist/jakarta/jakarta-tomcat-4.0/release/v4.1.15-alpha/

Significant changes over 4.1.14 Alpha include improvements to Jasper 
buffer handling, as well as bugfixes.

The full list of changes is available in the release notes.
http://www.apache.org/dist/jakarta/jakarta-tomcat-4.0/release/v4.1.15-alpha/RELEASE-NOTES

Remy


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



cvs commit: jakarta-tomcat-5 tomcat.nsi

2002-11-14 Thread remm
remm2002/11/14 02:36:39

  Modified:.tomcat.nsi
  Log:
  - Update to nightly (again). On the plus side, the result is getting really
polished now (and much faster than usual MSI based installers).
  
  Revision  ChangesPath
  1.16  +12 -24jakarta-tomcat-5/tomcat.nsi
  
  Index: tomcat.nsi
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- tomcat.nsi12 Nov 2002 08:02:24 -  1.15
  +++ tomcat.nsi14 Nov 2002 10:36:39 -  1.16
   -37,12 +37,21 
 SetCompressor bzip2
 SetDatablockOptimize on
   
  +  ;Install Options pages
  +  LangString TEXT_JVM_TITLE ${LANG_ENGLISH} Java Virtual Machine
  +  LangString TEXT_JVM_SUBTITLE ${LANG_ENGLISH} Java Virtual Machine path 
selection.
  +  LangString TEXT_JVM_PAGETITLE ${LANG_ENGLISH} : Java Virtual Machine path 
selection
  +
  +  LangString TEXT_CONF_TITLE ${LANG_ENGLISH} Configuration
  +  LangString TEXT_CONF_SUBTITLE ${LANG_ENGLISH} Tomcat basic configuration.
  +  LangString TEXT_CONF_PAGETITLE ${LANG_ENGLISH} : Configuration Options
  +
 ;Page order
 !insertmacro MUI_PAGECOMMAND_LICENSE
 !insertmacro MUI_PAGECOMMAND_COMPONENTS
 !insertmacro MUI_PAGECOMMAND_DIRECTORY
  -  Page custom SetConfiguration
  -  Page custom SetChooseJVM
  +  Page custom SetConfiguration $(TEXT_CONF_PAGETITLE)
  +  Page custom SetChooseJVM $(TEXT_JVM_PAGETITLE)
 !insertmacro MUI_PAGECOMMAND_INSTFILES
   
 ;License dialog
   -61,15 +70,6 
 ;Folder-select dialog
 InstallDir $PROGRAMFILES\Apache Group\Tomcat 5.0
   
  -  ;Install Options pages
  -  LangString TEXT_JVM_TITLE ${LANG_ENGLISH} Java Virtual Machine
  -  LangString TEXT_JVM_SUBTITLE ${LANG_ENGLISH} Java Virtual Machine path 
selection.
  -  LangString TEXT_JVM_PAGETITLE ${LANG_ENGLISH} Java Virtual Machine path 
selection
  -
  -  LangString TEXT_CONF_TITLE ${LANG_ENGLISH} Configuration
  -  LangString TEXT_CONF_SUBTITLE ${LANG_ENGLISH} Tomcat basic configuration.
  -  LangString TEXT_CONF_PAGETITLE ${LANG_ENGLISH} Tomcat 5 Configuration Options
  -
 ;Install types
 InstType Normal
 InstType Minimum
   -231,22 +231,16 
 WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache 
Tomcat 5.0 \
  UninstallString '$INSTDIR\Uninstall.exe'
   
  -  Sleep 500
 BringToFront
   
   SectionEnd
   
  -
   Function .onInit
   
 ;Extract Install Options INI Files
 !insertmacro MUI_INSTALLOPTIONS_EXTRACT config.ini
 !insertmacro MUI_INSTALLOPTIONS_EXTRACT jvm.ini
   
  -  ;Titles for Install Options dialogs
  -  !insertmacro MUI_INSTALLOPTIONS_WRITETITLE config.ini $(TEXT_CONF_PAGETITLE)
  -  !insertmacro MUI_INSTALLOPTIONS_WRITETITLE jvm.ini $(TEXT_JVM_PAGETITLE)
  -
   FunctionEnd
   
   Function SetChooseJVM
   -260,12 +254,6 
   Function SetConfiguration
 !insertmacro MUI_HEADER_TEXT $(TEXT_CONF_TITLE) $(TEXT_CONF_SUBTITLE)
 !insertmacro MUI_INSTALLOPTIONS_DISPLAY config.ini
  -FunctionEnd
  -
  -Function .onInstSuccess
  -
  -  ExecShell open '$SMPROGRAMS\Apache Tomcat 5.0'
  -
   FunctionEnd
   
   ;
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: JK2 unixsocket: Can't create apr

2002-11-14 Thread Brzezinski, Paul J
Costin Manolache wrote:


A quick test: put commons-logging.jar and log4j.jar in common/lib.

Most classloader problems are due to the loader hierarchy. 

It is possible ( at least with 5.0 - I'm running it this way ) to
put all the jars in the same place ( like common/lib or just in CLASSPATH)
and run tomcat with delegation and a simple class loader hierarchy.
 

please help me understand if there's anything out-of-the ordinary that I 
need to do to run tomcat with delegation and a simple class loader 
hierarchy.  I quickly reviewed the class loader HOW-TO and nothing 
popped out as how to do this.  

If you mean putting everything -- all the jar files mentioned in that 
document into $CATALINA_HOME/common/lib...

I would bet the same works with 4.1.x - jboss for example is using
embeded tocmat with all the jars in the main loader.

Regarding the unix channel - you need to be able to load libjkjni.so 
and libapr.so. It may be a good idea ( at least for testing ) to place
them in the JRE_HOME/lib dir - that's a place where java will certainly
look for .so files. ( at least with JDK1.4 I had some problems with loading
jars, and the LD_LIBRARY_PATH may create some problems ).

Costin



Brzezinski, Paul J wrote:

 

Original post came from Tomcat Users, replying/cross-posting...



: -Original Message-
: From: Costin Manolache [mailto:cmanolache;yahoo.com]
: Sent: Wednesday, November 13, 2002 3:16 PM
: To: Tomcat Developers List
: Subject: RE: JK2 unixsocket: Can't create apr
: 
: 
: Very weird.
: 
: Are you using the latest commons-logging.jar ? JDK1.4 or 1.3
: ? Do you have log4j ?

Yes -- *I* get this error on 4.1.12/5.0 on Solaris 8, hopefully Robert
Williams can provide details about his specfic config:


I have:

j2sdk1.4.1
commons-logging-1.0.2
jakarta-log4j-1.2.6

Tried this against:
jakarta-tomcat-4.1.12
jakarta-tomcat-4.1.12-LE-jdk14
jakarta-tomcat-5

I get the same error -- can't create apr...

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340)

: The problem seems releated to class loading ( as usual :-).

Yeah, but how do we work-around it or solve it permanently.  I've tried
massaging the catalina.sh startup script to include commons-logging.jar in
CLASSPATH that gets passed to the JVM at startup.

I've put commons-logging.jar in $CATALINA_HOME/server/lib even though
commons-logging-api.jar exists there.

I see in the -LE-jdk14 that there's a log4j.rename-to-jar.  What's the
confidence level that this will resolve this problem?

Is this a problem on other platforms?

Is this NOT a problem on Linux?

: Costin
: 
: 
: Brzezinski, Paul J wrote:
: 
:  I wonder if a better question is:
:  
:  Is anyone using the ChannelUnix (AF_UNIX socket) connector on any
:  platform?
:  
:  On what platforms is the ChannelUnix (AF_UNIX socket) connector
:  actually known to function?
:  
:  
:  
:  : -Original Message-
:  : From: Robert Williams [mailto:rcw1;pacbell.net]
:  : Sent: Wednesday, November 13, 2002 1:05 PM
:  : To: Tomcat User
:  : Subject: JK2 unixsocket: Can't create apr
:  :
:  : 
:  : Hi all,
:  : I am trying to implement the unixsocket on JK2. While the
:  : channelSocket
:  : works fine I was hoping to get the speed benefits of a
:  : unixsocket. I am
:  : using the example setups in the JK2 documentation. And since
:  : it seems to
:  : be looking for  the LogFactory I have made sure that
:  : commons-logging-api.jar  was in the Tomcat common/lib and I
:  : also put it
:  : in java/jre/lib/ext as well. All to no avail. I am
: stumped. I haven't
:  : been able to find anything in the list or on google
: addressing this
:  : problem. Some docs regarding channelSocket say disable
: apr for this
:  : error but apparently unixsocket won't work without apr
:  : enabled. Any help
:  : would be appreciated.
:  : Thanks Robert
:  : 
:  : jakarta-tomcat-4.1.12
:  : jakarta-tomcat-connectors-4.1.12
:  : Apache/2.0.43
:  : Solaris 9
:  : 
:  : Nov 13, 2002 9:29:04 AM org.apache.jk.server.JkMain newHandler
:  : SEVERE: Can't create apr
:  : java.lang.NoClassDefFoundError:
: org/apache/commons/logging/LogFactory
:  : at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340)
:  : at java.lang.Class.forName0(Native Method)
:  : at java.lang.Class.forName(Class.java:130)
:  : at org.apache.jk.server.JkMain.newHandler(JkMain.java:494)
:  : at org.apache.jk.server.JkMain.start(JkMain.java:316)
:  : at
:  : org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.jav
:  : 
:  : workers2.properties
:  : 
:  : [shm]
:  : file=${serverRoot}/logs/shm.file
:  : size=1048576
:  : 
:  : # Example unixsocket channel.
:  : [channel.un:unixsocket]
:  : file=/usr/local/tomcat/work/jk2.socket
:  : 
:  : # define the worker
:  : [ajp13:unixsocket]
:  : channel=channel.un:unixsocket
:  : 
:  : # Uri mapping
:  : [uri:/examples/*]
:  : worker=ajp13:unixsocket
:  : 
:  : jk2.properties
:  

DO NOT REPLY [Bug 13983] - RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983

RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it





--- Additional Comments From [EMAIL PROTECTED]  2002-11-14 12:44 ---
See Sun's bug 4273532 
(http://developer.java.sun.com/developer/bugParade/bugs/4273532.html).

Apparently, the WebappClassLoader is doing nothing wrong when in the getURL 
method it calls realFile.toURL().  Sun's File.toURL is to blame.  Sun's 
suggested workaround fixes the problem:

  return realFile.toURI().toURL();

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 10871] - Spaces in install directory causes errors

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10871.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10871

Spaces in install directory causes errors

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-11-14 12:46 ---
Same problem as #13983.  Workaround is to move Tomcat's installation dir out 
of directories with spaces (c:\Program Files\Apache Group\Tomcat 4.1 to 
something like c:\tomcat), or specify the RMI codebase property.   Or fix 
WebappClassLoader to workaround Sun's bug 4273532 
(http://developer.java.sun.com/developer/bugParade/bugs/4273532.html).

Apparently, the WebappClassLoader is doing nothing wrong when in the getURL 
method it calls realFile.toURL().  Sun's File.toURL is to blame.  Sun's 
suggested workaround fixes the problem:

  return realFile.toURI().toURL();



*** This bug has been marked as a duplicate of 13983 ***

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 13983] - RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983

RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-11-14 12:46 ---
*** Bug 10871 has been marked as a duplicate of this bug. ***

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 13983] - RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13983

RMI call from Web Application throws SocketException if CATALINA_HOME has a space in it





--- Additional Comments From [EMAIL PROTECTED]  2002-11-14 12:56 ---
Thanks for the additional details. I had added realFile.toURI().toURL() already
in the Tomcat 5 dev code, but it has the following problems:
- works only with JDK 1.4 :-(
- causes problems with codebase definitions used by the security manager (which
are not URL encoded); for that reason, the encoded URLs are only returned for
getResource calls.

I think this change will be reverted (we need to work with JDK 1.3), and another
fix will be needed.

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java ServerLifecycleListener.java

2002-11-14 Thread remm
remm2002/11/14 06:24:06

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java ServerLifecycleListener.java
  Log:
  - Add support for the RMI and IIOP based adaptors of MX4J.
  - The RMI based adaptor could in theory be used with MC4J (see at sf.net),
but it fails, because:
- MC4J only works with MX4J 1.1 (and not 1.1.1)
- MX4J 1.1.1 changed the name of the putNamingProperty (to putJNDIProperty)
It is likely the next release of MC4J will work out of the box (but not on my 
laptop,
where it bothers my ATI display driver, and causes a BSOD).
  
  Revision  ChangesPath
  1.8   +105 -4
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MBeanUtils.java   8 Nov 2002 11:32:37 -   1.7
  +++ MBeanUtils.java   14 Nov 2002 14:24:05 -  1.8
   -65,8 +65,11 
   
   
   import java.io.InputStream;
  +import java.lang.reflect.Method;
   import java.net.URL;
   import java.net.URLEncoder;
  +
  +import javax.management.Attribute;
   import javax.management.InstanceAlreadyExistsException;
   import javax.management.MalformedObjectNameException;
   import javax.management.MBeanException;
   -77,6 +80,7 
   import javax.management.OperationsException;
   import javax.management.modelmbean.InvalidTargetObjectTypeException;
   import javax.management.modelmbean.ModelMBean;
  +
   import org.apache.catalina.Connector;
   import org.apache.catalina.Contained;
   import org.apache.catalina.Container;
   -1619,6 +1623,103 
   }
   }
   return (mserver);
  +
  +}
  +
  +
  +/**
  + * Create a RMI adapter [MX4J specific].
  + */
  +public static void createRMIAdaptor(String adaptorType)
  +throws Exception {
  +
  +String namingProviderObjectName = null;
  +String namingProviderClassName = null;
  +String adaptorObjectName = null;
  +String adaptorClassName = null;
  +String adaptorMbeanClassName = null;
  +boolean delay = false;
  +String jndiName = jrmp;
  +String contextFactory = null;
  +String providerUrl = null;
  +
  +if (adaptorType.equals(jrmp)) {
  +namingProviderObjectName = Naming:type=rmiregistry;
  +namingProviderClassName = mx4j.tools.naming.NamingService;
  +adaptorObjectName = Adaptor:protocol=JRMP;
  +adaptorClassName = mx4j.adaptor.rmi.jrmp.JRMPAdaptor;
  +adaptorMbeanClassName = mx4j.adaptor.rmi.jrmp.JRMPAdaptorMBean;
  +contextFactory = 
  +com.sun.jndi.rmi.registry.RegistryContextFactory;
  +providerUrl = rmi://localhost:1099;
  +} else if (adaptorType.equals(iiop)) {
  +namingProviderObjectName = Naming:type=tnameserv;
  +namingProviderClassName = mx4j.tools.naming.CosNamingService;
  +delay = true;
  +adaptorObjectName = Adaptor:protocol=IIOP;
  +adaptorClassName = mx4j.adaptor.rmi.iiop.IIOPAdaptor;
  +adaptorMbeanClassName = mx4j.adaptor.rmi.iiop.IIOPAdaptorMBean;
  +contextFactory = com.sun.jndi.cosnaming.CNCtxFactory;
  +providerUrl = iiop://localhost:900;
  +} else {
  +throw new IllegalArgumentException(Unknown adaptor type);
  +}
  +
  +// Create and start the naming service
  +ObjectName naming = new ObjectName(namingProviderObjectName);
  +mserver.createMBean(namingProviderClassName, naming, null);
  +if (delay) {
  +mserver.setAttribute(naming, new Attribute
  + (Delay, new Integer(5000)));
  +}
  +mserver.invoke(naming, start, null, null);
  +
  +// Create the JRMP adaptor
  +ObjectName adaptor = new ObjectName(adaptorObjectName);
  +mserver.createMBean(adaptorClassName, adaptor, null);
  +
  +Class proxyClass = Class.forName(mx4j.util.StandardMBeanProxy);
  +
  +Object args[] = null;
  +Class types[] = null;
  +Method method = null;
  +
  +types = new Class[3];
  +types[0] = Class.class;
  +types[1] = MBeanServer.class;
  +types[2] = ObjectName.class;
  +args = new Object[3];
  +args[0] = Class.forName(adaptorMbeanClassName);
  +args[1] = mserver;
  +args[2] = adaptor;
  +method = proxyClass.getMethod(create, types);
  +Object bean = method.invoke(null, args);
  +
  +Class beanClass = bean.getClass();
  +
  +args = new Object[1];
  +args[0] = jndiName;
  +types = 

Re: JK2 unixsocket: Can't create apr

2002-11-14 Thread Costin Manolache
Brzezinski, Paul J wrote:

 Costin Manolache wrote:
 
A quick test: put commons-logging.jar and log4j.jar in common/lib.

Most classloader problems are due to the loader hierarchy.

It is possible ( at least with 5.0 - I'm running it this way ) to
put all the jars in the same place ( like common/lib or just in CLASSPATH)
and run tomcat with delegation and a simple class loader hierarchy.
  

 please help me understand if there's anything out-of-the ordinary that I
 need to do to run tomcat with delegation and a simple class loader
 hierarchy.  I quickly reviewed the class loader HOW-TO and nothing
 popped out as how to do this.

There is nothing out-of-the ordinary, just put all the jars in common/lib.

Or you can put all of them in the classpath and call 
o.a.catalina.startup.Catalina instead of bootstrap, but I'm not sure it'll
work ( it does for what I'm using - 5.0 head ). 

 
 If you mean putting everything -- all the jar files mentioned in that
 document into $CATALINA_HOME/common/lib...

Yes. That would put everything in the 'main' classloader. You loose the 
separation - and it may be slightly more insecure. AFAIK the classloader
separation doesn't add extra protection if the sandbox is disabled - 
and the facades are protecting the internals.

Costin

 
I would bet the same works with 4.1.x - jboss for example is using
embeded tocmat with all the jars in the main loader.

Regarding the unix channel - you need to be able to load libjkjni.so
and libapr.so. It may be a good idea ( at least for testing ) to place
them in the JRE_HOME/lib dir - that's a place where java will certainly
look for .so files. ( at least with JDK1.4 I had some problems with
loading jars, and the LD_LIBRARY_PATH may create some problems ).

Costin



Brzezinski, Paul J wrote:

  

Original post came from Tomcat Users, replying/cross-posting...



: -Original Message-
: From: Costin Manolache [mailto:cmanolache;yahoo.com]
: Sent: Wednesday, November 13, 2002 3:16 PM
: To: Tomcat Developers List
: Subject: RE: JK2 unixsocket: Can't create apr
: 
: 
: Very weird.
: 
: Are you using the latest commons-logging.jar ? JDK1.4 or 1.3
: ? Do you have log4j ?

Yes -- *I* get this error on 4.1.12/5.0 on Solaris 8, hopefully Robert
Williams can provide details about his specfic config:


I have:

j2sdk1.4.1
commons-logging-1.0.2
jakarta-log4j-1.2.6

Tried this against:
jakarta-tomcat-4.1.12
jakarta-tomcat-4.1.12-LE-jdk14
jakarta-tomcat-5

I get the same error -- can't create apr...

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340)

: The problem seems releated to class loading ( as usual :-).

Yeah, but how do we work-around it or solve it permanently.  I've tried
massaging the catalina.sh startup script to include commons-logging.jar
in CLASSPATH that gets passed to the JVM at startup.

I've put commons-logging.jar in $CATALINA_HOME/server/lib even though
commons-logging-api.jar exists there.

I see in the -LE-jdk14 that there's a log4j.rename-to-jar.  What's the
confidence level that this will resolve this problem?

Is this a problem on other platforms?

Is this NOT a problem on Linux?

: Costin
: 
: 
: Brzezinski, Paul J wrote:
: 
:  I wonder if a better question is:
:  
:  Is anyone using the ChannelUnix (AF_UNIX socket) connector on any
:  platform?
:  
:  On what platforms is the ChannelUnix (AF_UNIX socket) connector
:  actually known to function?
:  
:  
:  
:  : -Original Message-
:  : From: Robert Williams [mailto:rcw1;pacbell.net]
:  : Sent: Wednesday, November 13, 2002 1:05 PM
:  : To: Tomcat User
:  : Subject: JK2 unixsocket: Can't create apr
:  :
:  : 
:  : Hi all,
:  : I am trying to implement the unixsocket on JK2. While the
:  : channelSocket
:  : works fine I was hoping to get the speed benefits of a
:  : unixsocket. I am
:  : using the example setups in the JK2 documentation. And since
:  : it seems to
:  : be looking for  the LogFactory I have made sure that
:  : commons-logging-api.jar  was in the Tomcat common/lib and I
:  : also put it
:  : in java/jre/lib/ext as well. All to no avail. I am
: stumped. I haven't
:  : been able to find anything in the list or on google
: addressing this
:  : problem. Some docs regarding channelSocket say disable
: apr for this
:  : error but apparently unixsocket won't work without apr
:  : enabled. Any help
:  : would be appreciated.
:  : Thanks Robert
:  : 
:  : jakarta-tomcat-4.1.12
:  : jakarta-tomcat-connectors-4.1.12
:  : Apache/2.0.43
:  : Solaris 9
:  : 
:  : Nov 13, 2002 9:29:04 AM org.apache.jk.server.JkMain newHandler
:  : SEVERE: Can't create apr
:  : java.lang.NoClassDefFoundError:
: org/apache/commons/logging/LogFactory
:  : at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340)
:  : at java.lang.Class.forName0(Native Method)
:  : at java.lang.Class.forName(Class.java:130)
:  : at org.apache.jk.server.JkMain.newHandler(JkMain.java:494)
:  :  

Xerces 2.2.x Struts 1.0.2 problem.

2002-11-14 Thread Jeanfrancois Arcand
Hi,

finally, with the help of Craig, I was able to isolate the problem 
Tomcat have with Xerces 2.2.x. When you have  an !ELEMENT line longer 
that 80 characters in a DTD, Xerces 2.2.x thrown the misleading 
exception everybody have seen.

In our case, file web-app_2_3.dtd included with Struts 1.0.2 is causing 
the problem (Strangely, this is not the same as the web-app_2_3.dtd 
included in jakarta-servletapi). Struts 1.1 have a 80 characters format.

We have 3 solutions:

(1) Bundles Struts 1.1 latest build with Tomcat 4.1.x
(2) Compile Struts 1.0.2 with our version of web-app_2_3.xml and commit 
the jar file in the webapp WEB-INF/lib folder.
(3) Wait for a new release of Xerces (or when the fix will be available).

The bugzilla bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282

This bug was difficult to isolate :-)

-- Jeanfrancois


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



cvs commit: jakarta-tomcat-catalina/webapps/ROOT index.jsp

2002-11-14 Thread remm
remm2002/11/14 08:40:20

  Modified:webapps/ROOT index.jsp
  Log:
  - Fix size.
  
  Revision  ChangesPath
  1.7   +1 -1  jakarta-tomcat-catalina/webapps/ROOT/index.jsp
  
  Index: index.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/ROOT/index.jsp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- index.jsp 18 Oct 2002 20:47:02 -  1.6
  +++ index.jsp 14 Nov 2002 16:40:20 -  1.7
   -46,7 +46,7 
   trtd align=left valign=topb%= 
application.getServerInfo() %/b/td/tr
   /table
   /td
  -td align=righta href=http://jakarta.apache.org/;img 
src=jakarta-banner.gif height=100 width=350 border=0 alt=The Jakarta 
Project/a/td
  +td align=righta href=http://jakarta.apache.org/;img 
src=jakarta-banner.gif height=48 width=505 border=0 alt=The Jakarta 
Project/a/td
   /tr
   /table
   
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: Xerces 2.2.x Struts 1.0.2 problem.

2002-11-14 Thread Remy Maucherat
Jeanfrancois Arcand wrote:

Hi,

finally, with the help of Craig, I was able to isolate the problem 
Tomcat have with Xerces 2.2.x. When you have  an !ELEMENT line longer 
that 80 characters in a DTD, Xerces 2.2.x thrown the misleading 
exception everybody have seen.

Great ! (Craig saves the day again :) )


In our case, file web-app_2_3.dtd included with Struts 1.0.2 is causing 
the problem (Strangely, this is not the same as the web-app_2_3.dtd 
included in jakarta-servletapi). Struts 1.1 have a 80 characters format.

We have 3 solutions:

Ok, the following is just IMO.


(1) Bundles Struts 1.1 latest build with Tomcat 4.1.x


I would rather not.


(2) Compile Struts 1.0.2 with our version of web-app_2_3.xml and commit 
the jar file in the webapp WEB-INF/lib folder.

I don't like it either.


(3) Wait for a new release of Xerces (or when the fix will be available).


I would choose that one.

I haven't updated my set of binaries at all to build 4.1.15 (the 
rationale is: why upgrade when everything works fine ?). I plan to do 
some conservative upgrading for the next build, including:
- Xerces 2.2.2 (if out by then)
- MX4J 1.1.1
- Beanutils 1.5
- Collections 2.1

The bugzilla bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282

This bug was difficult to isolate :-)


I suppose. The reported error was Microsoftian ;-)

Remy


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




JMX problems

2002-11-14 Thread Costin Manolache
Craig, Amy - or anyone who knows JMX, I need help :-)

I just can't find any way to add an attribute change listener
in the whole JMX spec, unless I have the instance of the model
mbean. And there is no way to get that instance.

All query and get methods in MBeanServer return ObjectInstance -
i.e. name and class, but no 'instance'. 

There is an 'addNotificationListener' that takes the object name -
but the spec ( and implementation ) doesn't allow this to register
attribute change listeners, and att changes are not sent to 
listeners registered with this method ( there is an all other but
attribute changes in the PDF file ).

I'm stuck. I can add some code to the modeler mbean to work 
around, but the solution won't work for other mbeans.

What I want to do is find all attribute changes done via JMX and persist 
them - if you remember my old proposal. At the moment I'm not very sure
it can be implemented. The only possible solution to revive it would be
to force all attribute changes to go through a modeler-specific interface
or to require the use of the modeler for all mbeans.

Costin



--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-site/xdocs resources.xml

2002-11-14 Thread remm
remm2002/11/14 10:53:28

  Modified:docs building.html resources.html
   xdocsresources.xml
  Log:
  - Update book list (3 new books released since september).
  
  Revision  ChangesPath
  1.2   +1 -2  jakarta-tomcat-site/docs/building.html
  
  Index: building.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-site/docs/building.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- building.html 29 Oct 2002 19:12:51 -  1.1
  +++ building.html 14 Nov 2002 18:53:28 -  1.2
   -262,8 +262,7 
   /code
   /p
   p
  -For a quick rebuild of only modified code you can use 
  -
  +For a quick rebuild of only modified code you can use:
   codebr /
   cd ${tomcat.source}br /
   ant buildbr /
  
  
  
  1.6   +12 -0 jakarta-tomcat-site/docs/resources.html
  
  Index: resources.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-site/docs/resources.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- resources.html29 Oct 2002 19:12:51 -  1.5
  +++ resources.html14 Nov 2002 18:53:28 -  1.6
   -143,6 +143,18 
   li
 ba href=http://tomcatbook.sourceforge.net/;Tomcat Book Project/a/b
   /li
  +li
  +  bProfessional Apache Tomcat/b, by Chanoch Wiggers, Ben Galbraith, Vivek 
Chopra, Sing Li, Debashish Bhattacharjee, Amit Bakore, Romin Irani, Sandip 
Bhattacharya, Chad Fowlerbr /
  +  iWrox Press/i
  +/li
  +li
  +  bMastering Tomcat Development/b, by Peter Harrison, Ian McFarlandbr /
  +  iJohn Wiley amp; Sons/i
  +/li
  +li
  +  bTomcat Kick Start/b, by Martin Bond, Debbie Lawbr /
  +  iSams/i
  +/li
 /ul
   /blockquote
   /p
  
  
  
  1.3   +12 -0 jakarta-tomcat-site/xdocs/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-site/xdocs/resources.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- resources.xml 24 Apr 2002 14:11:18 -  1.2
  +++ resources.xml 14 Nov 2002 18:53:28 -  1.3
   -26,6 +26,18 
   li
 ba href=http://tomcatbook.sourceforge.net/;Tomcat Book Project/a/b
   /li
  +li
  +  bProfessional Apache Tomcat/b, by Chanoch Wiggers, Ben Galbraith, Vivek 
Chopra, Sing Li, Debashish Bhattacharjee, Amit Bakore, Romin Irani, Sandip 
Bhattacharya, Chad Fowlerbr/
  +  iWrox Press/i
  +/li
  +li
  +  bMastering Tomcat Development/b, by Peter Harrison, Ian McFarlandbr/
  +  iJohn Wiley amp; Sons/i
  +/li
  +li
  +  bTomcat Kick Start/b, by Martin Bond, Debbie Lawbr/
  +  iSams/i
  +/li
 /ul
   
   /section
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: JK2 unixsocket: Can't create apr

2002-11-14 Thread Bill Barker

- Original Message -
From: Brzezinski, Paul J [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 4:42 AM
Subject: Re: JK2 unixsocket: Can't create apr


 Costin Manolache wrote:

 A quick test: put commons-logging.jar and log4j.jar in common/lib.
 
 Most classloader problems are due to the loader hierarchy.
 
 It is possible ( at least with 5.0 - I'm running it this way ) to
 put all the jars in the same place ( like common/lib or just in
CLASSPATH)
 and run tomcat with delegation and a simple class loader hierarchy.
 
 
 please help me understand if there's anything out-of-the ordinary that I
 need to do to run tomcat with delegation and a simple class loader
 hierarchy.  I quickly reviewed the class loader HOW-TO and nothing
 popped out as how to do this.

 If you mean putting everything -- all the jar files mentioned in that
 document into $CATALINA_HOME/common/lib...


Costin's recent fix to the Manifest Class-Path might help.  You might want
to try with as least the jk jars from 4.1.15.

 I would bet the same works with 4.1.x - jboss for example is using
 embeded tocmat with all the jars in the main loader.
 
 Regarding the unix channel - you need to be able to load libjkjni.so
 and libapr.so. It may be a good idea ( at least for testing ) to place
 them in the JRE_HOME/lib dir - that's a place where java will certainly
 look for .so files. ( at least with JDK1.4 I had some problems with
loading
 jars, and the LD_LIBRARY_PATH may create some problems ).
 
 Costin
 
 
 
 Brzezinski, Paul J wrote:
 
 
 
 Original post came from Tomcat Users, replying/cross-posting...
 
 
 
 : -Original Message-
 : From: Costin Manolache [mailto:cmanolache;yahoo.com]
 : Sent: Wednesday, November 13, 2002 3:16 PM
 : To: Tomcat Developers List
 : Subject: RE: JK2 unixsocket: Can't create apr
 :
 :
 : Very weird.
 :
 : Are you using the latest commons-logging.jar ? JDK1.4 or 1.3
 : ? Do you have log4j ?
 
 Yes -- *I* get this error on 4.1.12/5.0 on Solaris 8, hopefully Robert
 Williams can provide details about his specfic config:
 
 
 I have:
 
 j2sdk1.4.1
 commons-logging-1.0.2
 jakarta-log4j-1.2.6
 
 Tried this against:
 jakarta-tomcat-4.1.12
 jakarta-tomcat-4.1.12-LE-jdk14
 jakarta-tomcat-5
 
 I get the same error -- can't create apr...
 
 java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
  at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340)
 
 : The problem seems releated to class loading ( as usual :-).
 
 Yeah, but how do we work-around it or solve it permanently.  I've tried
 massaging the catalina.sh startup script to include commons-logging.jar
in
 CLASSPATH that gets passed to the JVM at startup.
 
 I've put commons-logging.jar in $CATALINA_HOME/server/lib even though
 commons-logging-api.jar exists there.
 
 I see in the -LE-jdk14 that there's a log4j.rename-to-jar.  What's the
 confidence level that this will resolve this problem?
 
 Is this a problem on other platforms?
 
 Is this NOT a problem on Linux?
 
 : Costin
 :
 :
 : Brzezinski, Paul J wrote:
 :
 :  I wonder if a better question is:
 : 
 :  Is anyone using the ChannelUnix (AF_UNIX socket) connector on any
 :  platform?
 : 
 :  On what platforms is the ChannelUnix (AF_UNIX socket) connector
 :  actually known to function?
 : 
 : 
 : 
 :  : -Original Message-
 :  : From: Robert Williams [mailto:rcw1;pacbell.net]
 :  : Sent: Wednesday, November 13, 2002 1:05 PM
 :  : To: Tomcat User
 :  : Subject: JK2 unixsocket: Can't create apr
 :  :
 :  :
 :  : Hi all,
 :  : I am trying to implement the unixsocket on JK2. While the
 :  : channelSocket
 :  : works fine I was hoping to get the speed benefits of a
 :  : unixsocket. I am
 :  : using the example setups in the JK2 documentation. And since
 :  : it seems to
 :  : be looking for  the LogFactory I have made sure that
 :  : commons-logging-api.jar  was in the Tomcat common/lib and I
 :  : also put it
 :  : in java/jre/lib/ext as well. All to no avail. I am
 : stumped. I haven't
 :  : been able to find anything in the list or on google
 : addressing this
 :  : problem. Some docs regarding channelSocket say disable
 : apr for this
 :  : error but apparently unixsocket won't work without apr
 :  : enabled. Any help
 :  : would be appreciated.
 :  : Thanks Robert
 :  :
 :  : jakarta-tomcat-4.1.12
 :  : jakarta-tomcat-connectors-4.1.12
 :  : Apache/2.0.43
 :  : Solaris 9
 :  :
 :  : Nov 13, 2002 9:29:04 AM org.apache.jk.server.JkMain newHandler
 :  : SEVERE: Can't create apr
 :  : java.lang.NoClassDefFoundError:
 : org/apache/commons/logging/LogFactory
 :  : at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340)
 :  : at java.lang.Class.forName0(Native Method)
 :  : at java.lang.Class.forName(Class.java:130)
 :  : at org.apache.jk.server.JkMain.newHandler(JkMain.java:494)
 :  : at org.apache.jk.server.JkMain.start(JkMain.java:316)
 :  : at
 :  : 

Re: ServletOutputStreamWrapper

2002-11-14 Thread Paul Hunnisett
Thanks Craig, I'll take a look at that - hope fully it'll help me to
move forward.  I'm somewhat confused though - surely Tomcat must have
subclasses of ServletInputStream and ServletOutputStream?  What gets
returned when an application call request.getInputStream() or
response.getOutputStream?

Paul Hunnisett
www.lombok.org.uk



--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 14565] New: - Tomcat Server hangs and does not make entries in the database

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14565.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14565

Tomcat Server hangs and does not make entries in the database

   Summary: Tomcat Server hangs and does not make entries in the
database
   Product: Tomcat 4
   Version: 4.1.12
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I finally figured what entries to make in the server.xml to look up the 
Datasource using JNDI. The problem is when I do to make an entry in the 
database,the server hangs. I checked the database table and no entry was made 
there.

Here is the corresponding entries in the server.xml:

Resource name=jdbc/Questions scope=Shareable 
type=javax.sql.DataSource/
 ResourceParams name=jdbc/Questions
  parameter
namevalidationQuery/name
value/value
  /parameter
  parameter
nameurl/name
valuejdbc:weblogic:mssqlserver4:Questions@localhost/value
  /parameter
  parameter
namepassword/name
value/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueweblogic.jdbc.mssqlserver4.Driver/value
  /parameter
  parameter
nameusername/name
valuesa/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams

The corresponding entries in the web.xml:

 resource-ref
 res-ref-namejdbc/Questions/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

I am using MSSQL driver from weblogic to update the table in MSSQL server.

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: JMX problems

2002-11-14 Thread Costin Manolache
More info:

I checked MX4J, JMX-RI and JBoss. The model mbean implementations
in the first 2 are consistent - and do not send attribute change
notifications on the 'normal' listeners ( those registered with
addNotificationListener). That's also consistent with the spec
wording all other notifications ( other than attribute change ).

JBoss doesn't follow the spec and sends attribute changes to
all listeners ( at least in 3.0.4 ). 

One way or the other - the JMX spec seems to have a problem. IMO
jboss is doing the right thing ( since attribute change notifications
are useless if you can't register listeners - and so far I couldn't
find any method to allow that without having an mbean instance, and
I found no method to give back the mbean instance ).

The bigger problem is that without beeing able to get back the mbean
instance, a lot of the things are impossible. You can only invoke
methods and set attributes via JMX ( probably that was the intention ),
but that removes a possible optimization and makes JMX unusable ( alone)
as a 'core' component architecture. I'm still investigating how jboss
works - but it seems they also use JNDI to suplement JMX.


Costin

Costin Manolache wrote:

 Craig, Amy - or anyone who knows JMX, I need help :-)
 
 I just can't find any way to add an attribute change listener
 in the whole JMX spec, unless I have the instance of the model
 mbean. And there is no way to get that instance.
 
 All query and get methods in MBeanServer return ObjectInstance -
 i.e. name and class, but no 'instance'.
 
 There is an 'addNotificationListener' that takes the object name -
 but the spec ( and implementation ) doesn't allow this to register
 attribute change listeners, and att changes are not sent to
 listeners registered with this method ( there is an all other but
 attribute changes in the PDF file ).
 
 I'm stuck. I can add some code to the modeler mbean to work
 around, but the solution won't work for other mbeans.
 
 What I want to do is find all attribute changes done via JMX and persist
 them - if you remember my old proposal. At the moment I'm not very sure
 it can be implemented. The only possible solution to revive it would be
 to force all attribute changes to go through a modeler-specific interface
 or to require the use of the modeler for all mbeans.
 
 Costin




--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 14568] New: - servlet.init() can't access JNDI DB resources

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14568.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14568

servlet.init() can't access JNDI DB resources

   Summary: servlet.init() can't access JNDI DB resources
   Product: Tomcat 4
   Version: 4.1.12
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: Major
  Priority: Other
 Component: Servlet  JSP API
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I just upgraded from Tomcat 4.0.3 to 4.1.12 and now my servlet.init() methods 
fail to access the JNDI DB resources.

Context initCtx = new InitialContext(); // Works fine
Context envCtx = (Context) initCtx.lookup(java:comp/env);  // Works fine
DataSource ds = (DataSource)envCtx.lookup(jdbc/mydatabase); // Fails here

The message I get in the log file is:
MyServlet: error loading data.javax.naming.NameNotFoundException: Name
jdbc is not bound in this Context

The lookup works fine if I call the servlet directly--the doGet() method uses 
the exact same call as the init() method.

It almost seems that the JNDI resources are defined after the servlet.init() 
methods are called.

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: ServletOutputStreamWrapper

2002-11-14 Thread Craig R. McClanahan


On 14 Nov 2002, Paul Hunnisett wrote:

 Date: 14 Nov 2002 20:05:07 +
 From: Paul Hunnisett [EMAIL PROTECTED]
 Reply-To: Tomcat Developers List [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Subject: Re: ServletOutputStreamWrapper

 Thanks Craig, I'll take a look at that - hope fully it'll help me to
 move forward.  I'm somewhat confused though - surely Tomcat must have
 subclasses of ServletInputStream and ServletOutputStream?

It certainly does, but they're not going to be of direct use to your own
application because they are intimately connected to the rest of the HTTP
connector implementation.

  What gets
 returned when an application call request.getInputStream() or
 response.getOutputStream?


For Tomcat 4.x (for example), you'll end up with an instance of the
internal class org.apache.coyote.tomcat4.Coyote{Input,Output}Stream.  The
sources are in the jakarta-tomcat-connectors repository, under coyote.

 Paul Hunnisett
 www.lombok.org.uk

Craig


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: JMX problems

2002-11-14 Thread Amy Roh
Costin,

Costin Manolache wrote:

Craig, Amy - or anyone who knows JMX, I need help :-)

I just can't find any way to add an attribute change listener
in the whole JMX spec, unless I have the instance of the model
mbean. And there is no way to get that instance.



I talked to Hans Hrasna in JMX team and I got the following answers.

It IS possible to manage all attribute changes via JMX and persist them 
using attribute change listener using the current spec.

It's up to the MBean owning the attribute of interest to create and send
attribute change notifications when the attribute change occurs. So the
NotificationBroadcaster interface has to be implemented by any MBean for 
which an attribute change is of interest.

Example: If an MBean called myMbean needs to notify registered listeners 
when its attribute:

 String myString

is modified, myMbean creates and emits the following notification:

 new AttributeChangeNotification(myMbean, sequenceNumber, timeStamp,
 msg, myString, String, oldValue, newValue);


One just adds a NotificationListener. AttributeChangeNotification is 
emitted just like any other notification.


All query and get methods in MBeanServer return ObjectInstance -
i.e. name and class, but no 'instance'. 

There is an 'addNotificationListener' that takes the object name -
but the spec ( and implementation ) doesn't allow this to register
attribute change listeners, and att changes are not sent to 
listeners registered with this method ( there is an all other but
attribute changes in the PDF file ).


NotificationListeners registered on an MBean will receive the
AttributeChangeNotifications just like any other notification. There is 
no such special type attribute change listeners.

Hope this helps.
Amy


I'm stuck. I can add some code to the modeler mbean to work 
around, but the solution won't work for other mbeans.

What I want to do is find all attribute changes done via JMX and persist 
them - if you remember my old proposal. At the moment I'm not very sure
it can be implemented. The only possible solution to revive it would be
to force all attribute changes to go through a modeler-specific interface
or to require the use of the modeler for all mbeans.

Costin



--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org





--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java

2002-11-14 Thread luehe
luehe   2002/11/14 14:22:38

  Modified:jasper2/src/share/org/apache/jasper/compiler
TagLibraryInfoImpl.java
  Log:
  Fixed 4779016 (bugtraq): Translation error doesn't occur if there are
  two functions with the same name.
  
  Revision  ChangesPath
  1.25  +21 -10
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- TagLibraryInfoImpl.java   13 Nov 2002 18:38:11 -  1.24
  +++ TagLibraryInfoImpl.java   14 Nov 2002 22:22:38 -  1.25
   -244,8 +244,8 
   {
   Vector tagVector = new Vector();
   Vector tagFileVector = new Vector();
  -Vector functionVector = new Vector();
  -
  +Hashtable functionTable = new Hashtable();
  + 
   // Create an iterator over the child elements of our taglib element
   ParserUtils pu = new ParserUtils();
   TreeNode tld = pu.parseXMLDocument(uri, in);
   -278,9 +278,16 
   else if (tag-file.equals(tname))
   tagFileVector.addElement(createTagFileInfo(element, uri,
   jarFile));
  -else if (function.equals(tname))  // JSP2.0
  -functionVector.addElement(createFunctionInfo(element));
  -else if (display-name.equals(tname) ||// Ignored elements
  +else if (function.equals(tname)) { // JSP2.0
  + FunctionInfo funcInfo = createFunctionInfo(element);
  + String funcName = funcInfo.getName();
  + if (functionTable.containsKey(funcName)) {
  + err.jspError(jsp.error.tld.fn.duplicate.name,
  +  funcName, uri);
  +
  + }
  +functionTable.put(funcName, funcInfo);
  +} else if (display-name.equals(tname) ||// Ignored elements
small-icon.equals(tname) ||
large-icon.equals(tname) ||
listener.equals(tname)) {
   -302,8 +309,12 
   this.tagFiles = new TagFileInfo[tagFileVector.size()];
   tagFileVector.copyInto (this.tagFiles);
   
  -this.functions = new FunctionInfo[functionVector.size()];
  -functionVector.copyInto (this.functions);
  +this.functions = new FunctionInfo[functionTable.size()];
  + int i=0;
  +Enumeration enum = functionTable.elements();
  + while (enum.hasMoreElements()) {
  + this.functions[i++] = (FunctionInfo) enum.nextElement();
  + }
   }
   
   private TagInfo createTagInfo(TreeNode elem) throws JasperException {
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: JMX problems

2002-11-14 Thread Costin Manolache
Thanks Amy !

That was my initial understanding.

The problem is that the ModelMBean implementation in JMX-RI and MX4J 
don't seem to behave this way, and the spec wording is ( page 84 in the
1.1 PDF ):
 
 In the model MBean, AttributeChangeNotifications are sent to a separate 
set of listeners than those that other notifications would go to. All other 
notifications should go to listeners who registered using the methods 
defined in the NotificationBroadcaster interface. 
AttributeChangeNotifications can also be sent to all notification listeners 
simply by using the NotificationBroadcaster interface alone.

Since we are using model mbeans, ACN are sent to the separate set, 
and all other notifications go to listeners registered using 
NotificationBrodacaster. That's the current behavior for JMX-RI, MX4J and 
modeler.

Is there any clarification of the spec - or another part that I overlooked? 

I understand that this particular restriction is only on model mbeans -
and it would be possible for regular mbeans to send attribute changes
to all listeners. So a possible solution would be to modify modeler
and make it a dynamic mbean ( or keep it model mbean but not implement
this separation ).

Costin



Amy Roh wrote:

 Costin,
 
 Costin Manolache wrote:
 Craig, Amy - or anyone who knows JMX, I need help :-)
 
 I just can't find any way to add an attribute change listener
 in the whole JMX spec, unless I have the instance of the model
 mbean. And there is no way to get that instance.
 
 
 I talked to Hans Hrasna in JMX team and I got the following answers.
 
 It IS possible to manage all attribute changes via JMX and persist them
 using attribute change listener using the current spec.
 
 It's up to the MBean owning the attribute of interest to create and send
 attribute change notifications when the attribute change occurs. So the
 NotificationBroadcaster interface has to be implemented by any MBean for
 which an attribute change is of interest.
 
 Example: If an MBean called myMbean needs to notify registered listeners
 when its attribute:
 
   String myString
 
 is modified, myMbean creates and emits the following notification:
 
   new AttributeChangeNotification(myMbean, sequenceNumber, timeStamp,
   msg, myString, String, oldValue, newValue);
 
 
 One just adds a NotificationListener. AttributeChangeNotification is
 emitted just like any other notification.
 
 
 All query and get methods in MBeanServer return ObjectInstance -
 i.e. name and class, but no 'instance'.
 
 There is an 'addNotificationListener' that takes the object name -
 but the spec ( and implementation ) doesn't allow this to register
 attribute change listeners, and att changes are not sent to
 listeners registered with this method ( there is an all other but
 attribute changes in the PDF file ).
 
 
 NotificationListeners registered on an MBean will receive the
 AttributeChangeNotifications just like any other notification. There is
 no such special type attribute change listeners.
 
 Hope this helps.
 Amy
 
 
 I'm stuck. I can add some code to the modeler mbean to work
 around, but the solution won't work for other mbeans.
 
 What I want to do is find all attribute changes done via JMX and persist
 them - if you remember my old proposal. At the moment I'm not very sure
 it can be implemented. The only possible solution to revive it would be
 to force all attribute changes to go through a modeler-specific interface
 or to require the use of the modeler for all mbeans.
 
 Costin
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional
 commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org





--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




DO NOT REPLY [Bug 14577] New: - comment mangles declaration

2002-11-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14577.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14577

comment mangles declaration

   Summary: comment mangles declaration
   Product: Tomcat 4
   Version: 4.1.12
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The double slash (//) comment inside a %! % declaration of a jsp leads to
additional %! % declarations being commented out.

Example:
This code in the jsp file:
%! //RowList p_info; %
%! RowList a_task; %
%! RowList o_task; %

produces this code in the .java file:
//RowList p_info;  RowList a_task;  RowList o_task;

Thus, the a_task and o_task variables are undefined in later uses, and the
code will not compile (excerpt):

Tomcat 4.0.4 and 3.2.1 did not exhibit this behavior.  Other than that, I
cannot say when this bug may have been introduced.

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Fwd: bug found and fixed in jasper in 4.x cvs

2002-11-14 Thread Donald Ball
Is anyone interested in my (or, indeed, any) patch for this bug? I hate to
have to maintain a locally bugfixed version of a (meritocratic?) open
source project.

- donald

*** BEGIN FORWARDED MESSAGE  ***

On 11/12/2002 at 3:51 PM Donald Ball [EMAIL PROTECTED] wrote:

I recently had the occasion to try and make jasper's JspC work for my
webapp. Unfortunately, it was did not work out of the box. Fortunately, I
was able to patch it to make it work. The problem is that my directory
structure looks something like this:

/WEB-INF/jsp/foo.jsp
/WEB-INF/jsp/foo/bar.jsp

JspC complained that foo was both a package name and a class name and that
that was not allowed (java.util.Map.Entry not withstanding, I guess). Note
that when catalina invokes jasper via the JspServlet, the class names are
mangled with a $jsp suffix, so this problem does not occur; no idea why
the algorithm is different when operating in JspC mode. In any case, I
patched JspC to tack on a $jsp suffix to the ctctxt class name (when one
has not been manually specified on the command line, that is). I'd be
happy
to submit a patch if someone can tell me the preferred mechanism these
days.

I also have a patch for JDBCRealm that generalizes it to allow the user to
specify arbitrary SQL queries for getting user and role data. I posted a
note about it a month or so ago to deafening silence, perhaps I'll have
better luck this time?

- donald


--
To unsubscribe, e-mail:  
mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-dev-help;jakarta.apache.org


*** END FORWARDED MESSAGE  ***


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator AuthenticatorBase.java

2002-11-14 Thread billbarker
billbarker2002/11/14 21:29:35

  Modified:catalina/src/share/org/apache/catalina/authenticator
AuthenticatorBase.java
  Log:
  Porting option to disable not allowing Proxies to cache content from the 5.0 branch.
  
  Revision  ChangesPath
  1.34  +28 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java
  
  Index: AuthenticatorBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- AuthenticatorBase.java15 Aug 2002 17:42:57 -  1.33
  +++ AuthenticatorBase.java15 Nov 2002 05:29:35 -  1.34
   -194,6 +194,11 
   protected static final String info =
   org.apache.catalina.authenticator.AuthenticatorBase/1.0;
   
  +/**
  + * Flag to determine if we disable proxy caching, or leave the issue
  + * up to the webapp developer.
  + */
  +protected boolean noProxyCaching = true;
   
   /**
* The lifecycle event support for this component.
   -388,6 +393,23 
   
   }
   
  +/**
  + * Return the flag that states if we add headers to disable caching by
  + * proxies.
  + */
  +public boolean getNoProxyCaching() {
  +return noProxyCaching;
  +}
  +
  +/**
  + * Set the value of the flag that states if we add headers to disable
  + * caching by proxies.
  + * param nocache codetrue/code if we add headers to disable proxy 
  + *  caching, codefalse/code if we leave the headers alone.
  + */
  +public void setNoProxyCaching(boolean nocache) {
  +noProxyCaching = nocache;
  +}
   
   // - Public Methods
   
   -476,7 +498,8 
   
   // Make sure that constrained resources are not cached by web proxies
   // or browsers as caching can provide a security hole
  -if (!(((HttpServletRequest) hrequest.getRequest()).isSecure())) {
  +if (noProxyCaching  
  +!(((HttpServletRequest) hrequest.getRequest()).isSecure())) {
   HttpServletResponse sresponse = 
   (HttpServletResponse) response.getResponse();
   sresponse.setHeader(Pragma, No-cache);
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt

2002-11-14 Thread billbarker
billbarker2002/11/14 21:49:28

  Modified:.RELEASE-NOTES-4.1.txt
  Log:
  Documenting new configuration option on the Authenticators.
  
  Also, some trivial formatting changes.
  
  Revision  ChangesPath
  1.32  +25 -20jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt
  
  Index: RELEASE-NOTES-4.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- RELEASE-NOTES-4.1.txt 13 Nov 2002 20:13:15 -  1.31
  +++ RELEASE-NOTES-4.1.txt 15 Nov 2002 05:49:28 -  1.32
   -64,36 +64,41 
   Catalina New Features:
   -
   
  -[4.1.3] Catalina:
  -Implement custom logger which can be used to capture System.out and
  -System.err to a buffer for later use.
  +[4.1.3]  Catalina:
  + Implement custom logger which can be used to capture System.out and
  + System.err to a buffer for later use.
   
  -[4.1.3] SSIServlet:
  -Complete rewrite of the SSI functionality (WARNING: servlet class name
  -has changed).
  +[4.1.3]  SSIServlet:
  + Complete rewrite of the SSI functionality (WARNING: servlet class name
  + has changed).
   
  -[4.1.3] CoyoteConnector:
  -Add PureTLS support.
  +[4.1.3]  CoyoteConnector:
  + Add PureTLS support.
   
  -[4.1.4] Embedded:
  -Add support for Coyote HTTP/1.1 and Coyote JK 2.
  +[4.1.4]  Embedded:
  + Add support for Coyote HTTP/1.1 and Coyote JK 2.
   
  -[4.1.4] DefaultContext:
  -Refactoring of DefaultContext to support dynamic configuration (naming
  -resources and other misc properties).
  +[4.1.4]  DefaultContext:
  + Refactoring of DefaultContext to support dynamic configuration (naming
  + resources and other misc properties).
   
  -[4.1.4] MBeanUtils:
  -Allow specifying custom MBean descriptor files.
  +[4.1.4]  MBeanUtils:
  + Allow specifying custom MBean descriptor files.
   
  -[4.1.5] ServerLifecycleListener:
  -Generate MBeans for the JNDI resources of the contexts.
  +[4.1.5]  ServerLifecycleListener:
  + Generate MBeans for the JNDI resources of the contexts.
   
  -[4.1.8] BootstrapService:
  -Allow passing parameters to the BootstrapService.
  +[4.1.8]  BootstrapService:
  + Allow passing parameters to the BootstrapService.
   
   [4.1.15] JNDIRealm:
Add support for SSL with the JNDIRealm.
   
  +[4.1.16] AuthenticatorBase:
  + Add a configuration option to disable setting the headers which 
  + prevent proxies from caching protected pages.  Using this option may
  + open security holes in your application, so it should only be used
  + if you are certain about what you are doing.
   
   ---
   Jasper New Features:
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Authenticator Documentation

2002-11-14 Thread Bill Barker
Browsing the documentation for 4.1.x, I couldn't find any information on how
to configure an Authenticator.  I know that is probably belongs on
tomcat-user :), and I know how it is done.  What I'm looking for is the page
(if any) to update.


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: Authenticator Documentation

2002-11-14 Thread Craig R. McClanahan


On Thu, 14 Nov 2002, Bill Barker wrote:

 Date: Thu, 14 Nov 2002 22:08:36 -0800
 From: Bill Barker [EMAIL PROTECTED]
 Reply-To: Tomcat Developers List [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Subject: Authenticator Documentation

 Browsing the documentation for 4.1.x, I couldn't find any information on how
 to configure an Authenticator.  I know that is probably belongs on
 tomcat-user :),

Because you're so diligent about answering TOMCAT-USER questions, we'll
forgive you this time :-)

 and I know how it is done.  What I'm looking for is the page
 (if any) to update.

During initialization of a new webapp, Catalina uses the value of the
login-method (which should be BASIC, DIGEST, FORM, or CLIENT-CERT) to
look up the name of the corresponding Authenticator (which is also a
Valve) class in the resource file
org/apache/catalina/startup/Authenticator.properties, instantiates an
instance, and adds it to the set of Valves to be used for the webapp being
initialized.  The Authenticator instances themselves don't have any
customizable properties -- they just implement the requirements of the
servlet spec.  Is there some specific customization that you would like to
be able to configure?

Are you instead interested in how to configure where Catalina looks for
users, passwords, and roles?  That's done by your selection of an
appropriate Realm instance, which is configured by inserting a Realm
element inside the Context.  If there is none, a webapp inherits the
Realm configured for the owning Host or Engine element -- in the
default configuration, there is one and only one Realm, configured at the
Engine level, and using the $CATALINA_HOME/conf/tomcat-users.xml file.
The admin app can dynamically update this for you, if you want.


Craig


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: Authenticator Documentation

2002-11-14 Thread Craig R. McClanahan


On Thu, 14 Nov 2002, Craig R. McClanahan wrote:

 During initialization of a new webapp, Catalina uses the value of the
 login-method (which should be BASIC, DIGEST, FORM, or CLIENT-CERT)

It probably would have been useful to say that the login-method is found
in the /WEB-INF/web.xml deployment descriptor of your webapp ...

Craig


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: Authenticator Documentation

2002-11-14 Thread Bill Barker

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 10:47 PM
Subject: Re: Authenticator Documentation




 On Thu, 14 Nov 2002, Bill Barker wrote:

  Date: Thu, 14 Nov 2002 22:08:36 -0800
  From: Bill Barker [EMAIL PROTECTED]
  Reply-To: Tomcat Developers List [EMAIL PROTECTED]
  To: Tomcat Developers List [EMAIL PROTECTED]
  Subject: Authenticator Documentation
 
  Browsing the documentation for 4.1.x, I couldn't find any information on
how
  to configure an Authenticator.  I know that is probably belongs on
  tomcat-user :),

 Because you're so diligent about answering TOMCAT-USER questions, we'll
 forgive you this time :-)

  and I know how it is done.  What I'm looking for is the page
  (if any) to update.

 During initialization of a new webapp, Catalina uses the value of the
 login-method (which should be BASIC, DIGEST, FORM, or CLIENT-CERT) to
 look up the name of the corresponding Authenticator (which is also a
 Valve) class in the resource file
 org/apache/catalina/startup/Authenticator.properties, instantiates an
 instance, and adds it to the set of Valves to be used for the webapp being
 initialized.  The Authenticator instances themselves don't have any
 customizable properties -- they just implement the requirements of the
 servlet spec.  Is there some specific customization that you would like to
 be able to configure?

This much I know.  I also know that if under a Context I do:
Valve className=org.apache.catalina.authenticator.FormAuthenticator
noProxyCaching=false debug=10 randomClass=my.Random /

than all of the above is skipped (and it is my fault if login-method !=
FORM :).

I just added the noProxyCaching attribute, and wanted to know is if there
is a page in the docs that I should change to document this (so I have less
questions to answer on tomcat-user :).


 Are you instead interested in how to configure where Catalina looks for
 users, passwords, and roles?  That's done by your selection of an
 appropriate Realm instance, which is configured by inserting a Realm
 element inside the Context.  If there is none, a webapp inherits the
 Realm configured for the owning Host or Engine element -- in the
 default configuration, there is one and only one Realm, configured at the
 Engine level, and using the $CATALINA_HOME/conf/tomcat-users.xml file.
 The admin app can dynamically update this for you, if you want.


 Craig


 --
 To unsubscribe, e-mail:
mailto:tomcat-dev-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:tomcat-dev-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: Authenticator Documentation

2002-11-14 Thread Craig R. McClanahan


On Thu, 14 Nov 2002, Bill Barker wrote:

 Date: Thu, 14 Nov 2002 23:18:54 -0800
 From: Bill Barker [EMAIL PROTECTED]
 Reply-To: Tomcat Developers List [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Subject: Re: Authenticator Documentation


 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Sent: Thursday, November 14, 2002 10:47 PM
 Subject: Re: Authenticator Documentation


 
 
  On Thu, 14 Nov 2002, Bill Barker wrote:
 
   Date: Thu, 14 Nov 2002 22:08:36 -0800
   From: Bill Barker [EMAIL PROTECTED]
   Reply-To: Tomcat Developers List [EMAIL PROTECTED]
   To: Tomcat Developers List [EMAIL PROTECTED]
   Subject: Authenticator Documentation
  
   Browsing the documentation for 4.1.x, I couldn't find any information on
 how
   to configure an Authenticator.  I know that is probably belongs on
   tomcat-user :),
 
  Because you're so diligent about answering TOMCAT-USER questions, we'll
  forgive you this time :-)
 
   and I know how it is done.  What I'm looking for is the page
   (if any) to update.
 
  During initialization of a new webapp, Catalina uses the value of the
  login-method (which should be BASIC, DIGEST, FORM, or CLIENT-CERT) to
  look up the name of the corresponding Authenticator (which is also a
  Valve) class in the resource file
  org/apache/catalina/startup/Authenticator.properties, instantiates an
  instance, and adds it to the set of Valves to be used for the webapp being
  initialized.  The Authenticator instances themselves don't have any
  customizable properties -- they just implement the requirements of the
  servlet spec.  Is there some specific customization that you would like to
  be able to configure?

 This much I know.  I also know that if under a Context I do:
 Valve className=org.apache.catalina.authenticator.FormAuthenticator
 noProxyCaching=false debug=10 randomClass=my.Random /

 than all of the above is skipped (and it is my fault if login-method !=
 FORM :).


Whaddya know ... a feature I forgot about :-).

Indeed, the initialization code has a special check that, if you've
already configured an Authenticator valve for this webapp, it will ignore
the login-method and just assume you know what you're doing.

 I just added the noProxyCaching attribute, and wanted to know is if there
 is a page in the docs that I should change to document this (so I have less
 questions to answer on tomcat-user :).

I feel your pain :-).

I don't think we have this documented at all right now.  It would probably
be worth adding a section on the page
webapps/tomcat-docs/config/valve.xml about the standard Authenticator
valves and the properties that they support.

By the way, doesn't noProxyCaching end up being a double negative?
Would it make more sense to call it disableProxyCaching or something
like that instead?

Craig


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




how to make the jbuilder-made project run well under Stand-alone Tomcat?

2002-11-14 Thread ¼Ì¶« Àî


Dear everybody:

Hi,Now I have developed a project(with servlet) in JBuilder7, and it 
run well in the embeded tomcat4.0.3 under JBuilder. But I want to know how 
to revise them to make them run well too under my stand-alone Tomcat.What 
should I do?

Your reply will be very appreciated!

   lee





_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org