DO NOT REPLY [Bug 3772] - can't choose jdk or jre at setup

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=3772

can't choose jdk or jre at setup

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 23:49 ---
NSIS 1.58 and up supports reading environment variables.
The installer has been updated to use this (it will use JAVA_HOME first, and if 
it is not found, will try the registry). The HEAD branch already has the 
changes, which will be ported to the 4.0 branch.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 3772] - can't choose jdk or jre at setup

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=3772

can't choose jdk or jre at setup

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|LATER   |



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 23:48 ---
Reopen before marking as fixed.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Jk and APR

2001-11-26 Thread GOMEZ Henri

>> I would even use APR to build mod_jk: APR of httpd-2.0 
>(installed or source)
>> otherwise the one given by --with-apr parameter with 
>configuring mod_jk :)

Ok, we should be carefull with apr, since I've got many
problems using it with mod_webapp when creating library
libwebapp. I wasn't able to use the libtool generated
by Apache 2.0 and could only with the system libtool.

The problem is that system libtool (1.3.4) on my Redhat 6.2
couldn't be used to create Apache 2.0 ???)

Nota also that APR stuff is today installed under apache2
subdir in general case but when trying to adhere to FHS,
it should be installed /usr/lib/ and /usr/include/apr.

APR is just more Apache 2.0 sub lib, it's really a vite 
new piece of code, used by Apache 2.0 but which will be 
very usefull for server developpers wanting portable 
code :) (end of publicity)

That's why we add --with-apr-lib and --with-apr-include

>I'll go ahead and create an APR directory. To keep things 
>simple and clear
>I'll not touch configure - build.xml will detect if 
>APR_INCLUDE/apr.h is
>present and compile the apr-dependent files.

Ok.

>The APR code will be entirely optional for now - when we are 
>comfortable
>and everything is tested we can deprecate the current platform-specific
>code ( or leave it in - it doesn't hurt and people who have any problem
>will have a fallback )

Excellent, we should give a way to user to fall back to OS calls if they
could find an APR installed

>> The actual makefiles logic is a bit too complex I think 
>there should be more
>> targets to remove the automaticly generated makefiles.
>
>Is there any reason we don't use GNU make ? This would allow many
>simplifications in the build files ( the VPATH is one clear 
>one, we could
>also simplify a lot by using the many functions available in gmake ).

A question for people with old make tool, no more a problem 
for Linux/xxBSD users. What about Solaris, AIX and HP/UX ?

>I would also like to have built.properties included in the 
>Makefile - it
>would allow a consistent mechanism of setting preferences ( 
>paths, etc )
>( i.e. consistent with tomcat and other jakarta projects ). 
>Not sure how
>difficult it would be, but when we switch to APR we'll have no 
>reason to
>use configure - everything is supposed to be portable !

Good

>> But is it is still necesary to keep native makefiles when we 
>have a new _nice_
>> tool?

Yes, jkant is a great piece of code but we should keep this 
functionnalities. Creating native code with java ant is really
new and many people will be desoriented.

It's >For a while, yes, it's better to have a smooth transition. And we
first
>need to make sure everyone is comfortable with a new build system.

Exact, and have jkant included in jakarta-ant :)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




FW: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/index.html

2001-11-26 Thread GOMEZ Henri

>-Original Message-
>From: James Bromberger [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, November 27, 2001 7:03 AM
>To: [EMAIL PROTECTED]
>Subject: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/index.html
>
>
>
>Hello,
>
>I think there is a documentation bug on:
>   http://jakarta.apache.org/tomcat/tomcat-3.3-doc/index.html
>
>This is the Tomcat 3.3 user documentation, and yet under the 
>"Using Tomcat" list item is another LI entitled "Tomcat and 
>SSL". The comment beside this is "using SSL with Tomcat 
>3.2...". Should this not be "3.3"? Is this document about 3.3, 
>or 3.2? My understanding was that this page was an index for 
>3.3 documentation.
>
>Hope this helps,
>
>Yours,
>   James Bromberger
>
>-- 
>  James Bromberger,
>  Senior Web/Systems Administrator, JDV
>  +61 8 9268 2909, +61 417 322 500
>  Fax: +61 8 9268 0200
>
>JDV - e-Commerce and Outsourcing Solutions for Financial Services
>http://www.jdv.com/
>
>Any securities recommendation contained in this document is 
>unsolicited general information only. Do not act on a 
>recommendation without first consulting your investment 
>advisor to determine whether the recommendation is appropriate 
>for your investment objectives, financial situation and 
>particular needs.
>JDV  believes that any information or advice (including any 
>securities recommendation) contained in this document is 
>accurate when issued. However, JDV does not warrant its 
>accuracy or reliability. JDV, its officers, agents and 
>employees exclude all liability whatsoever, in negligence or 
>otherwise, for any loss or damage relating to this document to 
>the full extent permitted by law.
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5005] - /a/b/c/nonexistent.jsp -> a file and directory chain created. attack risk

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5005

/a/b/c/nonexistent.jsp -> a file and directory chain created. attack risk

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 20:26 ---
The fix will appear in the next nightly Tomcat 3.3.1 build.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat RELEASE-NOTES-3.3.1.txt

2001-11-26 Thread larryi

larryi  01/11/26 20:09:00

  Modified:.RELEASE-NOTES-3.3.1.txt
  Log:
  Update for Bugzilla #5005 fix.
  
  Revision  ChangesPath
  1.6   +5 -1  jakarta-tomcat/RELEASE-NOTES-3.3.1.txt
  
  Index: RELEASE-NOTES-3.3.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat/RELEASE-NOTES-3.3.1.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RELEASE-NOTES-3.3.1.txt   2001/11/21 04:33:54 1.5
  +++ RELEASE-NOTES-3.3.1.txt   2001/11/27 04:09:00 1.6
  @@ -3,7 +3,7 @@
Release Notes
=
   
  -$Id: RELEASE-NOTES-3.3.1.txt,v 1.5 2001/11/21 04:33:54 billbarker Exp $
  +$Id: RELEASE-NOTES-3.3.1.txt,v 1.6 2001/11/27 04:09:00 larryi Exp $
   
   
   This document describes the changes that have been made since the
  @@ -70,6 +70,10 @@
   
   4948  Fix DependClassLoader to be a Java2 ClassLoader when running under
 a Java2 JVM.  
  +
  +5005 If requested JSP file doesn't exist, avoid creating work directories
  + and version file.
  +
   
   Configuration:
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2001-11-26 Thread larryi

larryi  01/11/26 20:04:12

  Modified:src/share/org/apache/jasper/compiler JasperMangler.java
  Log:
  Implement lazy evaluation for getJspFilePath() so safePath() is only called
  once.
  
  Revision  ChangesPath
  1.8   +5 -1  
jakarta-tomcat/src/share/org/apache/jasper/compiler/JasperMangler.java
  
  Index: JasperMangler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JasperMangler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JasperMangler.java2001/09/07 04:35:27 1.7
  +++ JasperMangler.java2001/11/27 04:04:12 1.8
  @@ -163,7 +163,10 @@
   }
   
   public String getJspFilePath() {
  - return FileUtil.safePath( docBase, jspFile);
  +// lazy evaluation of full path
  +if( jspFilePath == null )
  +jspFilePath=FileUtil.safePath( docBase, jspFile);
  +return jspFilePath;
   }
   
   private String fixInvalidChars(String className) {
  @@ -287,6 +290,7 @@
   // context-relative jsp path 
   // extracted from the  or the result of a *.jsp mapping
   private String jspFile; 
  +private String jspFilePath=null;
   // version of the compiled java file
   private int version;
   private String workDir;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5113] - tomcat4-manual-4.0.1-1 rpm missing files

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5113

tomcat4-manual-4.0.1-1 rpm missing files





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 20:16 ---
also i should add the not-so-humble comment :) that (since there is no tomcat4
user on the system) maybe a better and more standard place for these docs should
go under /usr/share/doc/tomcat4-4.0.1/HTML/ (?) anyway, just a thought..

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5113] New: - tomcat4-manual-4.0.1-1 rpm missing files

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5113

tomcat4-manual-4.0.1-1 rpm missing files

   Summary: tomcat4-manual-4.0.1-1 rpm missing files
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
   URL: http://jakarta.apache.org/builds/jakarta-tomcat-
4.0/release/v4.0.1/rpms/tomcat4-manual-4.0.1-
1.noarch.rpm
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


this rpm is missing files and directories, so that when you install it and open
up /home/httpd/html/manual/tomcat4/index.html in your browser, you will see that
the links to the Web Applications ("JSP Examples", "Servlet Examples", and
"WebDAV capabilities") are broken, as well as the link to Documentation ("Tomcat
Documentation").

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade JspInterceptor.java

2001-11-26 Thread larryi

larryi  01/11/26 19:54:36

  Modified:src/facade22/org/apache/tomcat/facade JspInterceptor.java
  Log:
  Verify JSP flie exists before attempting to compile.  Avoids unnecessarily
  creating work directories and version file.  Fix for Bugzilla #5005.
  
  Revision  ChangesPath
  1.31  +9 -0  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JspInterceptor.java   2001/11/07 13:38:36 1.30
  +++ JspInterceptor.java   2001/11/27 03:54:35 1.31
  @@ -606,6 +606,15 @@
return 0;
}
   
  +// If unsafe path or JSP file doesn't exist, return "not found"
  +// Avoids creating work directories for non-existent JSP files
  +String path=mangler.getJspFilePath();
  +if( path == null )
  +return 404;
  +File f = new File( path );
  +if( !f.exists() )
  +return 404;
  +
//  if( debug > 3) 
ctx.log( "Compiling: " + jspFile + " to " +
 mangler.getServletClassName());
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5112] New: - tomcat4 rpm missing doc files

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5112

tomcat4 rpm missing doc files

   Summary: tomcat4 rpm missing doc files
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
   URL: http://jakarta.apache.org/builds/jakarta-tomcat-
4.0/release/v4.0.1/rpms/tomcat4-4.0.1-1.noarch.rpm
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


the tomcat4 rpm is missing the file "RUNNING.txt" which is supposed to be in the
/usr/doc/tomcat4-4.0.1 directory.

(also, doesn't redhat like docs to be in /usr/share/doc, now, instead of
/usr/doc? just wondering..)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Changes to catalina.policy security constraints

2001-11-26 Thread Patrick Luby

Glenn,

I noticed that with your changes to catalina.policy, both the admin and
manager webapps throw the following exception. I know that you have set the
Jasper jars to AllPermissions, but apparently this isn't enough. Any ideas
what privileges are missing?

Thanks,

Patrick

java.security.AccessControlException: access denied
(java.lang.RuntimePermission
accessClassInPackage.org.apache.jasper.servlet)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at
java.security.AccessController.checkPermission(AccessController.java:399)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1501)
at java.lang.ClassLoader$1.run(ClassLoader.java:324)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:322)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:820)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3272)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3393)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at
org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:811)
at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:182)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:486)
at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:568)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:160)
at
org.apache.commons.digester.Digester.endElement(Digester.java:757)
at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1480)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1204)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.apache.commons.digester.Digester.parse(Digester.java:1206)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:378)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:709)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:365)
at org.apache.catalina.startup.HostConfig.run(HostConfig.java:634)
at java.lang.Thread.run(Thread.java:484)

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4212] - How to configure Apache to serve static contents?

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=4212

How to configure Apache to serve static contents?





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 19:58 ---
i too struggled with this for about an hour online and with local tomcat4 docs,
and gave up.

it might be nice if the fact that tomcat4 cannot *currently* be configured this
way were PROMINENTLY UP FRONT ON THE TOMCAT WEB SITE as a warning to those
admins like myself who wanted to upgrade from 3.x and use apache and tomcat
together this way.

if you multiply my efforts across all the web-admins currently using tomcat and
interested in upgrading to 4, i am sure this simple step would save the world
thousands of wasted hours of all trying to figure out whether this even works,
only to find out it doesn't (in a bugzilla bug listing).

thanks

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/conf catalina.policy

2001-11-26 Thread patrickl

patrickl01/11/26 18:47:26

  Modified:catalina/src/conf catalina.policy
  Log:
  Deleted extraneous '\n' characters that were causing the Solaris JVM to barf when 
parsing this file.
  
  Revision  ChangesPath
  1.18  +3 -5  jakarta-tomcat-4.0/catalina/src/conf/catalina.policy
  
  Index: catalina.policy
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/catalina.policy,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- catalina.policy   2001/11/25 21:05:47 1.17
  +++ catalina.policy   2001/11/27 02:47:26 1.18
  @@ -8,7 +8,7 @@
   //
   // * Read access to the document root directory
   //
  -// $Id: catalina.policy,v 1.17 2001/11/25 21:05:47 glenn Exp $
  +// $Id: catalina.policy,v 1.18 2001/11/27 02:47:26 patrickl Exp $
   // 
   
   
  @@ -82,13 +82,11 @@
   permission java.security.AllPermission;
   };
   
  -grant codeBase 
"jar:file:${catalina.home}/server/webapps/manager/WEB-INF/lib/jasper-compiler.jar!/
  --" {
  +grant codeBase 
"jar:file:${catalina.home}/server/webapps/manager/WEB-INF/lib/jasper-compiler.jar!/-" {
   permission java.security.AllPermission;
   };   
   
  -grant codeBase 
"jar:file:${catalina.home}/server/webapps/manager/WEB-INF/lib/jasper-runtime.jar!/-
  -" {
  +grant codeBase 
"jar:file:${catalina.home}/server/webapps/manager/WEB-INF/lib/jasper-runtime.jar!/-" {
   permission java.security.AllPermission;
   };
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin TomcatTreeBuilder.java SetUpTreeAction.java TreeControlTag.java TreeControlTestAction.java

2001-11-26 Thread patrickl

patrickl01/11/26 18:46:28

  Modified:webapps/admin/WEB-INF web.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
SetUpTreeAction.java TreeControlTag.java
TreeControlTestAction.java
  Added:   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
TomcatTreeBuilder.java
  Log:
  Initial implementation of the Tomcat tree of administration objects.
  Submitted by: Jazmin Jonson
  
  Revision  ChangesPath
  1.6   +4 -0  jakarta-tomcat-4.0/webapps/admin/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/web.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- web.xml   2001/11/21 01:10:09 1.5
  +++ web.xml   2001/11/27 02:46:28 1.6
  @@ -42,6 +42,10 @@
 validate
 true
   
  +
  +  treebuilders
  +  org.apache.webapp.admin.TomcatTreeBuilder
  +
   2
 
   
  
  
  
  1.2   +4 -4  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpTreeAction.java
  
  Index: SetUpTreeAction.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpTreeAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SetUpTreeAction.java  2001/11/21 01:10:09 1.1
  +++ SetUpTreeAction.java  2001/11/27 02:46:28 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpTreeAction.java,v
 1.1 2001/11/21 01:10:09 patrickl Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/11/21 01:10:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/SetUpTreeAction.java,v
 1.2 2001/11/27 02:46:28 patrickl Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/11/27 02:46:28 $
*
* 
*
  @@ -85,7 +85,7 @@
* for tree widget
*
* @author Jazmin Jonson
  - * @version $Revision: 1.1 $ $Date: 2001/11/21 01:10:09 $
  + * @version $Revision: 1.2 $ $Date: 2001/11/27 02:46:28 $
*/
   
   public class SetUpTreeAction extends Action {
  @@ -126,7 +126,7 @@
   TreeControl control = new TreeControl(root);
   ApplicationServlet servlet = (ApplicationServlet)getServlet();
   
  -// Wait for web.xml code to be hooked up
  +// Getting init parms from web.xml
   
   String treeBuildersStr  =
   (String)servlet.getServletConfig().getInitParameter(TREEBUILDER_KEY);
  
  
  
  1.4   +17 -6 
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java
  
  Index: TreeControlTag.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TreeControlTag.java   2001/11/18 01:40:37 1.3
  +++ TreeControlTag.java   2001/11/27 02:46:28 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v
 1.3 2001/11/18 01:40:37 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/11/18 01:40:37 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v
 1.4 2001/11/27 02:46:28 patrickl Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/11/27 02:46:28 $
*
* 
*
  @@ -64,6 +64,7 @@
   
   
   import java.io.IOException;
  +import java.net.URLEncoder;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.JspWriter;
  @@ -103,7 +104,7 @@
* FIXME - Internationalize the exception messages!
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/11/18 01:40:37 $
  + * @version $Revision: 1.4 $ $Date: 2001/11/27 02:46:28 $
*/
   
   public class TreeControlTag extends TagSupport {
  @@ -372,7 +373,15 @@
   }
   
   // Render the tree state image for this node
  -String action = replace(getAction(), "${name}", node.getName());
  +
  +// HACK to take into account special characters like = and &
  +// in the node name, could remove this code if encode URL
  +// and later request.getParameter() could deal with = and &
  +// character in parameter values. 
  +String encodedNodeName = URLEncoder.encode(node.getName());
  +
  +String action = replace(getAction(), "${name}", enco

[PATCH] jakarta-tomcat-4.0/webapps/admin

2001-11-26 Thread tangojaz

Below is the code to build the tree control nodes
for Tomcat Server, Service/Engine, and Connector
There is one new file: TomcatTreeBuilder.java
that goes in the following directory:

jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin 

The rest are cvs diffs of existing files

Jazmin

-- 




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/



TomcatTreeBuilder.java
Description: TomcatTreeBuilder.java


cvsdiff
Description: cvsdiff

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


DO NOT REPLY [Bug 5109] - TOMCAT 4.1 WSPack Embedded Version

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5109

TOMCAT 4.1 WSPack Embedded  Version

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 17:44 ---
Spec says nothing about what to do when doStartTag returns an invalid value. 
Jasper assumes that the tag handler returns a valid value for doStartTag, and
generates no code for the check.  To do the extra checks would degrade the
performance with no real benefit.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5110] - ErrorDispatcherValve throws NullPointerException on 403 forbidden!

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5110

ErrorDispatcherValve throws NullPointerException on 403 forbidden!

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 17:22 ---
That has been fixed already, and it occurred when using a sendError before the 
request mapping was complete.
The fix will be in 4.0.2, and is also in the nightly builds.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5098] - anonymous and internal classes not found

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5098

anonymous and internal classes not found





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 17:11 ---
I tried to create a test servlet to reproduce the problem. I added this to the 
servlet:

try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance
();
DocumentBuilder db = dbf.newDocumentBuilder();
db.setEntityResolver(new EntityResolver() {
public InputSource resolveEntity(String publicId, 
String systemId) {
if (systemId.indexOf("web-app_2_3.dtd") >= 0) {
return new InputSource("c:\\j2sdkee1.3
\\conf\\web-app_2_3.dtd");
} else {
return new InputSource(systemId);
}   
}
});

} catch (Throwable t) {
t.printStackTrace();
}

System.out.println("OK");

My servlet class is "S3". The compiler creates a "S3$1" class, which is then 
loaded by the CL (I added some traces to WebappClassLoader.findClassInternal):
FCI:S3$1
FCI:javax.xml.parsers.DocumentBuilder
OK

"OK" is printed, and no exception occurs, so it seems it does work for me.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native build.xml

2001-11-26 Thread costin

costin  01/11/26 16:51:16

  Modified:jk   build.properties.sample build.xml
   jk/native build.xml
  Log:
  Added new properties for apr.
  
  Make sure apr-related files are excluded if apr is not available. This will
  be enhanced as we go.
  
  Note that short-term we'll keep the non-APR files. Some features ( like use of
  shared memory or pipes for IPC, etc ) will not be available, but the basic
  AJP over TCP/IP will work in any case.
  
  As we start using APR we'll try to eliminate as much 'unportable' code as possible.
  When this is done, we can get rid of configure and use only a simpler build system
  ( configure is great for detecting system-specific details, but we'll have less
  need for that since APR provides the needed abstractions ).
  
  Revision  ChangesPath
  1.5   +10 -21jakarta-tomcat-connectors/jk/build.properties.sample
  
  Index: build.properties.sample
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.properties.sample,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.properties.sample   2001/11/08 19:30:31 1.4
  +++ build.properties.sample   2001/11/27 00:51:16 1.5
  @@ -2,31 +2,20 @@
   # sample build.properties for ajp connector.
   # edit to taste...
   #
  -# $Id: build.properties.sample,v 1.4 2001/11/08 19:30:31 costin Exp $
  +# $Id: build.properties.sample,v 1.5 2001/11/27 00:51:16 costin Exp $
   #
   
  -# Directory where catalina is installed
  +# Location of Apache2, Apache1.3, Netscape, IIS
  +apache2.home=/opt/apache2
  +apache13.home=/opt/apache13
  +
  +# APR location - by default the version included in Apache2 is used.
  +apr.include=${apache2.home}/include
  +apr.lib=${apache2.home}/lib
  +
  +# Directory where catalina is installed. 
   catalina.home=../../jakarta-tomcat-4.0/build
   
   # Directory where tomcat3.3 is installed
   tomcat33.home= ../../jakarta-tomcat/build/tomcat
   
  -#
  -# tomcat 4 internals
  -#
  -catalina.jar = ${catalina.home}/server/lib/catalina.jar
  -
  -#
  -# servlet api 2.3
  -#
  -servlet.jar = ${catalina.home}/common/lib/servlet.jar
  -
  -#
  -# utils.
  -#
  -tomcat-util.jar = ../util/build/lib/tomcat-util.jar
  -
  -#
  -# junit jar
  -#
  -junit.jar=f:/dev/junit/junit.jar
  
  
  
  1.15  +6 -2  jakarta-tomcat-connectors/jk/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- build.xml 2001/10/26 22:28:27 1.14
  +++ build.xml 2001/11/27 00:51:16 1.15
  @@ -93,6 +93,7 @@
   excludes="**/CVS/**">

   
  +


   
  @@ -154,17 +155,20 @@


  +
  +
  +
  +

   
   
  -
   
   
   


 
  +  
 
   
 
  @@ -32,12 +33,13 @@
   
 
   
  -  
  +  
 
   
 
   
  +
 
   
 
  @@ -56,6 +58,7 @@


   
  +
 
 

  @@ -159,6 +162,7 @@

   
  +
 
 

  @@ -238,6 +242,7 @@
   
   
  +
 
 
   
  @@ -281,6 +286,7 @@

   
  +
 
 

  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5110] New: - ErrorDispatcherValve throws NullPointerException on 403 forbidden!

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5110

ErrorDispatcherValve throws NullPointerException on 403 forbidden!

   Summary: ErrorDispatcherValve throws NullPointerException on 403
forbidden!
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


On Tomcat 4.0.1, I'm getting an Error 500 caused by the following exception
when I should get a 403 forbidden error-page.

The exception : 
2001-11-20 16:03:49 HttpProcessor[8080][4] process.invoke
java.lang.NullPointerException
at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.
java:291)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
at java.lang.Thread.run(Thread.java:484)

To produce this error...

1) I added  to
tomcat-users.xml.

2)I added the following to /examples/WEB-INF/web.xml (between servlet
mapping and taglib sections)

   
  403
  /examples/jsp/forbidden.jsp
   

3) I added the following /examples/jsp/forbidden.jsp file

forbidden!


4)I started Tomcat 4.0.1

5)I went to http://localhost:8080/examples/jsp/security/protected/index.jsp

6) I logged in as used junk with password junk1

7) I was sent to
http://localhost:8080/examples/jsp/security/protected/j_security_check
The file catalina_log.2001-11-20.txt contained the exception listed above
(NullPointerException).

8) I restarted tomcat, and logged in again as role1 (pwd tomcat) without
difficulty.

This was done on a default installation of Tomcat 4.0.1 on a Win2k box.
I originally discovered this error using JNDIRealm on a Solaris box.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5109] New: - TOMCAT 4.1 WSPack Embedded Version

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5109

TOMCAT 4.1 WSPack Embedded  Version

   Summary: TOMCAT 4.1 WSPack Embedded  Version
   Product: Tomcat 4
   Version: Nightly Build
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This is a problem with tag handlers :
If the doStartTag method of the tag handler returns a EVAL_BODY_AGAIN the
container should throw an exception.

The containers simply processes the body.

For more information on the test contact:
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5108] New: - Docs for Tomcat 3.2.x appear to be for Tomcat 3.3

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5108

Docs for Tomcat 3.2.x appear to be for Tomcat 3.3

   Summary: Docs for Tomcat 3.2.x appear to be for Tomcat 3.3
   Product: Tomcat 3
   Version: 3.2.3 Final
  Platform: All
   URL: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-
howto.html
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Config
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I was looking for docs on how to configure Ajp13 for Tomcat 3.2.4 at
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html#s82, but to my
surprise I found documentation for what appears to be Tomcat 3.3 instead.  The
Tomcat 3.2.3 and Tomcat 3.2.4 binary tar.gz builds both contain this same
(incorrect) documentatation.  I'm not sure what else is incorrect.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5105] - Tomcat can not automatically reload web apps if a context is defined in server.xml

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5105

Tomcat can not automatically reload web apps if a context is defined in server.xml

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 16:40 ---
The same situation works well for the "examples" context. Are you sure you did 
specify the reloadable attribute on the Context element ?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5107] New: - TOMCAT 4.1 : WSPack Embedded Version

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5107

TOMCAT 4.1 : WSPack Embedded Version

   Summary: TOMCAT 4.1 : WSPack Embedded Version
   Product: Tomcat 4
   Version: Nightly Build
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This is a problem with the XML View provided by the container for the
TagLibraryValidator .

If the JSP has a "import statement" i.e <%@ page import = ... %>
Then the XML view does not reflect this import statement. The statement itself
is missing

For more details contact : [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




readme for webapp connector update.

2001-11-26 Thread Timothy Stone

Pier, et.al.,

I just completed building the Tomcat 4.0.1 WARP connector.

I doing so I noted a problem with the README.txt (v1.15 in CVS) regarding 
the configure script.

Specifically, the detailed the command line options (switches) mentions 
the use of

--with-java[=JAVA_HOME] for compiling and jarring the Java portion 
(warp.jar) of the webapp connector.

When attempting this, I noted that the Java did not run as expected. My 
investigation took me into the bowels of the configure script. I found 
that the script is expecting "--enable-java".

This oversight should be corrected in the next iteration of the README.

Warmest Regards,
Tim


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5050] - Taglib prefix cannot contain '-' character

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5050

Taglib prefix cannot contain '-' character

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 15:58 ---
Fixed (nightly build 20011127)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagGeneratorBase.java

2001-11-26 Thread kinman

kinman  01/11/26 15:40:18

  Modified:jasper/src/share/org/apache/jasper/compiler Tag:
tomcat_40_branch TagGeneratorBase.java
  Log:
  PR: 5050
  
  -- Accept taglib prefixes containing "-".
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +8 -3  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java
  
  Index: TagGeneratorBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- TagGeneratorBase.java 2001/09/07 20:27:52 1.4
  +++ TagGeneratorBase.java 2001/11/26 23:40:18 1.4.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java,v
 1.4 2001/09/07 20:27:52 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/09/07 20:27:52 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java,v
 1.4.2.1 2001/11/26 23:40:18 kinman Exp $
  + * $Revision: 1.4.2.1 $
  + * $Date: 2001/11/26 23:40:18 $
*
* 
*
  @@ -145,6 +145,11 @@
* "$1", '.' with "$2", and ':' with "$3".
*/
   protected String getTagVarName(String prefix, String shortTagName) {
  + if (prefix.indexOf('-') >= 0)
  + prefix = substitute(prefix, '-', "$1");
  + if (prefix.indexOf('.') >= 0)
  + prefix = substitute(prefix, '.', "$2");
  +
   if (shortTagName.indexOf('-') >= 0)
   shortTagName = substitute(shortTagName, '-', "$1");
   if (shortTagName.indexOf('.') >= 0)
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagGeneratorBase.java

2001-11-26 Thread kinman

kinman  01/11/26 15:36:46

  Modified:jasper/src/share/org/apache/jasper/compiler
TagGeneratorBase.java
  Log:
  PR: 5050
  
  -- Accept taglib prefices containing "-".
  
  Revision  ChangesPath
  1.5   +8 -3  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java
  
  Index: TagGeneratorBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TagGeneratorBase.java 2001/09/07 20:27:52 1.4
  +++ TagGeneratorBase.java 2001/11/26 23:36:46 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java,v
 1.4 2001/09/07 20:27:52 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/09/07 20:27:52 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagGeneratorBase.java,v
 1.5 2001/11/26 23:36:46 kinman Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/11/26 23:36:46 $
*
* 
*
  @@ -145,6 +145,11 @@
* "$1", '.' with "$2", and ':' with "$3".
*/
   protected String getTagVarName(String prefix, String shortTagName) {
  +if (prefix.indexOf('-') >= 0)
  +prefix = substitute(prefix, '-', "$1");
  +if (prefix.indexOf('.') >= 0)
  +prefix = substitute(prefix, '.', "$2");
  +
   if (shortTagName.indexOf('-') >= 0)
   shortTagName = substitute(shortTagName, '-', "$1");
   if (shortTagName.indexOf('.') >= 0)
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 3.3 classloading & resources

2001-11-26 Thread costinm

The problem is that ResourceBundle is kindof broken. Like many other
java APIs ( JAXP, JNDI, URL, etc ), early versions are not capable
of using the application class loader.

This is ( IMHO ) a bug, and for some APIs it is fixed ( JAXP and JNDI for
sure, unfortunately not for URL ).

The solution - for JDK1.2+ - is to use the 3 parameter getBundle, with
Thread.currentThread().getContextClassLoader() as the third param.
For JDK1.1 there's nothing you can do.

Let me know if it doesn't work - I tried this before and I had no
problems.  The resources could be in WEB-INF/classes, a jar in
WEB-INF/lib or any jar in the app.classloader.


Costin


On Mon, 26 Nov 2001, Keith Wannamaker wrote:

> I think there may be a problem with resource loading in TC3.3.
> If I add a property file to the app class path by setting
> org.apache.tomcat.apps.classpath, then the call to
> ResourceBundle.getBundle("foo") doesn't find it.  Nor does
> it get located if I place the said property file in tomcat/lib/apps.
> In fact, the only way I have been able to find it is to
> override the classpath in the tomcat script.
>
> The good news is that, by setting org.apache.tomcat.apps.classpath,
> initClassLoaders() does set the AppsLoader class to a ClassLoader
> which contains my properties file.
>
> The bad news is this doesn't seem to be the deafult loader used
> in the call to ResourceBundle.getBundle("foo").
>
> The only thing I can think of trying is
> ResourceBundle.getBundle("foo", Locale.getDefault(),
>  magic.ContextManager.getAppsLoader());
> but that binds the code to the Tomcat container.
>
> My next step is to rebuild the jdk with debugging info to see which
> loader is actually being used in ResourceBundle.getBundle, but
> I appreciate any insight in the interim.
>
> Keith
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 4.0.1 ClassLoader breaks singletons on webapp reload.

2001-11-26 Thread Mika Goeckel

??

Don't understand that joke. EJB's are usually not singletons. An application
server may decide how many instances it creates in the case of stateless
session beans, so he may choose to only create one, but most commercial
servers (weblogic, websphere) adjust the number of beans according to the
traffic (concurrent sessions).

Could you clarify that?

Mika

- Original Message -
From: "Jon Stevens" <[EMAIL PROTECTED]>
To: "tomcat-dev" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 10:04 PM
Subject: Re: 4.0.1 ClassLoader breaks singletons on webapp reload.


> Yea, those are called EJB's. :-)
>
> EJB - The glorified Singleton.
>
> -jon
>
>
> on 11/26/01 6:05 AM, "Mika Goeckel" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > could you get around the singleton problem by placing the singleton
object's
> > class outside the classloader which get busted when reloading the
changed
> > servlets/jsps? You could move it up to the 'shared' or even 'common'
> > classspace. Do I understand it right, that these class loaders are not
being
> > destroyed when TC is running? I'm not so deep into that matter, maybe I
> > completely misunderstand something...
> >
> > Mika
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5105] New: - Tomcat can not automatically reload web apps if a context is defined in server.xml

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5105

Tomcat can not automatically reload web apps if a context is defined in server.xml

   Summary: Tomcat can not automatically reload web apps if a
context is defined in server.xml
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If a webapp has a context defined in server.xml, Tomcat can not reload it from 
the war file. The user has to delete the webapps, comment out the  
config and restart tomcat. Then, the user has to uncomment the  in 
server.xml and restart Tomcat again.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5104] New: - catalina.sh fails to start tomcat on Tru64

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5104

catalina.sh fails to start tomcat on Tru64

   Summary: catalina.sh fails to start tomcat on Tru64
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: Alpha
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Compaq Tru64 4.0F doesn't like catalina.sh.  Specifically, when I run either
startup.sh or shutdown.sh I see messages in catalina.out such as:

usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -debug
] [ -nonaming ] { start | stop }

This appears to be due to the use of "$@" to insert the command line arguments
in the java command line.

If I change "$@" to just $@ it appears to work properly then.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5004] - /a/b/c/nonexistent.jsp -> a file and directory chain created. attack risk

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5004

/a/b/c/nonexistent.jsp -> a file and directory chain created. attack risk

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 15:20 ---
Fixed with nightly build (20011127)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JspServlet.java

2001-11-26 Thread kinman

kinman  01/11/26 14:59:21

  Modified:jasper/src/share/org/apache/jasper/servlet Tag:
tomcat_40_branch JspServlet.java
  Log:
  PR: 5004
  
  -- Check the existence of the requested JSP page early, to avoid
 creating unncessary scratch directories or files.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.21.2.2  +5 -0  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.21.2.1
  retrieving revision 1.21.2.2
  diff -u -r1.21.2.1 -r1.21.2.2
  --- JspServlet.java   2001/10/03 22:00:34 1.21.2.1
  +++ JspServlet.java   2001/11/26 22:59:21 1.21.2.2
  @@ -513,6 +513,11 @@
boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) 
throws JasperException, FileNotFoundException 
   {
  + // First check if the requested JSP page exists, to avoid creating
  + // unnecessary directories and files.
  + if (context.getResourceAsStream(jspUri) == null)
  + throw new FileNotFoundException(jspUri);
  +
JspServletWrapper jsw=(JspServletWrapper) jsps.get(jspUri);
if( jsw==null ) {
throw new JasperException("Can't happen - JspServletWrapper=null");
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JspServlet.java

2001-11-26 Thread kinman

kinman  01/11/26 14:55:43

  Modified:jasper/src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  PR: 5004
  
  -- Check the existence of the requested JSP page early, to avoid
 creating unncessary scratch directories or files.
  
  Revision  ChangesPath
  1.23  +5 -0  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JspServlet.java   2001/10/03 21:48:30 1.22
  +++ JspServlet.java   2001/11/26 22:55:43 1.23
  @@ -513,6 +513,11 @@
boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) 
throws JasperException, FileNotFoundException 
   {
  + // First check if the requested JSP page exists, to avoid creating
  + // unnecessary directories and files.
  + if (context.getResourceAsStream(jspUri) == null)
  + throw new FileNotFoundException(jspUri);
  +
JspServletWrapper jsw=(JspServletWrapper) jsps.get(jspUri);
if( jsw==null ) {
throw new JasperException("Can't happen - JspServletWrapper=null");
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 3.3 classloading & resources

2001-11-26 Thread Michael Jennings

I could be being naive on this one, but I've always loaded property files
and
other resources by putting them in the
WEB-INF/classes directory of my class path, then doing something like:

InputStream istr=getClass().getResourceAsStream("/myprops.properties");
Properties props=new Properties();
props.load(istr);
istr.close();

You have to make sure that the above snippet of code is in a non-static
context
and inside of a class that is either in a jar file in the WEB-INF/lib
directory or in
the WEB-INF/classes directory.

I've tested the above approach in tomcat 3.2.x and in IBM WebSphere 3.5.4
and it has worked in both.

I hope this has helped.
-Mike

- Original Message -
From: "Keith Wannamaker" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 2:44 PM
Subject: 3.3 classloading & resources


> I think there may be a problem with resource loading in TC3.3.
> If I add a property file to the app class path by setting
> org.apache.tomcat.apps.classpath, then the call to
> ResourceBundle.getBundle("foo") doesn't find it.  Nor does
> it get located if I place the said property file in tomcat/lib/apps.
> In fact, the only way I have been able to find it is to
> override the classpath in the tomcat script.
>
> The good news is that, by setting org.apache.tomcat.apps.classpath,
> initClassLoaders() does set the AppsLoader class to a ClassLoader
> which contains my properties file.
>
> The bad news is this doesn't seem to be the deafult loader used
> in the call to ResourceBundle.getBundle("foo").
>
> The only thing I can think of trying is
> ResourceBundle.getBundle("foo", Locale.getDefault(),
>  magic.ContextManager.getAppsLoader());
> but that binds the code to the Tomcat container.
>
> My next step is to rebuild the jdk with debugging info to see which
> loader is actually being used in ResourceBundle.getBundle, but
> I appreciate any insight in the interim.
>
> Keith
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




3.3 classloading & resources

2001-11-26 Thread Keith Wannamaker

I think there may be a problem with resource loading in TC3.3.
If I add a property file to the app class path by setting 
org.apache.tomcat.apps.classpath, then the call to 
ResourceBundle.getBundle("foo") doesn't find it.  Nor does
it get located if I place the said property file in tomcat/lib/apps.
In fact, the only way I have been able to find it is to 
override the classpath in the tomcat script.

The good news is that, by setting org.apache.tomcat.apps.classpath,
initClassLoaders() does set the AppsLoader class to a ClassLoader 
which contains my properties file.

The bad news is this doesn't seem to be the deafult loader used
in the call to ResourceBundle.getBundle("foo").

The only thing I can think of trying is
ResourceBundle.getBundle("foo", Locale.getDefault(),
 magic.ContextManager.getAppsLoader());
but that binds the code to the Tomcat container.

My next step is to rebuild the jdk with debugging info to see which
loader is actually being used in ResourceBundle.getBundle, but
I appreciate any insight in the interim.

Keith


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_registry.c

2001-11-26 Thread costinm

On 26 Nov 2001 [EMAIL PROTECTED] wrote:
>   Added casts necessary to build for NetWare since the worker_factory
> functions currently being used don't match the prototype of the
> registerFactory method.  The MetroWerks compiler treats this as an error
> instead of just a warning.

Yes, I'll fix this soon.

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 4.0.1 ClassLoader breaks singletons on webapp reload.

2001-11-26 Thread Jon Stevens

Yea, those are called EJB's. :-)

EJB - The glorified Singleton.

-jon


on 11/26/01 6:05 AM, "Mika Goeckel" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> could you get around the singleton problem by placing the singleton object's
> class outside the classloader which get busted when reloading the changed
> servlets/jsps? You could move it up to the 'shared' or even 'common'
> classspace. Do I understand it right, that these class loaders are not being
> destroyed when TC is running? I'm not so deep into that matter, maybe I
> completely misunderstand something...
> 
> Mika


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Triple initialization of Catalina/mod_webapp

2001-11-26 Thread Daniel Rall

Recently found a symlink which would explain this unexpected
behavior.  :-\

Daniel Rall <[EMAIL PROTECTED]> writes:

> This is a followup to a message I posted to the user list which
> describes some undesirable behavior of Tomcat 4.0.1 (unrelated to use
> of mod_webapp).
>
> My application's build process currently generates the deployment
> descriptor for my web app from many files which contain snippets of
> the final web.xml.  After generation of the deployment descriptor (as
> $SRC_DIR/conf/web.xml), it is then copied into the appropriate sub
> directory of my webapps tree.  At this point, I should be able to
> launch Catalina (using a $CATALINA_BASE of $SRC_DIR/site and
> $CATALINA_HOME of /usr/share/tomcat4).  However, the file
> $SRC_DIR/conf/web.xml is read in before
> $CATALINA_BASE/webapps/myapp/WEB-INF/web.xml.  Since both these files
> contain the same content, my web app is initialized multiple times.
>
> That the conf/web.xml relative to my current working directory is used
> at all at seems like undesirable behavior to me.  If a conf/web.xml
> file is going to be looked for at all, at the very least it could be
> looked for relative to $CATALINA_BASE.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5098] New: - anonymous and internal classes not found

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5098

anonymous and internal classes not found

   Summary: anonymous and internal classes not found
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Internal and anonymous classes cannot be found.
This code compiles but cannot run:

<%!

class MyEntityResolver implements EntityResolver {
public InputSource resolveEntity(String publicId, String systemId) {
if (systemId.indexOf("web-app_2_3.dtd") >= 0) {
return new 
InputSource("c:\\j2sdkee1.3\\conf\\web-app_2_3.dtd");
} else {
return new InputSource(systemId);
}
}
}
//private MyEntityResolver _entityResolver = new MyEntityResolver();
private DocumentBuilderFactory _xmlFactory = 
DocumentBuilderFactory.newInstance();
public void init() {
}
%>

So does this:

  db.setEntityResolver(new EntityResolver() {
 public InputSource resolveEntity(String publicId, String systemId) {
if (systemId.indexOf("web-app_2_3.dtd") >= 0) {
   return new InputSource("c:\\j2sdkee1.3\\conf\\web-app_2_3.dtd");
} else {
   return new InputSource(systemId);
}   
 }
   });

The class cannot be found.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4915] - Relocation error while loading mod_jk when starting apache.

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=4915

Relocation error while loading mod_jk when starting apache.





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 12:11 ---
If you include -lposix4 in the apxs command line, then the error for fdatasync 
should go away.  However, I am guessing that it will just be replaced by the 
snprintf error.  Since this function isn't available on Solaris 2.5, probably 
your best option is to modify mod_jk/common/jk_util.c to act like it does for 
NETWARE (e.g. "#define NETWARE" after the #includes).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/netscape Makefile.nw

2001-11-26 Thread mmanders

mmanders01/11/26 11:38:44

  Removed: jk/native/netscape Makefile.nw
  Log:
  Removed since NetWare connectors can now be build using jkant.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native build.xml

2001-11-26 Thread mmanders

mmanders01/11/26 11:37:58

  Modified:jk/native build.xml
  Log:
  Updated to build NetWare modules correctly.
  
  Revision  ChangesPath
  1.20  +9 -3  jakarta-tomcat-connectors/jk/native/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/build.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- build.xml 2001/11/21 00:05:23 1.19
  +++ build.xml 2001/11/26 19:37:58 1.20
  @@ -54,10 +54,12 @@



  + 
   
 
 

  + 


   
  @@ -87,7 +89,7 @@
 
 
 
  -  
  +  
 
 
 
  @@ -267,8 +269,9 @@
 
   
 
  +
   
  @@ -318,7 +321,8 @@
 
 
 
  -  
 
 
  @@ -356,9 +360,11 @@



  + 



  + 


 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_registry.c

2001-11-26 Thread mmanders

mmanders01/11/26 11:36:15

  Modified:jk/native/common jk_registry.c
  Log:
  Added casts necessary to build for NetWare since the worker_factory functions 
currently being used don't match the prototype of the registerFactory method.  The 
MetroWerks compiler treats this as an error instead of just a warning.
  
  Revision  ChangesPath
  1.9   +12 -6 jakarta-tomcat-connectors/jk/native/common/jk_registry.c
  
  Index: jk_registry.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_registry.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_registry.c 2001/11/26 17:08:17 1.8
  +++ jk_registry.c 2001/11/26 19:36:15 1.9
  @@ -62,7 +62,7 @@
   
   /***
* Description: Worker list*
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -129,14 +129,20 @@
   printf("jk_registry_init: Assertion failed, env==NULL\n" );
   return;
 }
  +  /**
  +   * Because the functions being referenced here (apjp14_work_factory, and
  +   * lb_worker_factory) don't match the prototype declared for registerFactory,
  +   * and because the MetroWerks compiler (used for NetWare) treats this as an
  +   * error, I'm casting the function pointers to (void *) - mmanders
  +   */
   #ifdef AJP12
  -  env->registerFactory( env, "worker", "ajp12", &ajp12_worker_factory );
  +  env->registerFactory( env, "worker", "ajp12", (void *) &ajp12_worker_factory );
   #endif
  -  env->registerFactory( env, "worker", "ajp13", &ajp14_worker_factory );
  -  env->registerFactory( env, "worker", "ajp14", &ajp14_worker_factory );
  -  env->registerFactory( env, "worker", "lb",&lb_worker_factory );
  +  env->registerFactory( env, "worker", "ajp13", (void *) &ajp14_worker_factory );
  +  env->registerFactory( env, "worker", "ajp14", (void *) &ajp14_worker_factory );
  +  env->registerFactory( env, "worker", "lb",(void *) &lb_worker_factory );
   #ifdef HAVE_JNI
  -  env->registerFactory( env, "worker", "jni",   &jni_worker_factory );
  +  env->registerFactory( env, "worker", "jni",   (void *) &jni_worker_factory );
   #endif
   
 env->registerFactory( env, "channel", "socket", &jk_channel_socket_factory );
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_handler_logon.c

2001-11-26 Thread mmanders

mmanders01/11/26 11:34:40

  Modified:jk/native/common jk_handler_logon.c
  Log:
  Added include of jk_md5.h so that the jk_md5 function is prototyped correctly.
  
  Revision  ChangesPath
  1.2   +2 -1  jakarta-tomcat-connectors/jk/native/common/jk_handler_logon.c
  
  Index: jk_handler_logon.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_handler_logon.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_handler_logon.c2001/11/26 17:03:25 1.1
  +++ jk_handler_logon.c2001/11/26 19:34:40 1.2
  @@ -58,7 +58,7 @@
   /**
* Description: AJP14 Login handler
* Author:  Henri Gomez <[EMAIL PROTECTED]>
  - * Version: $Revision: 1.1 $  
  + * Version: $Revision: 1.2 $  
*/
   
   #include "jk_global.h"
  @@ -68,6 +68,7 @@
   #include "jk_msg_buff.h"
   #include "jk_ajp_common.h"
   #include "jk_ajp14.h" 
  +#include "jk_md5.h"
   #include "jk_logger.h"
   #include "jk_service.h"
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_global.h

2001-11-26 Thread mmanders

mmanders01/11/26 11:34:00

  Modified:jk/native/common jk_global.h
  Log:
  Removed some of the NetWare specific defines that only related to apache source 
files.
  
  Revision  ChangesPath
  1.15  +1 -10 jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_global.h   2001/11/26 17:20:11 1.14
  +++ jk_global.h   2001/11/26 19:34:00 1.15
  @@ -59,20 +59,11 @@
* Description: Global definitions and include files that should exist *
*  anywhere   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.14 $   *
  + * Version: $Revision: 1.15 $   *
***/
   
   #ifndef JK_GLOBAL_H
   #define JK_GLOBAL_H
  -
  -#ifdef NETWARE
  -#define _SYS_TYPES_H_
  -#define _NETDB_H_INCLUDED
  -#define _IN_
  -#define _INET_
  -#define _SYS_TIMEVAL_H_
  -#define _SYS_SOCKET_H_
  -#endif
   
   #include "jk_version.h"
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2001-11-26 Thread mmanders

mmanders01/11/26 11:32:45

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Added NetWare specific defines back into this file since they are ONLY related to 
this file (because of Winsock used to build this module).
  
  Revision  ChangesPath
  1.22  +14 -1 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_jk.c  2001/11/21 00:09:22 1.21
  +++ mod_jk.c  2001/11/26 19:32:45 1.22
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
*  Dan Milstein <[EMAIL PROTECTED]>*
*  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.21 $   *
  + * Version: $Revision: 1.22 $   *
***/
   
   /*
  @@ -79,6 +79,19 @@
   #include "util_script.h"
   #include "util_date.h"
   #include "http_conf_globals.h"
  +
  +/*
  + * These defines are specific to this file and need to remain here for the
  + * NetWare connector.
  + */
  +#ifdef NETWARE
  +#define _SYS_TYPES_H_
  +#define _NETDB_H_INCLUDED
  +#define _IN_
  +#define _INET_
  +#define _SYS_TIMEVAL_H_
  +#define _SYS_SOCKET_H_
  +#endif
   
   /*
* Jakarta (jk_) include files
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 Makefile.nw

2001-11-26 Thread mmanders

mmanders01/11/26 11:31:12

  Removed: jk/native/apache-1.3 Makefile.nw
  Log:
  Removed since NetWare connectors can now be build using jkant.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/jni Makefile.nw

2001-11-26 Thread mmanders

mmanders01/11/26 11:30:56

  Removed: jk/native/jni Makefile.nw
  Log:
  Removed since NetWare connectors can now be build using jkant.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5096] New: - PageData.getInputStream() returns XML doc with invalid encoding

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5096

PageData.getInputStream() returns XML doc with invalid encoding

   Summary: PageData.getInputStream() returns XML doc with invalid
encoding
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The XML View of a JSP page is an XML document without an encoding declaration.
According to the XML spec, such a document must use UTF-8 encoding, but the 
PageData implementation in Jasper returns a stream with the platform's
default encoding instead.

The error can be fixed in the org.apache.jasper.compiler.XmlOutputter class,
by hardcoding UTF-8 in the getPageData() method:

PageData getPageData() {
StringBuffer buff = new StringBuffer();
AttributesImpl attrs = new AttributesImpl();

append("jsp:root", rootAttrs, buff, false);
buff.append(sb.toString());
buff.append("");
// Current code:
//InputStream is = new byteArrayInputStream(buff.toString().getBytes());
InputStream is = null;
try {
is = new ByteArrayInputStream(buff.toString().getBytes("UTF-8"));
}
catch (java.io.UnsupportedEncodingException e) {
// Can never happen? I assume all platforms support UTF-8
}
//System.out.println("XmlOutputter: \n" + buff);
PageData pageData = new PageDataImpl(is);
return pageData;
}

Without this patch, a the TagLibraryValidator used in the Jakarta Taglibs
"standard" library (i.e. the JSTL RI, EA2) throws a SaxParseException if
the page contains European national characters (e.g. å, ä, ö):

  Character conversion error: "Malformed UTF-8 char -- is an XML encoding 
  declaration missing?" (line number may be too low).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_global.h

2001-11-26 Thread costin

costin  01/11/26 09:20:11

  Modified:jk/native/common jk_global.h
  Log:
  This was duplicated in several files.
  
  Revision  ChangesPath
  1.14  +8 -1  jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_global.h   2001/11/21 00:09:21 1.13
  +++ jk_global.h   2001/11/26 17:20:11 1.14
  @@ -59,7 +59,7 @@
* Description: Global definitions and include files that should exist *
*  anywhere   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.13 $   *
  + * Version: $Revision: 1.14 $   *
***/
   
   #ifndef JK_GLOBAL_H
  @@ -111,6 +111,13 @@
   #include 
   #include 
   #endif
  +
  +#ifdef WIN32
  +/* define snprint to match windows version */
  +#define snprintf _snprintf
  +#endif
  +
  +
   
   #ifdef __cplusplus
   extern "C" {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp14.h

2001-11-26 Thread costin

costin  01/11/26 09:19:16

  Modified:jk/native/common jk_ajp14.h
  Log:
  Just indentation, getting everything bellow 80 chars lines.
  
  ( it seems some 4-space tabs got in, I've set my emacs to use only spaces, I hope 
this
  will solve the problem )
  
  Revision  ChangesPath
  1.8   +83 -138   jakarta-tomcat-connectors/jk/native/common/jk_ajp14.h
  
  Index: jk_ajp14.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_ajp14.h2001/11/20 16:58:46 1.7
  +++ jk_ajp14.h2001/11/26 17:19:16 1.8
  @@ -58,7 +58,7 @@
   /***
* Description: Next generation bi-directional protocol handler.   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   #ifndef JK_AJP14_H
   #define JK_AJP14_H
  @@ -72,77 +72,54 @@
   
   #define AJP14_PROTO  14
   
  -#define AJP14_DEF_HOST   ("localhost")
  -#define AJP14_DEF_PORT   (8011)
  -#define AJP14_READ_BUF_SIZE (8*1024)
  -#define AJP14_DEF_RETRY_ATTEMPTS(1)
  -#define AJP14_DEF_CACHE_SZ   (1)
  -#define AJP14_MAX_SEND_BODY_SZ   (DEF_BUFFER_SZ - 6)
  -#define AJP14_HEADER_LEN (4)
  -#define AJP14_HEADER_SZ_LEN  (2)
  +#define AJP14_DEF_HOST   ("localhost")
  +#define AJP14_DEF_PORT   (8011)
  +#define AJP14_READ_BUF_SIZEd(8*1024)
  +#define AJP14_DEF_RETRY_ATTEMPTS  (1)
  +#define AJP14_DEF_CACHE_SZ  (1)
  +#define AJP14_MAX_SEND_BODY_SZ  (DEF_BUFFER_SZ - 6)
  +#define AJP14_HEADER_LEN (4)
  +#define AJP14_HEADER_SZ_LEN  (2)
   
   /*
  - * Initial Login Phase (web server -> servlet engine)
  - */
  -#define AJP14_LOGINIT_CMD(unsigned char)0x10
  -
  -/*
  - * Second Login Phase (servlet engine -> web server), md5 seed is received
  - */
  -#define AJP14_LOGSEED_CMD(unsigned char)0x11
  -
  -/*
  - * Third Login Phase (web server -> servlet engine), md5 of seed + secret is sent
  - */
  -#define AJP14_LOGCOMP_CMD(unsigned char)0x12
  -
  -/*
  - * Login Accepted (servlet engine -> web server)
  - */
  -#define AJP14_LOGOK_CMD  (unsigned char)0x13
  -
  -/*
  - * Login Rejected (servlet engine -> web server), will be logged
  - */
  -#define AJP14_LOGNOK_CMD (unsigned char)0x14
  -
  -/*
* Context Query (web server -> servlet engine), which URI are handled by servlet 
engine ?
*/
  -#define AJP14_CONTEXT_QRY_CMD(unsigned char)0x15
  +#define AJP14_CONTEXT_QRY_CMD(unsigned char)0x15
   
   /*
* Context Info (servlet engine -> web server), URI handled response
*/
  -#define AJP14_CONTEXT_INFO_CMD   (unsigned char)0x16
  +#define AJP14_CONTEXT_INFO_CMD   (unsigned char)0x16
   
   /* 
* Context Update (servlet engine -> web server), status of context changed
*/
  -#define AJP14_CONTEXT_UPDATE_CMD (unsigned char)0x17
  +#define AJP14_CONTEXT_UPDATE_CMD (unsigned char)0x17
   
   /*
* Servlet Engine Status (web server -> servlet engine), what's the status of the 
servlet engine ?
*/
  -#define AJP14_STATUS_CMD (unsigned char)0x18
  +#define AJP14_STATUS_CMD (unsigned char)0x18
   
   /*
  - * Secure Shutdown command (web server -> servlet engine), please servlet stop 
yourself.
  + * Secure Shutdown command (web server -> servlet engine),
  + * please servlet stop yourself.
*/
  -#define AJP14_SHUTDOWN_CMD   (unsigned char)0x19
  +#define AJP14_SHUTDOWN_CMD   (unsigned char)0x19
   
   /*
* Secure Shutdown command Accepted (servlet engine -> web server)
*/
  -#define AJP14_SHUTOK_CMD (unsigned char)0x1A
  +#define AJP14_SHUTOK_CMD (unsigned char)0x1A
   
   /*
* Secure Shutdown Rejected (servlet engine -> web server)
*/
  -#define AJP14_SHUTNOK_CMD(unsigned char)0x1B
  +#define AJP14_SHUTNOK_CMD(unsigned char)0x1B
   
   /*
  - * Context Status (web server -> servlet engine), what's the status of the context ?
  + * Context Status (web server -> servlet engine), what's
  + * the status of the context ?
*/
   #define AJP14_CONTEXT_STATE_CMD  (unsigned char)0x1C
   
  @@ -152,7 +129,8 @@
   #define AJP14_CONTEXT_STATE_REP_CMD  (unsigned char)0x1D
   
   /*
  - * Unknown Packet Reply (web server <-> servlet engine), when a packet couldn't be 
decoded
  + * Unknown Packet Reply (we

cvs commit: jakarta-tomcat-connectors/jk/native/common jk_msg.h

2001-11-26 Thread costin

costin  01/11/26 09:16:52

  Added:   jk/native/common jk_msg.h
  Log:
  Initial code to abstract the marshalling. Not used, checked in just to get feedback.
  
  This will be used to add more protocols ( like WARP ) and to allow the handlers
  ( login, config/discovery, etc ) to be used with multiple protocols with no change.
  
  Note that JNI will eventually use the same codebase for handlers - passing parameters
  to JNI can be done with the same abstraction ( create a message will get an
  jobject[]. each appendXXX() will set an array component )
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native/common/jk_msg.h
  
  Index: jk_msg.h
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of conditions and the following disclaimer.  *
   *   *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *notice,  this list of conditions  and the following  disclaimer in the *
   *documentation and/or other materials provided with the distribution.   *
   *   *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *must include the following acknowlegement: *
   *   *
   *   "This product includes  software developed  by the Apache  Software *
   *Foundation ."  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  "The  Jakarta  Project",  "Jk",  and  "Apache  Software *
   *Foundation"  must not be used  to endorse or promote  products derived *
   *from this  software without  prior  written  permission.  For  written *
   *permission, please contact <[EMAIL PROTECTED]>.*
   *   *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *"Apache" appear in their names without prior written permission of the *
   *Apache Software Foundation.*
   *   *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.   *
   *   *
   * = *
   *   *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of

cvs commit: jakarta-tomcat-connectors/jk/native/common/apr - New directory

2001-11-26 Thread costin

costin  01/11/26 09:14:00

  jakarta-tomcat-connectors/jk/native/common/apr - New directory

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 Makefile.linux

2001-11-26 Thread costin

costin  01/11/26 09:13:27

  Removed: jk/native/apache-2.0 Makefile.linux
  Log:
  Removed the linux makefile, it is no longer needed ( configure or ant work fine )

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_map.c jk_map.h

2001-11-26 Thread costin

costin  01/11/26 09:12:38

  Modified:jk/native/common jk_map.c jk_map.h
  Log:
  Moved ( with small modifications ) the code from jk_util that gets properties.
  
  Revision  ChangesPath
  1.8   +44 -1 jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_map.c  2001/10/30 21:08:39 1.7
  +++ jk_map.c  2001/11/26 17:12:38 1.8
  @@ -58,7 +58,7 @@
   /***
* Description: General purpose map object *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   
   #include "jk_global.h"
  @@ -481,5 +481,48 @@
   }
   
   return rc;
  +}
  +
  +
  +/** Get a string property, using the worker's style
  +for properties.
  +Example worker.ajp13.host=localhost.
  +*/
  +char *map_getStrProp(jk_map_t *m,
  + char *objType,
  + char *objName,
  + char *pname,
  + char *def)
  +{
  +char buf[1024];
  +
  +if( m==NULL ||
  +objType==NULL ||
  +objName==NULL ||
  +pname==NULL ) {
  +return def;
  +}
  +
  +sprintf(buf, "%s.%s.%s", objType, objName, pname);
  +return map_get_string(m, buf, NULL);
  +}
  +
  +int map_getIntProp(jk_map_t *m,
  +   char *objType,
  +   char *objName,
  +   char *pname,
  +   int def)
  +{
  +char buf[1024];
  +
  +if( m==NULL ||
  +objType==NULL ||
  +objName==NULL ||
  +pname==NULL ) {
  +return def;
  +}
  +
  +sprintf(buf, "%s.%s.%s", objType, objName, pname);
  +return map_get_int(m, buf, def);
   }
   
  
  
  
  1.5   +17 -1 jakarta-tomcat-connectors/jk/native/common/jk_map.h
  
  Index: jk_map.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_map.h  2001/10/30 21:08:39 1.4
  +++ jk_map.h  2001/11/26 17:12:38 1.5
  @@ -58,7 +58,7 @@
   /***
* Description: Map object header file *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   #ifndef JK_MAP_H
  @@ -124,7 +124,23 @@
*/
   char *map_replace_properties(const char *value, jk_map_t *m);
   
  +/** Get a string property, using the worker's style
  +for properties.
  +Example worker.ajp13.host=localhost.
  +*/
  +char *map_getStrProp(jk_map_t *m,
  + char *objType,
  + char *objName,
  + char *pname,
  + char *def);
  +
  +int map_getIntProp(jk_map_t *m,
  +   char *objType,
  +   char *objName,
  +   char *pname,
  +   int def);
   
  +
   #ifdef __cplusplus
   }
   #endif /* __cplusplus */
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_logger.c jk_util.c

2001-11-26 Thread costin

costin  01/11/26 09:11:40

  Modified:jk/native/common jk_util.c
  Added:   jk/native/common jk_logger.c
  Log:
  A simple code move, the jk_logger.c/jk_logger.h are implementing the logging ( 
instead of
  having the logging code in jk_util.c ).
  
  As indicated by comments in jk_util, most of the code there can be replaced with
  direct calls to jk_map ( I'm talking about the code that gets/sets ajp properties ).
  Long term I expect jk_util to disapear, and all code to go in the right classes.
  
  Revision  ChangesPath
  1.10  +1 -197jakarta-tomcat-connectors/jk/native/common/jk_util.c
  
  Index: jk_util.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_util.c 2001/11/07 21:40:59 1.9
  +++ jk_util.c 2001/11/26 17:11:40 1.10
  @@ -59,7 +59,7 @@
* Description: Utility functions (mainly configuration)   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.9 $   *
  + * Version: $Revision: 1.10 $   *
***/
   
   
  @@ -89,186 +89,7 @@
   #define DEFAULT_WORKER  ("ajp13")
   #define WORKER_LIST_PROPERTY_NAME   ("worker.list")
   #define DEFAULT_LB_FACTOR   (1.0)
  -#define LOG_FORMAT   ("log_format")
   
  -#define HUGE_BUFFER_SIZE (8*1024)
  -#define LOG_LINE_SIZE(1024)
  -
  -struct file_logger {
  -FILE *logfile;
  -};
  -typedef struct file_logger file_logger_t;
  -
  -/* 
  - * define the log format, we're using by default the one from error.log 
  - *
  - * [Mon Mar 26 19:44:48 2001] [jk_uri_worker_map.c (155)]: Into 
jk_uri_worker_map_t::uri_worker_map_alloc
  - * log format used by apache in error.log
  - */
  -#ifndef JK_TIME_FORMAT 
  -#define JK_TIME_FORMAT "[%a %b %d %H:%M:%S %Y] "
  -#endif
  -
  -const char * jk_log_fmt = JK_TIME_FORMAT;
  -
  -static void set_time_str(char * str, int len)
  -{
  - time_t  t = time(NULL);
  - struct tm   *tms;
  -
  - tms = localtime(&t);
  - strftime(str, len, jk_log_fmt, tms);
  -}
  -
  -static int JK_METHOD log_to_file(jk_logger_t *l, 
  - int level,
  - const char *what)
  -{
  -if(l && l->level <= level && l->logger_private && what) {   
  -unsigned sz = strlen(what);
  -if(sz) {
  -file_logger_t *p = l->logger_private;
  -fwrite(what, 1, sz, p->logfile);
  - /* [V] Flush the dam' thing! */
  - fflush(p->logfile);
  -}
  -
  -return JK_TRUE;
  -}
  -
  -return JK_FALSE;
  -}
  -
  -int jk_parse_log_level(const char *level)
  -{
  -if(0 == strcasecmp(level, JK_LOG_INFO_VERB)) {
  -return JK_LOG_INFO_LEVEL;
  -}
  -
  -if(0 == strcasecmp(level, JK_LOG_ERROR_VERB)) {
  -return JK_LOG_ERROR_LEVEL;
  -}
  -
  -if(0 == strcasecmp(level, JK_LOG_EMERG_VERB)) {
  -return JK_LOG_EMERG_LEVEL;
  -}
  -
  -return JK_LOG_DEBUG_LEVEL;
  -}
  -
  -int jk_open_file_logger(jk_logger_t **l,
  -const char *file,
  -int level)
  -{
  -if(l && file) { 
  -jk_logger_t *rc = (jk_logger_t *)malloc(sizeof(jk_logger_t));
  -file_logger_t *p = (file_logger_t *)malloc(sizeof(file_logger_t));
  -if(rc && p) {
  -rc->log = log_to_file;
  -rc->level = level;
  -rc->logger_private = p;
  -p->logfile = fopen(file, "a+");
  -if(p->logfile) {
  -*l = rc;
  -return JK_TRUE;
  -}   
  -}
  -if(rc) {
  -free(rc);
  -}
  -if(p) {
  -free(p);
  -}
  -
  -*l = NULL;
  -}
  -return JK_FALSE;
  -}
  -
  -int jk_close_file_logger(jk_logger_t **l)
  -{
  -if(l && *l) {
  -file_logger_t *p = (*l)->logger_private;
  -fflush(p->logfile);
  -fclose(p->logfile);
  -free(p);
  -free(*l);
  -*l = NULL;
  -
  -return JK_TRUE;
  -}
  -return JK_FALSE;
  -}
  -
  -int jk_log(jk_logger_t *l,
  -   const char *file,
  -   int line,
  -   int level,
  -   const char *fmt, ...)
  -{
  -int rc = 0;
  -if(!l || !file || !fmt) {
  -return -1;
  -}
  -
  -if(l->level <= level) {
  -#ifdef NETWARE
  -/* On NetWare, this can get called on a thread that has a limited stack so */
  -/* we will allocate 

How I can execute a jsp with Catalina?

2001-11-26 Thread Juan Carlos Fernández Galante





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common list.mk.in

2001-11-26 Thread costin

costin  01/11/26 09:08:48

  Modified:jk/native/common list.mk.in
  Log:
  Updated for the current set of files.
  
  Revision  ChangesPath
  1.6   +14 -6 jakarta-tomcat-connectors/jk/native/common/list.mk.in
  
  Index: list.mk.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/list.mk.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- list.mk.in2001/11/22 08:30:13 1.5
  +++ list.mk.in2001/11/26 17:08:48 1.6
  @@ -1,13 +1,21 @@
   ## Object needed for mod_jk for Apache-1.3
   APACHE_OBJECTS= ${JK}jk_connect${OEXT} \
  -${JK}jk_msg_buff${OEXT} ${JK}jk_util${OEXT} \
  +${JK}jk_msg_buff${OEXT} \
  +${JK}jk_util${OEXT} \
   ${JK}jk_pool${OEXT} \
  -${JK}jk_worker${OEXT} ${JK}jk_ajp13_worker${OEXT} \
  +${JK}jk_worker${OEXT} \
   ${JK}jk_lb_worker${OEXT} \
  -${JK}jk_map${OEXT} ${JK}jk_uri_worker_map${OEXT} \
  -${JK}jk_ajp14${OEXT} ${JK}jk_ajp14_worker${OEXT} \
  +${JK}jk_map${OEXT} \
  +${JK}jk_uri_worker_map${OEXT} \
  +${JK}jk_ajp14${OEXT} \
  +${JK}jk_ajp14_worker${OEXT} \
   ${JK}jk_channel_socket${OEXT} \
   ${JK}jk_registry${OEXT} \
   ${JK}jk_env${OEXT} \
  -${JK}jk_md5${OEXT} @JK_JNI_WORKER@ \
  -${JK}jk_ajp_common${OEXT} ${JK}jk_context${OEXT}
  +${JK}jk_handler_discovery${OEXT} \
  +${JK}jk_handler_logon${OEXT} \
  +${JK}jk_logger${OEXT} \
  +${JK}jk_md5${OEXT} \
  +@JK_JNI_WORKER@ \
  +${JK}jk_ajp_common${OEXT} \
  +${JK}jk_context${OEXT}
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_registry.c jk_ajp13_worker.c

2001-11-26 Thread costin

costin  01/11/26 09:08:17

  Modified:jk/native/common jk_registry.c
  Removed: jk/native/common jk_ajp13_worker.c
  Log:
  Use jk_ajp14_worker.c for both ajp13 and ajp14 protocol types.
  
  The code will work fine with any - if no login is specified we'll use only the
  'basic' callbacks ( i.e. ajp13 ), if a login is specified we'll do all the new ajp14 
stuff.
  
  This eliminates tons of duplicated code and simplifies a lot the code, allowing
  for more modularisation and better implementation.
  
  Revision  ChangesPath
  1.8   +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_registry.c
  
  Index: jk_registry.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_registry.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_registry.c 2001/11/21 00:09:56 1.7
  +++ jk_registry.c 2001/11/26 17:08:17 1.8
  @@ -62,7 +62,7 @@
   
   /***
* Description: Worker list*
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -132,7 +132,7 @@
   #ifdef AJP12
 env->registerFactory( env, "worker", "ajp12", &ajp12_worker_factory );
   #endif
  -  env->registerFactory( env, "worker", "ajp13", &ajp13_worker_factory );
  +  env->registerFactory( env, "worker", "ajp13", &ajp14_worker_factory );
 env->registerFactory( env, "worker", "ajp14", &ajp14_worker_factory );
 env->registerFactory( env, "worker", "lb",&lb_worker_factory );
   #ifdef HAVE_JNI
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp14_worker.c

2001-11-26 Thread costin

costin  01/11/26 09:06:05

  Modified:jk/native/common jk_ajp14_worker.c
  Log:
  Move discovery to the separate handler.
  
  Make sure it works in 'backward compatibility' mode if no secret is set.
  
  Revision  ChangesPath
  1.15  +135 -298  jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.c
  
  Index: jk_ajp14_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_ajp14_worker.c 2001/11/20 16:58:46 1.14
  +++ jk_ajp14_worker.c 2001/11/26 17:06:05 1.15
  @@ -55,12 +55,15 @@
*   *
* = */
   
  -/***
  - * Description: AJP14 next generation Bi-directional protocol. *
  - * Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.14 $   *
  - ***/
  +/**
  + * Description: AJP14 next generation Bi-directional protocol.
  + *  Backward compatible with Ajp13
  + * Author:  Henri Gomez <[EMAIL PROTECTED]>
  + * Author:  Costin <[EMAIL PROTECTED]>  
  + * Author:  Gal Shachor <[EMAIL PROTECTED]>   
  + */
   
  +#include "jk_global.h"
   #include "jk_context.h"
   #include "jk_pool.h"
   #include "jk_util.h"
  @@ -74,237 +77,55 @@
  const char *name,
  jk_logger_t *l);
   
  -#ifdef WIN32
  -/* define snprint to match windows version */
  -#define snprintf _snprintf
  -#endif
  -
  -/*
  - * AJP14 Autoconf Phase
  - *
  - * CONTEXT QUERY / REPLY
  - */
  -
  -#define MAX_URI_SIZE512
  -
  -static int handle_discovery(ajp_endpoint_t  *ae,
  -jk_worker_env_t *we,
  -jk_msg_buf_t*msg,
  -jk_logger_t *l)
  -{
  -int cmd;
  -int i,j;
  -jk_login_service_t  *jl = ae->worker->login;
  -jk_context_item_t   *ci;
  -jk_context_t*c;  
  -char*buf;
  -
  -#ifndef TESTME
  -
  -ajp14_marshal_context_query_into_msgb(msg, we->virtual, l);
  -
  -jk_log(l, JK_LOG_DEBUG, "Into ajp14:discovery - send query\n");
  -
  -if (ajp_connection_tcp_send_message(ae, msg, l) != JK_TRUE)
  -return JK_FALSE;
  -
  -jk_log(l, JK_LOG_DEBUG, "Into ajp14:discovery - wait context reply\n");
  -
  -jk_b_reset(msg);
  -
  -if (ajp_connection_tcp_get_message(ae, msg, l) != JK_TRUE)
  -return JK_FALSE;
  -
  -if ((cmd = jk_b_get_byte(msg)) != AJP14_CONTEXT_INFO_CMD) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14:discovery - awaited command %d, 
received %d\n", AJP14_CONTEXT_INFO_CMD, cmd);
  -return JK_FALSE;
  -}
  -
  -if (context_alloc(&c, we->virtual) != JK_TRUE) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14:discovery - can't allocate context 
room\n");
  -return JK_FALSE;
  -}
  - 
  -if (ajp14_unmarshal_context_info(msg, c, l) != JK_TRUE) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14:discovery - can't get context 
reply\n");
  -return JK_FALSE;
  -}
  -
  -jk_log(l, JK_LOG_DEBUG, "Into ajp14:discovery - received context\n");
  -
  -buf = malloc(MAX_URI_SIZE);  /* Really a very long URI */
  -
  -if (! buf) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14:discovery - can't alloc buf\n");
  -return JK_FALSE;
  -}
  -
  -for (i = 0; i < c->size; i++) {
  -ci = c->contexts[i];
  -for (j = 0; j < ci->size; j++) {
  -
  -#ifndef USE_SPRINTF
  -snprintf(buf, MAX_URI_SIZE - 1, "/%s/%s", ci->cbase, ci->uris[j]);
  -#else
  -sprintf(buf, "/%s/%s", ci->cbase, ci->uris[j]);
  -#endif
  -
  -jk_log(l, JK_LOG_INFO, "Into ajp14:discovery - worker %s will handle 
uri %s in context %s [%s]\n",
  -ae->worker->name, ci->uris[j], ci->cbase, buf);
  -
  -uri_worker_map_add(we->uri_to_worker, buf, ae->worker->name, l);
  -}
  -}
  -
  -free(buf);
  -context_free(&c);
  -
  -#else 
  -
  -uri_worker_map_add(we->uri_to_worker, "/examples/servlet/*", ae->worker->name, 
l);
  -uri_worker_map_add(we->uri_to_worker, "/examples/*.jsp", ae->worker->name, l);
  -uri_worker_map_add(we->uri_to_worker, "/examples/*.gif", ae->worker->name, l);
  -
  -#endif 
  -
  -return JK_TRUE;
  -}
  -
  -/* 
  - * AJP14 Logon Phase 
  - *
  - * INIT + REPLY / NEGO + REPLY 
  - */
  -
  -static int handl

Re: [PROPOSAL] Tomcat 4.1 Security Changes

2001-11-26 Thread Remy Maucherat

> Remy Maucherat wrote:

> > If you give the appropriate permissions to allow SSI and CGI, you're
> > actually giving AllPermissions anyway (since you're allowing a native
script
> > or executable to run, which is not constrained by the Java sandbox), so
I'm
> > missing the point here.
> >
>
> Yes, once control is handed over to a native executable from the CGI
servlet,
> all sandbox protections are lost.
> But perhaps the Tomcat admin only wants to allow the user to execute
specific CGI
> scripts which are known to be secure and can not be modified. By
configuring a
> policy for the CGI servlet the admin can restrict what CGI scripts can be
> read and executed using a FilePermission.

Yes, you could do that. That's still quite risky (any vulnerability in the
script itself, and your server is compromised).

> > This seems reasonable.
> > (Of course, it's going to break all the scripts yet again ;-))
>
> Which scripts?

- The Catalina scripts (obviously)
- The installer scripts
- My Slide build script

But it's ok, really. It's not like it's the first time or the last time it
happens ;-)
You can do the updates to the Catalina scripts, and I'll do the rest.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_handler_discovery.c jk_handler_logon.c jk_ajp14.c

2001-11-26 Thread costin

costin  01/11/26 09:03:25

  Modified:jk/native/common jk_ajp14.c
  Added:   jk/native/common jk_handler_discovery.c jk_handler_logon.c
  Log:
  Moved the discovery and logon code in separate file. This simplifies Ajp14.c - it'll 
just
  contain ajp-related code - and prepares for a more flexible message handling 
mechansim.
  Another benefit ( after abstraction of marshalling ) is that the code will be 
reusable with
  different other wire protocols.
  
  Revision  ChangesPath
  1.15  +1 -471jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c
  
  Index: jk_ajp14.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_ajp14.c2001/10/13 18:42:51 1.14
  +++ jk_ajp14.c2001/11/26 17:03:25 1.15
  @@ -59,7 +59,7 @@
   /***
* Description: Next generation bi-directional protocol handler.   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.14 $   *
  + * Version: $Revision: 1.15 $   *
***/
   
   
  @@ -70,191 +70,7 @@
   #include "jk_ajp14.h"
   #include "jk_md5.h"
   
  -/*
  - * Compute the MD5 with ENTROPY / SECRET KEY
  - */
  -
  -void ajp14_compute_md5(jk_login_service_t *s, 
  -   jk_logger_t*l)
  -{
  - jk_md5((const unsigned char *)s->entropy, (const unsigned char 
*)s->secret_key, s->computed_key);
  -
  - jk_log(l, JK_LOG_DEBUG, "Into ajp14_compute_md5 (%s/%s) -> (%s)\n", 
s->entropy, s->secret_key, s->computed_key);
  -}
  -
  -
  -/*
  - * Build the Login Init Command
  - *
  - * 
+-+---+---+
  - * | LOGIN INIT CMD (1 byte) | NEGOCIATION DATA (32bits) | WEB SERVER INFO 
(CString) |
  - * 
+-+---+---+
  - *
  - */
  -
  -int ajp14_marshal_login_init_into_msgb(jk_msg_buf_t   *msg,
  -   jk_login_service_t *s,
  -   jk_logger_t*l)
  -{
  -jk_log(l, JK_LOG_DEBUG, "Into ajp14_marshal_login_init_into_msgb\n");
  -
  -/* To be on the safe side */
  -jk_b_reset(msg);
  -
  -/*
  - * LOGIN
  - */
  -if (jk_b_append_byte(msg, AJP14_LOGINIT_CMD)) 
  -return JK_FALSE;
  -
  - /*
  - * NEGOCIATION FLAGS
  - */
  - if (jk_b_append_long(msg, s->negociation))
  - return JK_FALSE;
  -
  - /*
  -  * WEB-SERVER NAME
  -  */
  - if (jk_b_append_string(msg, s->web_server_name)) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14_marshal_login_init_into_msgb - Error 
appending the web_server_name string\n");
  -return JK_FALSE;
  -}
  -
  -return JK_TRUE;
  -}
  -
  -
  -/*
  - * Decode the Login Seed Command
  - *
  - * +-+---+
  - * | LOGIN SEED CMD (1 byte) | MD5 of entropy (32 chars) |
  - * +-+---+
  - *
  - */
  -
  -int ajp14_unmarshal_login_seed(jk_msg_buf_t   *msg,
  -   jk_login_service_t *s,
  -   jk_logger_t*l)
  -{
  -if (jk_b_get_bytes(msg, (unsigned char *)s->entropy, AJP14_ENTROPY_SEED_LEN) < 
0) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14_unmarshal_login_seed - can't get 
seed\n");
  -return JK_FALSE;
  -}
   
  - s->entropy[AJP14_ENTROPY_SEED_LEN] = 0; /* Just to have a CString */
  - return JK_TRUE;
  -}
  -
  -/*
  - * Build the Login Computed Command
  - *
  - * +-+---+
  - * | LOGIN COMP CMD (1 byte) | MD5 of RANDOM + SECRET KEY (32 chars) |
  - * +-+---+
  - *
  - */
  -
  -int ajp14_marshal_login_comp_into_msgb(jk_msg_buf_t   *msg,
  -   jk_login_service_t *s,
  -   jk_logger_t*l)
  -{
  -jk_log(l, JK_LOG_DEBUG, "Into ajp14_marshal_login_comp_into_msgb\n");
  -
  -/* To be on the safe side */
  -jk_b_reset(msg);
  -
  -/*
  - * LOGIN
  - */
  -if (jk_b_append_byte(msg, AJP14_LOGCOMP_CMD)) 
  -return JK_FALSE;
  -
  - /*
  -  * COMPUTED-SEED
  -  */
  - if (jk_b_append_bytes(msg, (const unsigned char *)s->computed_key, 
AJP14_COMPUTED_KEY_LEN)) {
  -jk_log(l, JK_LOG_ERROR, "Error ajp14_marshal_login_comp_into_msgb - Error 
appending the COMPUTED MD5 bytes\n")

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java

2001-11-26 Thread costin

costin  01/11/26 08:59:54

  Modified:jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
  Log:
  Now ajp14 is implemented by creating a NegotiationHandler and registering it, and
  setting Ajp13 in 'require auth' mode.
  
  For all new callbacks we'll create a specific FooHandler that will contain all
  related code - Ajp13 will just handle the protocol-related functions and dispatching.
  
  Revision  ChangesPath
  1.9   +46 -30
jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14Interceptor.java
  
  Index: Ajp14Interceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14Interceptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Ajp14Interceptor.java 2001/11/21 20:49:55 1.8
  +++ Ajp14Interceptor.java 2001/11/26 16:59:54 1.9
  @@ -64,8 +64,8 @@
   import java.util.*;
   
   import org.apache.ajp.*;
  +import org.apache.tomcat.modules.server.PoolTcpConnector;
   
  -import org.apache.tomcat.modules.server.*;
   import org.apache.tomcat.core.*;
   
   import org.apache.tomcat.util.net.*;
  @@ -93,6 +93,8 @@
   {
   int ajp14_note=-1;
   String password;
  +RequestHandler reqHandler=new RequestHandler();
  +NegociationHandler negHandler=new NegociationHandler();
   
   public Ajp14Interceptor()
   {
  @@ -119,6 +121,13 @@
this.password=s;
   }
   
  +/**
  + * Set the original entropy seed
  + */
  +public void setSeed(String pseed) 
  +{
  + negHandler.setSeed( pseed );
  +}
   
   //  PoolTcpConnector 
   
  @@ -164,17 +173,24 @@
req.recycle();
res.recycle();
// make the note available to other modules
  - req.setNote( ajp14_note, req.ajp14);
  + req.setNote( ajp14_note, req.ajp13);
return req;
}
// either thData==null or broken ( req==null)
  - Ajp14 ajp14=new Ajp14();
  - ajp14.setContainerSignature( ContextManager.TOMCAT_NAME +
  -  " v" + ContextManager.TOMCAT_VERSION);
  - AjpRequest ajpreq=new AjpRequest();
  - ajp14.setPassword( password );
  - req=new Ajp14Request(ajp14, ajpreq);
  - Ajp14Response res=new Ajp14Response(ajp14);
  + Ajp13 ajp13=new Ajp13(reqHandler);
  +negHandler.init( ajp13 );
  +
  + negHandler.setContainerSignature( ContextManager.TOMCAT_NAME +
  +  " v" + ContextManager.TOMCAT_VERSION);
  + if( password!= null ) {
  +negHandler.setPassword( password );
  +ajp13.setBackward(false); 
  +}
  +
  + BaseRequest ajpreq=new BaseRequest();
  +
  + req=new Ajp14Request(ajp13, ajpreq);
  + Ajp14Response res=new Ajp14Response(ajp13);
cm.initRequest(req, res);
return  req;
   }
  @@ -194,19 +210,19 @@
   
   Ajp14Request req=initRequest( thData );
   Ajp14Response res= (Ajp14Response)req.getResponse();
  -Ajp14 ajp14=req.ajp14;
  - AjpRequest ajpReq=req.ajpReq;
  +Ajp13 ajp13=req.ajp13;
  + BaseRequest ajpReq=req.ajpReq;
   
  -ajp14.setSocket(socket);
  +ajp13.setSocket(socket);
   
// first request should be the loginit.
  - int status=ajp14.receiveNextRequest( ajpReq );
  + int status=ajp13.receiveNextRequest( ajpReq );
if( status != 304 )  { // XXX use better codes
log( "Failure in logInit ");
return;
}
   
  - status=ajp14.receiveNextRequest( ajpReq );
  + status=ajp13.receiveNextRequest( ajpReq );
if( status != 304 ) { // XXX use better codes
log( "Failure in login ");
return;
  @@ -214,7 +230,7 @@

   boolean moreRequests = true;
   while(moreRequests) {
  - status=ajp14.receiveNextRequest( ajpReq );
  + status=ajp13.receiveNextRequest( ajpReq );
   
if( status==-2) {
// special case - shutdown
  @@ -237,7 +253,7 @@
res.recycle();
   }
   if( debug > 0 ) log("Closing ajp14 connection");
  -ajp14.close();
  +ajp13.close();
socket.close();
   } catch (Exception e) {
log("Processing connection " + connection, e);
  @@ -284,10 +300,10 @@
   
   class Ajp14Request extends Request 
   {
  -Ajp14 ajp14;
  -AjpRequest ajpReq;
  +Ajp13 ajp13;
  +BaseRequest ajpReq;
   
  -public Ajp14Request(Ajp14 ajp14, AjpRequest ajpReq) 
  +public Ajp14Request(Ajp13 ajp13, BaseRequest ajpReq) 
   {
headers = ajpReq.headers();
methodMB=ajpReq.method();
  @@ -309,12 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp NegociationHandler.java

2001-11-26 Thread costin

costin  01/11/26 08:57:25

  Modified:jk/java/org/apache/ajp NegociationHandler.java
  Log:
  Few indentation changes ( lines longer than 80 chars are hard to print and read... )
  
  Few changes to match the Ajp13/14 consolidation.
  
  Revision  ChangesPath
  1.5   +103 -85   
jakarta-tomcat-connectors/jk/java/org/apache/ajp/NegociationHandler.java
  
  Index: NegociationHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/NegociationHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NegociationHandler.java   2001/11/21 20:49:54 1.4
  +++ NegociationHandler.java   2001/11/26 16:57:25 1.5
  @@ -83,106 +83,112 @@
*/
   public class NegociationHandler extends AjpHandler
   {
  -public static final byte JK_AJP13_SHUTDOWN  = 7;
  +public static final byte JK_AJP13_SHUTDOWN=7;

   // Initial Login Phase (web server -> servlet engine)
  -public static final byte JK_AJP14_LOGINIT_CMD= 0x10;
  +public static final byte JK_AJP14_LOGINIT_CMD=0x10;
   
   // Second Login Phase (servlet engine -> web server), md5 seed is received
  -public static final byte JK_AJP14_LOGSEED_CMD= 0x11;
  +public static final byte JK_AJP14_LOGSEED_CMD=0x11;
   
  -// Third Login Phase (web server -> servlet engine), md5 of seed + secret is 
sent
  -public static final byte JK_AJP14_LOGCOMP_CMD= 0x12;
  +// Third Login Phase (web server -> servlet engine),
  +// md5 of seed + secret is sent
  +public static final byte JK_AJP14_LOGCOMP_CMD=0x12;
   
   // Login Accepted (servlet engine -> web server)
  -public static final byte JK_AJP14_LOGOK_CMD  = 0x13;
  +public static final byte JK_AJP14_LOGOK_CMD=0x13;
   
   // Login Rejected (servlet engine -> web server), will be logged
  -public static final byte JK_AJP14_LOGNOK_CMD = 0x14;
  +public static final byte JK_AJP14_LOGNOK_CMD=0x14;
   
  -// Context Query (web server -> servlet engine), which URI are handled by 
servlet engine ?
  -public static final byte JK_AJP14_CONTEXT_QRY_CMD= 0x15;
  +// Context Query (web server -> servlet engine),
  +// which URI are handled by servlet engine ?
  +public static final byte JK_AJP14_CONTEXT_QRY_CMD=0x15;
   
   // Context Info (servlet engine -> web server), URI handled response
  -public static final byte JK_AJP14_CONTEXT_INFO_CMD   = 0x16;
  +public static final byte JK_AJP14_CONTEXT_INFO_CMD= 0x16;
   
   // Context Update (servlet engine -> web server), status of context changed
  -public static final byte JK_AJP14_CONTEXT_UPDATE_CMD = 0x17;
  +public static final byte JK_AJP14_CONTEXT_UPDATE_CMD= 0x17;
   
  -// Servlet Engine Status (web server -> servlet engine), what's the status of 
the servlet engine ?
  -public static final byte JK_AJP14_STATUS_CMD = 0x18;
  +// Servlet Engine Status (web server -> servlet engine),
  +// what's the status of the servlet engine ?
  +public static final byte JK_AJP14_STATUS_CMD= 0x18;
  +
  +// Secure Shutdown command (web server -> servlet engine),
  +//please servlet stop yourself.
  +public static final byte JK_AJP14_SHUTDOWN_CMD= 0x19;
   
  -// Secure Shutdown command (web server -> servlet engine), please servlet stop 
yourself.
  -public static final byte JK_AJP14_SHUTDOWN_CMD   = 0x19;
  -
   // Secure Shutdown command Accepted (servlet engine -> web server)
  -public static final byte JK_AJP14_SHUTOK_CMD = 0x1A;
  +public static final byte JK_AJP14_SHUTOK_CMD= 0x1A;
   
   // Secure Shutdown Rejected (servlet engine -> web server)
  -public static final byte JK_AJP14_SHUTNOK_CMD   = 0x1B;
  +public static final byte JK_AJP14_SHUTNOK_CMD= 0x1B;
   
  -// Context Status (web server -> servlet engine), what's the status of the 
context ?
  -public static final byte JK_AJP14_CONTEXT_STATE_CMD = 0x1C;
  +// Context Status (web server -> servlet engine),
  +//what's the status of the context ?
  +public static final byte JK_AJP14_CONTEXT_STATE_CMD= 0x1C;
   
   // Context Status Reply (servlet engine -> web server), status of context
   public static final byte JK_AJP14_CONTEXT_STATE_REP_CMD = 0x1D;
   
  -// Unknown Packet Reply (web server <-> servlet engine), when a packet couldn't 
be decoded
  -public static final byte JK_AJP14_UNKNOW_PACKET_CMD = 0x1E;
  +// Unknown Packet Reply (web server <-> servlet engine),
  +//when a packet couldn't be decoded
  +public static final byte JK_AJP14_UNKNOW_PACKET_CMD = 0x1E;
   
   
   // --

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Processor.java Ajp13Request.java

2001-11-26 Thread costin

costin  01/11/26 08:56:19

  Modified:jk/java/org/apache/ajp AjpHandler.java RequestHandler.java
   jk/java/org/apache/ajp/test TestAjp13.java
   jk/java/org/apache/ajp/tomcat4 Ajp13Processor.java
Ajp13Request.java
  Removed: jk/java/org/apache/ajp AjpRequest.java
  Log:
  Remove AjpRequest, it contained only the 'javaRoute' which is now included in
  util/http/BaseRequest. This simplifies the code ( fewer classes, simpler model )
  
  Revision  ChangesPath
  1.4   +10 -9 jakarta-tomcat-connectors/jk/java/org/apache/ajp/AjpHandler.java
  
  Index: AjpHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/AjpHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AjpHandler.java   2001/11/21 20:49:54 1.3
  +++ AjpHandler.java   2001/11/26 16:56:19 1.4
  @@ -70,31 +70,32 @@
   import org.apache.tomcat.util.http.*;
   import org.apache.tomcat.util.buf.*;
   
  -
   /**
* Base class for handlers of Ajp messages. Jk provide a simple bidirectional 
* communication mechanism between the web server and a servlet container. It is
* based on messages that are passed between the 2 server, using a single
* thread on each side.
*
  - * Both sides must be prepared to deal with unknown packages ( by responding with
  - * an "message unknown" message ). The container and server may register new
  - * message types, implementing special features or specialized implementations
  - * for the "base" messages.
  + * The container side must be able to deal with at least the "REQUEST FORWARD",
  + * the server side must be able to deal with at least "HEADERS", "BODY",
  + * "END" messages.
*
  - * The container side must be able to deal with at least the "REQUEST FORWARD", and
  - * the server side must be able to deal with at least "HEADERS", "BODY", "END" 
messages.
  - * 
  + * @author Henri Gomez
* @author Costin Manolache
*/
   public class AjpHandler
   {
   public static final int UNKNOWN=-1;
  +Ajp13 channel;
   
  +public void init( Ajp13 channel ) {
  +this.channel=channel;
  +}
  +
   /** Execute the callback 
*/
   public int handleAjpMessage( int type, Ajp13 channel,
  -  Ajp13Packet ajp, AjpRequest req )
  +  Ajp13Packet ajp, BaseRequest req )
throws IOException
   {
return UNKNOWN;
  
  
  
  1.7   +1 -1  
jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java
  
  Index: RequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RequestHandler.java   2001/11/21 20:49:54 1.6
  +++ RequestHandler.java   2001/11/26 16:56:19 1.7
  @@ -218,7 +218,7 @@
   
   //  Incoming message 
   public int handleAjpMessage( int type, Ajp13 channel,
  -  Ajp13Packet ajp, AjpRequest req )
  +  Ajp13Packet ajp, BaseRequest req )
throws IOException
   {
switch( type ) {
  
  
  
  1.7   +1 -1  
jakarta-tomcat-connectors/jk/java/org/apache/ajp/test/TestAjp13.java
  
  Index: TestAjp13.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/test/TestAjp13.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestAjp13.java2001/11/21 20:49:55 1.6
  +++ TestAjp13.java2001/11/26 16:56:19 1.7
  @@ -169,7 +169,7 @@
   Socket socket = server.accept();
   Ajp13 ajp13 = new Ajp13();
   MimeHeaders headers = new MimeHeaders();
  -AjpRequest request = new AjpRequest();
  +BaseRequest request = new BaseRequest();
   ajp13.setSocket(socket);
   
   boolean moreRequests = true;
  
  
  
  1.4   +6 -6  
jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java
  
  Index: Ajp13Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Ajp13Processor.java   2001/09/27 10:28:12 1.3
  +++ Ajp13Processor.java   2001/11/26 16:56:19 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java,v
 1.3 2001/09/27 10:28:12 hgomez Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/09/27 10:

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp Ajp13.java Ajp14.java

2001-11-26 Thread costin

costin  01/11/26 08:53:57

  Modified:jk/java/org/apache/ajp Ajp13.java
  Removed: jk/java/org/apache/ajp Ajp14.java
  Log:
  Merge logic from Ajp14 in Ajp13, removing the duplicated code.
  
  The difference is that if Ajp13 is configured with a 'setBackward( false )' it'll
  require an auth phase and support all additional handlers ( negotiation, etc ). 
Otherwise it'll
  behave as it did before, as a 'basic' ajp13 worker ( important for 3.2.x where 14 is 
unlikely
  to get ported, and 4.0 where 14 is not yet completed ).
  
  Revision  ChangesPath
  1.20  +69 -5 jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java
  
  Index: Ajp13.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Ajp13.java2001/11/21 20:49:54 1.19
  +++ Ajp13.java2001/11/26 16:53:57 1.20
  @@ -74,6 +74,7 @@
   import org.apache.tomcat.util.buf.ByteChunk;
   import org.apache.tomcat.util.http.MimeHeaders;
   import org.apache.tomcat.util.http.HttpMessages;
  +import org.apache.tomcat.util.http.BaseRequest;
   
   /**
* Represents a single, persistent connection between the web server and
  @@ -93,6 +94,8 @@
* @author Dan Milstein [[EMAIL PROTECTED]]
* @author Keith Wannamaker [[EMAIL PROTECTED]]
* @author Kevin Seguin [[EMAIL PROTECTED]]
  + * @author Henri Gomez [[EMAIL PROTECTED]]
  + * @author Costin Manolache
*/
   public class Ajp13 {
   
  @@ -134,14 +137,26 @@
   boolean end_of_stream;  // true if we've received an empty packet
   
   // Required handler - essential request processing
  -public RequestHandler reqHandler=new RequestHandler();
  +public RequestHandler reqHandler;
  +// AJP14 - detect protocol,set communication parameters, login
  +// If no password is set, use only Ajp13 messaging
  +boolean backwardCompat=true;
  +boolean logged=false;
   
   public Ajp13() {
super();
initBuf();
  +reqHandler=new RequestHandler();
reqHandler.init( this );
   }
   
  +public Ajp13(RequestHandler reqHandler ) {
  + super();
  + initBuf();
  +this.reqHandler=reqHandler;
  + reqHandler.init( this );
  +}
  +
   /** Will be overriden
*/
   public void initBuf() {
  @@ -159,6 +174,7 @@
   blen = 0; 
   pos = 0;
   end_of_stream = false;
  +logged=false;
   }
   
   /**
  @@ -175,6 +191,22 @@
pos = 0;
   }
   
  +/**
  + * Backward compat mode, no login  needed
  + */
  +public void setBackward(boolean b) 
  +{
  +backwardCompat=b;
  +}
  +
  +public boolean isLogged() {
  + return logged;
  +}
  +
  +void setLogged( boolean b ) {
  +logged=b;
  +}
  +
   //  Handlers registry 
   
   static final int MAX_HANDLERS=32;
  @@ -217,7 +249,7 @@
* if there were errors in the reading of the request, and -2 if the
* server is asking the container to shut itself down.  
*/
  -public int receiveNextRequest(AjpRequest req) throws IOException {
  +public int receiveNextRequest(BaseRequest req) throws IOException {
   if (debug > 0) {
   logger.log("receiveNextRequest()");
   }
  @@ -248,18 +280,49 @@
   
   /** Override for ajp14, temporary
*/
  -public int handleMessage( int type, Ajp13Packet hBuf, AjpRequest req )
  +public int handleMessage( int type, Ajp13Packet hBuf, BaseRequest req )
   throws IOException
   {
  +if( type > handlers.length ) {
  + logger.log( "Invalid handler " + type );
  + return 500;
  + }
  +
  +if( debug > 0 )
  +logger.log( "Received " + type + " " + handlerName[type]);
  +
  +// Ajp14, unlogged
  + if( ! backwardCompat && ! isLogged() ) {
  + if( type != NegociationHandler.JK_AJP14_LOGINIT_CMD &&
  + type != NegociationHandler.JK_AJP14_LOGCOMP_CMD ) {
  +
  +logger.log( "Ajp14 error: not logged " +
  +type + " " + handlerName[type]);
  +
  + return 300;
  + }
  + // else continue
  + }
  +
  +// Ajp13 messages
switch(type) {
  - 
case RequestHandler.JK_AJP13_FORWARD_REQUEST:
return reqHandler.decodeRequest(this, hBuf, req);

case JK_AJP13_SHUTDOWN:
return -2;
}
  - return 200; // XXX This is actually an error condition 
  +
  + // logged || loging message
  + AjpHandler handler=handlers[type];
  + if( handler==null ) {
  + logger.log( "Unknown message " + type + handlerName[type] );
  + return 200;
  + }

DO NOT REPLY [Bug 5078] - org.apache.catalina.connector.http.HttpRequestStream.close() method is too strict - it does not allow to close the stream twice

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5078

org.apache.catalina.connector.http.HttpRequestStream.close() method is too strict - it 
does not allow to close the stream twice





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 08:54 ---
Actually, there are a few cases where Tomcat is not strict enough, according to 
the servlet spec.
Anyway, I think the applications should be fixed, or at least coded in a more 
robust way. I'll leave the bug as NEW at the moment, to get some more input, 
but it's likely it'll get resolved as WONTFIX.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 4.0.1 ClassLoader breaks singletons on webapp reload.

2001-11-26 Thread Daniel Rall

[EMAIL PROTECTED] (Kevin A. Burton) writes:

> Jon Stevens <[EMAIL PROTECTED]> writes:
>
>> Sadly, I have to admit that the Turbine Services framework shutdown
>> code is currently broken and has been for some time now...it needs
>> to be re-written...
>
> Are you saying that the theory is broken or just Turbine's impl?

Turbine's impl...no one has made use of shutdown in a while.  It'll be
fixed soon, though.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Jk and APR

2001-11-26 Thread costinm

On Thu, 22 Nov 2001, jean-frederic clere wrote:

>
> I would even use APR to build mod_jk: APR of httpd-2.0 (installed or source)
> otherwise the one given by --with-apr parameter with configuring mod_jk :)

I'll go ahead and create an APR directory. To keep things simple and clear
I'll not touch configure - build.xml will detect if APR_INCLUDE/apr.h is
present and compile the apr-dependent files.

The APR code will be entirely optional for now - when we are comfortable
and everything is tested we can deprecate the current platform-specific
code ( or leave it in - it doesn't hurt and people who have any problem
will have a fallback )


> The actual makefiles logic is a bit too complex I think there should be more
> targets to remove the automaticly generated makefiles.

Is there any reason we don't use GNU make ? This would allow many
simplifications in the build files ( the VPATH is one clear one, we could
also simplify a lot by using the many functions available in gmake ).

I would also like to have built.properties included in the Makefile - it
would allow a consistent mechanism of setting preferences ( paths, etc )
( i.e. consistent with tomcat and other jakarta projects ). Not sure how
difficult it would be, but when we switch to APR we'll have no reason to
use configure - everything is supposed to be portable !


> But is it is still necesary to keep native makefiles when we have a new _nice_
> tool?

For a while, yes, it's better to have a smooth transition. And we first
need to make sure everyone is comfortable with a new build system.

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




You can help me ....

2001-11-26 Thread Juan Carlos Fernández Galante

Hi,

I want to load  a jsp file on a org.apache.catalina.core.StandardWrapper (of
Catalina API), but this fragment of code not make it, Can someone Help me?

StandardWrapper theStandardWrapper = new StandardWrapper();

theStandardWrapper.setJspFile("file://C:/proyectos/varios/jasper/bak/hello.j
sp");
  theStandardWrapper.setServletName("hello.jsp");
  theStandardWrapper.setServletClass("jsp.hello");
  StandardContext theStandardContext = new StandardContext();
  theStandardContext.addChild(theStandardWrapper);

  theStandardWrapper.setParent(theStandardContext);

  try
  {
   //Sets the loader
   WebappLoader theWebappLoader = new WebappLoader();
   theStandardWrapper.setLoader(theWebappLoader);
   Servlet theServlet = theStandardWrapper.allocate();
}catch (Exception e)
   {
e.printStackTrace();
   }
  }

The exception throws is :

javax.servlet.ServletException: Servlet.init() for servlet hello.jsp threw
exception

 void org.apache.catalina.core.StandardWrapper.load()

  StandardWrapper.java:871

 javax.servlet.Servlet org.apache.catalina.core.StandardWrapper.allocate()

  StandardWrapper.java:615

 void jsp.Prueba1.()

  Prueba1.java:39

 void jsp.Prueba1.main(java.lang.String[])

  Prueba1.java:73





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Undocumented change in 1.4 JDK can cause problems with tag libraries

2001-11-26 Thread Andre de Jesus

Hi

As SUN says, the Introspector class in the beans API has been 
reimplemented in the most recent version of the JDK (1.4.0 beta3).
In the previous versions, the simultaneous presence in a tag library 
extension of a getter method and a setter method of diferent types both 
methods would apparently cause no problems:

public void setThis(String str);

public boolean isThis();

(both methods would be recognized).

But now, only the getter method (boolean) is recognized. Probably this 
is the correct behavior, since methods of different types are 
contradictory, but nevertheless I thought to say this because it has 
relevance to this list and can break code that relied on the incorrect 
previous behavior.

Thank you



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 4.0.1 ClassLoader breaks singletons on webapp reload.

2001-11-26 Thread Mel Martinez


--- "Kevin A. Burton" <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> So what patterns do developers follow when the want
> to deploy webapps with
> singletons that have support for reloading?
> 
> Kevin

You have a couple of basic strategies for having
'part' of your application persist as (a) loaded
class(es) through the reload of other classes during
run-time.

One strategy is to save and restore your loaded state
based on life-cycle events (servlet destroy() and
init()) or using a ServletContextListener (if you are
using a Servlet 2.3 compliant container).  Before a
web app is reloaded, it must be destroyed so you can
use this opportunity to save the state, perhaps as a
serialized object for speed, and then on reload you
can check for the presence of persisted state
information and use maybe a semaphore of some sort
(i.e. a date threshold or a flag) to indicate whether
you want to load it instead of going through your
normal initialization routine.  Restoring using
serialized objects can often be much faster than a
full startup going through a complex initialization
cycle.  The negative with this route is that it may
require considerable rewriting of your application. 
Also, if you serialize data in classes that get
modified, make sure you use a Serial Version ID and
follow the rules for safely upgrading classes for
serializable objects.  See the serialization API docs
for details and tips.

Alternatively, and _possibly_ much simpler, you could
place the classes that must persist through the
dynamic reload of others into the 'shared' or 'common'
classloader space so that they are not reloaded except
on application server restart.  This will force those
classes to be loaded by the parent class loader of the
web application classloaders and so will remain loaded
and be referanceable from the objects created by the
classes loaded by the web-app class loader.  However,
the reverse is not necessarily true.  That is, objects
created from classes loaded by the 'shared' or
'common' class loader can not 'see' the classes loaded
by the child webapp class loader.  This could be a
problem if the long-lived part of your application
tries to use classes only loaded by the web-app
loader.  This can be prevented in design by using
interface classes that do not get reloaded and only
referencing dynamically reloaded class implementation
objects through those long-lived interface classes. 
Another potential negative about this strategy is that
the classes loaded in the 'shared' or 'common' areas
are visible to other web applications.  That may be an
issue if you are sharing use of the tomcat server with
other applications.

So either strategy MAY require significant rewrites to
your application, depending on how your code is
designed.

Good luck,

Mel

Dr. Mel Martinez
Extreme Blue/Cambridge
IBM 

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: FW: Tomcat 3.3 Document Bug

2001-11-26 Thread Jun Inamori

Hi,
Konbanwa!

> > When Tomcat starts up it will automatically generate
> > a configuration file for Apache in
> > TOMCAT_HOME/conf/jserv/tomcat-apache.conf. 
> >
> > But I cannot find the configuration file.
> > Tomcat 3.2 has it.  
> > I guess its description remains as the Tomcat 3.2 document.

As for Tomcat 3.3, we may need to add:
jkconf="true"
in the ContextManager element in server.xml, or to pass:
-jkconf
option at the start-up.
In the latter case, Tomcat will exit soon after s/he writes the configuration file.
These features are well described in:
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html

As you pointed out, the new features should reflected also to other articles.

From Osaka in Japan.

Best regards,
-- 

Happy Java programming!

Jun Inamori
OOP-Reserch
E-mail: [EMAIL PROTECTED]
URL:http://www.oop-reserch.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




https problem.

2001-11-26 Thread Erik Campo

Hi.

I have defined a web application (actually tomcat-docs) that should be
redirected or moreover, viewed under https. If I try it with Netscape or
Opera everything works fine. The tomcat-docs link is redirected to port
8443 and thus opened via https. The problem comes when I try to use
Microsoft Internet Explorer. It just won't display the page (The page
cannot be displayed) and won't even redirect me to port 8443. It keeps
insisting on trying to view the docs under 8080 which of course, will
give an error. TLS 1.0 is selected on MS Internet Explorer and I still
get the same error.

These are some of the results I get in my log files:

2001-11-26 11:37:57 HttpProcessor[8080][3]  Header referer =
http://www.someweb.com:8080/index.html
2001-11-26 11:37:57 HttpProcessor[8080][3]  Header accept-language = es
2001-11-26 11:37:57 HttpProcessor[8080][3]  Adding locale 'es'
2001-11-26 11:37:57 HttpProcessor[8080][3]  Header accept-encoding =
gzip, deflate
2001-11-26 11:37:57 HttpProcessor[8080][3]  Header user-agent =
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
2001-11-26 11:37:57 HttpProcessor[8080][3]  Header host =
www.someweb.com:8080
2001-11-26 11:37:57 HttpProcessor[8080][3]  Header connection =
Keep-Alive
2001-11-26 11:37:57 HttpProcessor[8080][3]   parseConnection:
address=server/192.168.1.51, port=8080
2001-11-26 11:38:55 HttpProcessor[8080][3]  An incoming request is being
assigned
2001-11-26 11:38:55 HttpProcessor[8080][3]   The incoming request has
been awaited
2001-11-26 11:38:55 HttpProcessor[8080][3]   parseConnection:
address=server/192.168.1.51, port=8080
2001-11-26 11:38:55 HttpProcessor[8080][3] Normalized:
'?Zt???G?Q???k-???%??' to '/?Zt???G?Q???k-???%??'
2001-11-26 11:38:55 HttpProcessor[8080][3]  Request is
'[W?O??Og8??9A*???7?I??]<' °?? '?ZG?Q-???%??' 

'HTTP/0.9'


I don't understand why I get this garbage: "Normalized:
'?Zt???G?Q???k-???%??' to .."


more logs:

2001-11-26 11:37:39 StandardHost[www.someweb.com]:  Mapped to context ''
2001-11-26 11:37:57 StandardHost[www.someweb.com]: Mapping request URI
'/tomcat-docs'
2001-11-26 11:37:57 StandardHost[www.someweb.com]:   Trying the longest
context path prefix
2001-11-26 11:37:57 StandardHost[www.someweb.com]:  Mapped to context
'/tomcat-docs'
2001-11-26 11:38:55 StandardHost[www.someweb.com]: Mapping request URI
'/tomcat-docs'
2001-11-26 11:38:55 StandardHost[www.someweb.com]:   Trying the longest
context path prefix
2001-11-26 11:38:55 StandardHost[www.someweb.com]:  Mapped to context
'/tomcat-docs'
2001-11-26 11:38:55 StandardHost[www.someweb.com]: Mapping request URI
'/?Zt???G?Q???k-???%??'
2001-11-26 11:38:55 StandardHost[www.someweb.com]:   Trying the longest
context path prefix
2001-11-26 11:38:55 StandardHost[www.someweb.com]:  Mapped to context ''


and finally:

192.168.1.51 - - [26/Nov/2001:11:37:39 1000] "GET / HTTP/1.1" 302 240
192.168.1.51 - - [26/Nov/2001:11:37:39 1000] "GET /index.html HTTP/1.1"
200 6680
192.168.1.51 - - [26/Nov/2001:11:37:39 1000] "GET /jakarta-banner.gif
HTTP/1.1" 200 8006
192.168.1.51 - - [26/Nov/2001:11:37:39 1000] "GET /tomcat-power.gif
HTTP/1.1" 200 2324
192.168.1.51 - - [26/Nov/2001:11:37:39 1000] "GET /tomcat.gif HTTP/1.1"
200 1934
192.168.1.51 - - [26/Nov/2001:11:37:57 1000] "GET /tomcat-docs HTTP/1.1"
302 -
192.168.1.51 - - [26/Nov/2001:11:38:55 1000] "GET /tomcat-docs HTTP/1.1"
302 240
192.168.1.51 - - [26/Nov/2001:11:38:55 1000]
"[W?O??Og8??9A*???7?I??]< /?Zt???G?Q???k-???%?? HTTP/0.9" 400
242



My web.xml file for tomcat-docs is defined as follows:


 
http://java.sun.com/dtd/web-app_2_3.dtd";>
 

 
   
  HTTPS_URL_PATTERNS
 /*,/tomcat-docs/*,index.html
   
 
   
  
 HTTPS_URL_PATTERNS
 /*
  
  
 CONFIDENTIAL
  
   
 


Thanks in advance,

Erik.

-- 
Tu voudrais donner des yeux à la justice
Impossible de violer cette femme pleine de vices
--Antisocial, Trust.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4334] - ServerName in httpd.conf vs. defaultHost in server.xml Error: addChild: Child name 'hostname.myserver.com' is not unique

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=4334

ServerName in httpd.conf vs. defaultHost in server.xml Error: addChild:  Child name 
'hostname.myserver.com' is not unique





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 06:40 
---
I have reproduced the problem...
I have it when:
ServerName MHPB04TC.mch.fsc.net
but not when:
ServerName mhpb04tc.mch.fsc.net

I also noted:
$ ls -lt work   
total 4 
drwxr-xr-x   3 apache20 other512 Nov 26 15:40 mhpb04tc.mch.fsc.net  
drwxr-xr-x   7 apache20 other512 Nov 26 15:39 localhost

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Javascript in JSP.

2001-11-26 Thread Bill Stoddard

> I modified Jasper to support Javascript scriptlets and expressions in JSPs
> using Rhino. Should I contribute the code?

> The reason I'm asking is that I'm not sure how you guys would feel about a
> Mozilla dependency.

> I would have used IBM's BSF, but the license is more strict,

BSF will be donated to the ASF under the Apache Software License v2.0. The ASF is
polishing off ASL v2 now so I hope to get BSF out within the next couple of weeks.

> it still uses Rhino, and frankly I don't think the added languages would
> provide enough value to offset the nastiness in the API.

I would prefer to not solve this problem in two different ways.

One other comment... BSF will have a complete debug API built in to enable stepping
through your javascript with either a command line or GUI debugger (like Eclipse).

Bill


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 4.0.1 ClassLoader breaks singletons on webapp reload.

2001-11-26 Thread Mika Goeckel

Hi,

could you get around the singleton problem by placing the singleton object's
class outside the classloader which get busted when reloading the changed
servlets/jsps? You could move it up to the 'shared' or even 'common'
classspace. Do I understand it right, that these class loaders are not being
destroyed when TC is running? I'm not so deep into that matter, maybe I
completely misunderstand something...

Mika

- Original Message -
From: "Kevin A. Burton" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 8:52 AM
Subject: Re: 4.0.1 ClassLoader breaks singletons on webapp reload.


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jon Stevens <[EMAIL PROTECTED]> writes:
>
> > on 11/25/01 9:57 PM, "Remy Maucherat" <[EMAIL PROTECTED]> wrote:
> >
> > > Of course, there's a reason for this, as a selective reloading would
be a
> > > very complex thing to do.
> > >
> > > Remy
> >
> > More like damn near impossible. Once the previous classloader has been
> > trashed, all objects which were created within it would then become
invalid.
> >
> > Kevin, the right thing to do is to setup something like Turbine's
Services
> > which have a shutdown process which can be invoked when the servlets
destroy()
> > method is called in order to shutdown the singletons.
>
> Ah.  Interesting.  This technique would work but would require the
'restart'
> (there's that word again) the whole application.
>
> ... at this point I think it might make sense just to restart Tomcat as
shutting
> down and restarting the app would take just as long as a full restart.
>
> It is a shame because there is a lot of potential in just reloading that
one
> class.
>
> > Sadly, I have to admit that the Turbine Services framework shutdown code
is
> > currently broken and has been for some time now...it needs to be
re-written...
>
> Are you saying that the theory is broken or just Turbine's impl?
>
> Kevin
>
> - --
> Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED] )
>  Location - San Francisco, CA, Cell - 415.595.9965
> Jabber - [EMAIL PROTECTED],  Web - http://relativity.yi.org/
>
> Windows 95 - A 32 bit extension to a 16 bit shell for a 8 bit operating
system
> designed for 4 bit computers by a 2 bit company that can't stand 1 bit of
> competition.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
>
> iD8DBQE8AfRrAwM6xb2dfE0RAuB1AJ0aAkQbAp5lkmnUMOVJ0BG0Ipf6YwCghsRo
> +avbgG+W5aqsXELI1RKaPcI=
> =Aq5S
> -END PGP SIGNATURE-
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Javascript in JSP.

2001-11-26 Thread Nick Betteridge

As a user, I would welcome this.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




FW: Tomcat 3.3 Document Bug

2001-11-26 Thread GOMEZ Henri


>-Original Message-
>From: OGAWA, Motoyuki [mailto:[EMAIL PROTECTED]]
>Sent: Monday, November 26, 2001 2:41 PM
>To: [EMAIL PROTECTED]
>Subject: Tomcat 3.3 Document Bug
>
>
>Hello, My name is Ogawa, Motoyuki.  
>I am a Java engineer in Tokyo, Japan.  
>
>I found a bug in the Tomcat 3.3 document.  It says: 
>
>http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-h
>owto.html
>> When Tomcat starts up it will automatically generate a configuration
>> file for Apache in TOMCAT_HOME/conf/jserv/tomcat-apache.conf. 
>
>But I cannot find the configuration file.  Tomcat 3.2 has it.  
>I guess its description remains as the Tomcat 3.2 document.  
>
>--
>OGAWA, Motoyuki ([EMAIL PROTECTED])
>Daiwa Institute of Research Ltd. 
>Information Technology Center
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Javascript in JSP.

2001-11-26 Thread Bob Lee

I modified Jasper to support Javascript scriptlets and expressions in JSPs using 
Rhino. Should I contribute the code?

The reason I'm asking is that I'm not sure how you guys would feel about a Mozilla 
dependency.

I would have used IBM's BSF, but the license is more strict, it still uses Rhino, and 
frankly I don't think the added languages would provide enough value to offset the 
nastiness in the API.

Thanks and I'm sorry if this is the wrong list to post this on,
Bob 



DO NOT REPLY [Bug 5030] - MountJk /blah/*.jsp doesn't understand .jsp;jsessionid=

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5030

MountJk /blah/*.jsp doesn't understand .jsp;jsessionid=

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 05:18 ---
The following code in jk_uriworker_map.c near the beginning of map_uri_to_worker
removes the ";jsessionid" from the URI:

char *clean_uri=NULL;
char *url_rewrite = strstr(uri, JK_PATH_SESSION_IDENTIFIER);

if(url_rewrite) {
clean_uri = jk_pool_strdup(&uw_map->tp,uri);
url_rewrite = strstr(clean_uri, JK_PATH_SESSION_IDENTIFIER);
*url_rewrite = '\0';
uri = clean_uri;
}

With Apache 1.3.22 + mod_jk + Tomcat 3.3, I can successfully execute the
"security" example in the examples webapp with cookies turned off.  If your
mod_jk is up to date, the cause of the problem isn't that mod_jk doesn't
understand ";jsessionid".  Reopen with more details if there is still a
problem.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4559] - Problems with trailing slash when using Apache/Tomcat

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=4559

Problems with trailing slash when using Apache/Tomcat





--- Additional Comments From [EMAIL PROTECTED]  2001-11-26 02:25 ---
Even if this is not in the specification, both Apache and Tomcat resolved the 
trailing slash issue. I believe that a feature which doesn't appear when they 
are working together is a bug.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5078] New: - org.apache.catalina.connector.http.HttpRequestStream.close() method is too strict - it does not allow to close the stream twice

2001-11-26 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5078

org.apache.catalina.connector.http.HttpRequestStream.close() method is too strict - it 
does not allow to close the stream twice

   Summary: org.apache.catalina.connector.http.HttpRequestStream.clo
se() method is too strict - it does not allow to close
the stream twice
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: HTTP/1.1 Connector
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


org.apache.catalina.connector.http.HttpRequestStream.close() method is too 
strict - it does not allow to close the stream twice. The problem is that many 
third party code close the stream several times (for example, Sun's JAXB)... I 
can eliminate it in my code, but not in others'.

public void close()
throws IOException {


//  this is too strict
// can we simply return?
if (closed)
throw new IOException(sm.getString("requestStream.close.closed"));

if (chunk) {

while (!endChunk) {
int b = read();
if (b < 0)
break;
}

} else {

if (http11 && (length > 0)) {
while (count < length) {
int b = read();
if (b < 0)
break;
}
}

}

closed = true;

}

Thank you.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: