DO NOT REPLY [Bug 5376] New: - error stopping tomcat with Ajp12

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5376.
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=5376

error stopping tomcat with Ajp12

   Summary: error stopping tomcat with Ajp12
   Product: Tomcat 3
   Version: 3.3 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


error stopping tomcat with Ajp12

java.net.connectException:connection refused:connect

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




DO NOT REPLY [Bug 5376] - error stopping tomcat with Ajp12

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5376.
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=5376

error stopping tomcat with Ajp12

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|Jasper  |Connectors
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 06:20 ---
java.net.connectException:connection refused:connect indicates that no one
is listening on the port requested.  If Tomcat was not started, or did not
fully startup due to an error, this would be expected result and is not
an indication of a bug.

If there is an problem beyond this, please investigate the problem further and
provide enough details to duplicate the problem so it can be diagnosed.

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




DO NOT REPLY [Bug 5379] New: - j-t-c webapps java can not compile

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5379.
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=5379

j-t-c webapps java can not compile

   Summary: j-t-c webapps java can not compile
   Product: Tomcat 4
   Version: Nightly Build
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: Major
  Priority: Other
 Component: AJP Connector
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Some system particulars:
shaka: uname -a
SunOS shaka 5.8 Generic_108529-12 i86pc i386 i86pc
shaka: java -version
java version 1.4.0-beta3
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
shaka: gcc -v
Reading specs from /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

Configuring as:
./configure --with-apr=/home/bpm/compile_area/httpd-2.0/srclib/apr \
--with-apxs=/opt/apache2/bin/apxs \
--enable-java \
--with-tomcat=/opt/jakarta-tomcat \
--enable-debug

/usr/j2se/bin/javac  -d . -classpath
/opt/jakarta-tomcat/common/lib/servlet.jar:/opt/jakarta-tomcat/server/lib/catalina.jar:${CLASSPATH}
\
Constants.java WarpConfigurationHandler.java WarpConnection.java
WarpConnector.java WarpEngine.java WarpHost.java WarpLogger.java WarpPacket.java
WarpRequest.java WarpRequestHandler.java WarpResponse.java WarpCertificates.java
WarpSSLData.java
WarpConnector.java:80: org.apache.catalina.connector.warp.WarpConnector should
be declared abstract; it does not define
setFactory(org.apache.catalina.ServerSocketFactory) in
org.apache.catalina.connector.warp.WarpConnector
public class WarpConnector implements Connector, Lifecycle, Runnable {
   ^
Note: WarpConnector.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
1 error
gmake[2]: *** [warp.jar] Error 1
gmake[2]: Leaving directory
`/home/bpm/compile_area/cvs_jakarta/jakarta-tomcat-connectors/webapp/java'
gmake[1]: Exiting directory java
gmake[1]: *** [template] Error 2
gmake[1]: Leaving directory
`/home/bpm/compile_area/cvs_jakarta/jakarta-tomcat-connectors/webapp'
gmake: *** [java-build] Error 2
shaka: 


Quick observation shows that the java code from the j-t-c/webapp/java directory
is way out of sync with the jakarta-tomcat-4.0 code.

Meaning that the WarpConnector code does not match the Jakarta-tomcat-4.0 code. 

Looking for ServerSocketFactory in jakarta-tomcat-4.0:

shaka: cd ../../jakarta-tomcat-4.0/
shaka: find . -name ServerSocketFactory.java
./catalina/src/share/org/apache/catalina/ServerSocketFactory.java
./catalina/src/share/org/apache/catalina/net/ServerSocketFactory.java

So which one?

Why is code checked in that can not compile?

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




Another...java.lang.LinkageError:loader constraints violated

2001-12-12 Thread Antony Bowesman

Hi,

I have found a number of this error in the archive but no answer.

From a standard 4.0.1 distribution I place xalan.jar in the webapps lib
directory for this webapp and I get the error, however, if I move
xalan.jar to %CATALINA_HOME%/lib the problem does not occur.  I can't
figure out why this is happening.

Any ideas.  Error below.

Antony


root cause 

java.lang.LinkageError: loader constraints violated when linking
org/xml/sax/ErrorHandler class
at
com.teamware.phoenix.presentation.dispatcher.DefaultValues.(DefaultValues.java:95)
at
com.teamware.phoenix.presentation.dispatcher.DispatchMapper.clear(DispatchMapper.java:116)
at
com.teamware.phoenix.presentation.dispatcher.DispatchMapper.init(DispatchMapper.java:90)
at
com.teamware.phoenix.presentation.InitializePresentation.init(InitializePresentation.java:150)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:87)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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.StandardContextValve.invoke(StandardContextValve.java:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
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:566)
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 unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 5383] New: - /etc/rc.d/init.d/tomcat4 on RedHat 6.1 fails

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5383.
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=5383

/etc/rc.d/init.d/tomcat4 on RedHat 6.1 fails

   Summary: /etc/rc.d/init.d/tomcat4 on RedHat 6.1 fails
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The script tries to execute:

 daemon --user $TOMCAT_USER $TOMCAT_SCRIPT start

or 

 daemon --user $TOMCAT_USER $TOMCAT_SCRIPT stop

but the daemon function in my /etc/rc.d/init.d/functions script does not accept 
the --user argument.

The workaround is to remove --user $TOMCAT_USER from 
the /etc/rc.d/init.d/tomcat4 script, but I wonder if this may cause potential 
security problems?

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




DO NOT REPLY [Bug 5353] - Characters with accents not displayed correctly in Tomcat 3.3

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5353.
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=5353

Characters with accents not displayed correctly in Tomcat 3.3

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 09:06 ---
It still doesn't work for me. Running on Linux/ Tomcat 3.3 last nightly build

I try:

%@page contentType=text/html; charset=ISO-8859-1 %
html
body
p áéíóú âêîôû /p
/body
/html

And it displays:

áéíóú âêîôû 

The curious is that if I do a 'view source', I can see the normal caracteres in 
notepad ( using IE 5.5 )

I also tried with Netscape and it didn't work ( here, 'view source' display 
wrong caracteres ).

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




[PATCH] for jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties

2001-12-12 Thread Adrian Almenar

Its just a patch for better understanding in spanish.

Cheers,

Adrian Almenar
Systems  Development Department
Conectium Limited



ApplicationResources_es.properties.diff
Description: Binary data

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


DO NOT REPLY [Bug 5218] - org.apache.jasper.JasperException: Unable to compile class for JSP

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5218.
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=5218

org.apache.jasper.JasperException: Unable to compile class for JSP

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 10:17 ---
If you look at javax.servlet.jsp.Pagecontext, you'll notice that both
handlePageException(Exception) and handlePageException(Throwable) are defined. 
Javac should be able to pick up the second method without the explicit cast. 
Either you have use a bad servelet api package, or there's something wrong with
your javac.  The same code has been generated and works for every jsp page.

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




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_es.properties

2001-12-12 Thread patrickl

patrickl01/12/12 10:25:43

  Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ApplicationResources_es.properties
  Log:
  Update Spanish resource file.
  Submitted by:   Adrian Almenar
  
  Revision  ChangesPath
  1.8   +17 -17
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties
  
  Index: ApplicationResources_es.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ApplicationResources_es.properties2001/12/11 22:54:12 1.7
  +++ ApplicationResources_es.properties2001/12/12 18:25:43 1.8
  @@ -1,5 +1,5 @@
  -application.title=Configuraci\u00f3n de Servidor de Tomcat
  -errors.header=h3font color=redFallos de Validaci\u00f3n/font/h3Debe 
correctar los fallos siguientes antes de proceder:ul
  +application.title=Configuraci\u00f3n del Servidor Tomcat
  +errors.header=h3font color=redFallos de Validaci\u00f3n/font/h3Debe 
corregir los fallos siguientes antes de proceder:ul
   errors.footer=/ulhr
   error.login=liNombre de usuario inv\u00e1lido o contrase\u00f1a inv\u00e1lida/li
   prompt.username=Nombre de Usuario
  @@ -9,24 +9,24 @@
   button.save=Guardar
   button.change=Cambiar
   button.cancel=Cancelar
  -login.enter=Introduzca un nombre de usuario y una contrase\u00f1a que empezar una 
sesi\u00f3n nueva
  -login.changeLanguage=Cambie el idioma
  -index.success=\u00a1Autenticaci\u00f3n tiene \u00e9xito!
  -index.logout=Para terminar esta sesi\u00f3n, pulse
  +login.enter=Introduzca un nombre de usuario y una contrase\u00f1a para iniciar una 
nueva sesi\u00f3n 
  +login.changeLanguage=Cambio de idioma
  +index.success=\u00a1Autenticaci\u00f3n \u00e9xitosa!
  +index.logout=Para finalizar esta sesi\u00f3n, presione
   index.here=aqu\u00ed
  -error.login=Nombre de usuario invalido o contrase\u00f1a invalida
  -error.tryagain=Para intentar de nuevo, pulse
  +error.login=Nombre de usuario o contrase\u00f1a invalida
  +error.tryagain=Para intentar de nuevo, presione
   error.here=aqu\u00ed
   prompt.someText=Alg\u00fan Texto
   prompt.moreText=M\u00e1s Texto
   sample.someText.required=li\u00abAlg\u00fan Texto\u00bb no puede ser 
vac\u00edo/li
   sample.moreText.required=li\u00abM\u00e1s Texto\u00bb no puede ser vac\u00edo/li
  -save.success=\u00a1Guardar tiene \u00e9xito!
  -server.heading=Tomcat Servidor
  -server.portnumber=Numero de acceso
  -server.debuglevel=Ponga a punto llano
  -server.shutdown=Parada normal
  -error.portNumberText.required=liPortNumber no puede ser vacio./li
  -error.shutdownText.length=liEl texto de la parada normal debe ser caracteres del 
atleast 6!/li
  -error.portNumber.format=liPortNumber no un numero entero valido! /li
  -error.portNumber.range=liPortNumber se parece fuera de rango. El rango valido es 
1-65535./li
  +save.success=\u00a1Guardar fue \u00e9xitoso!
  +server.heading=Servidor de Tomcat
  +server.portnumber=Numero de Puerto
  +server.debuglevel=Nivel de Depuracion
  +server.shutdown=Detener
  +error.portNumberText.required=liEl numero del puerto no puede estar vacio./li
  +error.shutdownText.length=liEl texto de la para Detener debe ser de al menos 6 
caracteres!/li
  +error.portNumber.format=liEl numero de puerto es un entero no valido! /li
  +error.portNumber.range=liEl numero de puerto esta fuera del rango. El rango 
valido es 1-65535./li
  
  
  

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




Re: [PATCH] for jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties

2001-12-12 Thread Patrick Luby

Adrian,

¡Muchas gracias! Acabo de comitar tu patch.

Patrick

Adrian Almenar wrote:
 
 Its just a patch for better understanding in spanish.
 
 Cheers,
 
 Adrian Almenar
 Systems  Development Department
 Conectium Limited
 
   ---
   Name: 
ApplicationResources_es.properties.diff
ApplicationResources_es.properties.diffType: unspecified type 
(application/octet-stream)
   Encoding: quoted-printable
 
Part 1.3Type: Plain Text (text/plain)

-- 
_
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:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




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

2001-12-12 Thread kinman

kinman  01/12/12 10:43:17

  Modified:jasper/src/share/org/apache/jasper/compiler
TagLibraryInfoImpl.java
  Log:
  PR: 5123
  Submitted by: [EMAIL PROTECTED]
  - In the variable element of a TLD, the default value for variable-class should
be java.lang.String.
  
  Revision  ChangesPath
  1.25  +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- TagLibraryInfoImpl.java   2001/10/05 18:48:04 1.24
  +++ TagLibraryInfoImpl.java   2001/12/12 18:43:16 1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.24 2001/10/05 18:48:04 kinman Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/10/05 18:48:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.25 2001/12/12 18:43:16 kinman Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/12/12 18:43:16 $
*
* The Apache Software License, Version 1.1
*
  @@ -468,7 +468,7 @@
   TagVariableInfo createVariable(TreeNode elem) {
   String nameGiven = null;
   String nameFromAttribute = null;
  - String className = null;
  + String className = java.lang.String;
boolean declare = true;
int scope = VariableInfo.NESTED;
   
  
  
  

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




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

2001-12-12 Thread kinman

kinman  01/12/12 10:47:24

  Modified:jasper/src/share/org/apache/jasper/compiler Tag:
tomcat_40_branch TagLibraryInfoImpl.java
  Log:
  PR: 5123
  Submitted by: [EMAIL PROTECTED]
  - In the variable element of a TLD, the default value for variable-class should
be java.lang.String.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.23.2.2  +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.23.2.1
  retrieving revision 1.23.2.2
  diff -u -r1.23.2.1 -r1.23.2.2
  --- TagLibraryInfoImpl.java   2001/10/05 18:49:53 1.23.2.1
  +++ TagLibraryInfoImpl.java   2001/12/12 18:47:24 1.23.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.23.2.1 2001/10/05 18:49:53 kinman Exp $
  - * $Revision: 1.23.2.1 $
  - * $Date: 2001/10/05 18:49:53 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.23.2.2 2001/12/12 18:47:24 kinman Exp $
  + * $Revision: 1.23.2.2 $
  + * $Date: 2001/12/12 18:47:24 $
*
* The Apache Software License, Version 1.1
*
  @@ -468,7 +468,7 @@
   TagVariableInfo createVariable(TreeNode elem) {
   String nameGiven = null;
   String nameFromAttribute = null;
  - String className = null;
  + String className = java.lang.String;
boolean declare = true;
int scope = VariableInfo.NESTED;
   
  
  
  

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




DO NOT REPLY [Bug 5123] - optional value variable-class is expected.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5123.
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=5123

optional value variable-class is expected.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 10:47 ---
Fixed in nightly build 20011213

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




DO NOT REPLY [Bug 5308] - jsp:include ignores flush attribute

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5308.
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=5308

jsp:include ignores flush attribute

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 11:07 ---
The attribute is picked up by the compiler and passed to
org.apache.jasper.runtime.JspRuntimeLibrary.include.  I have verified that it
indeed works (in the nightly build).  Note also that jasper was modified
recently so that the flush attribute is ignored, if jsp:include is from a
BodyConetent.

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




DO NOT REPLY [Bug 5254] - JspC Error when invoked from ANT

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5254.
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=5254

JspC Error when invoked from ANT

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 11:15 ---
If you want to invoke org.apache.jasper.JspC, directly, make sure that you set
up the classpath correctly (like that in jasper.sh).  Including j2ee.jar is
trouble, since you may pick up incompatible classes.

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




DO NOT REPLY [Bug 5353] - Characters with accents not displayed correctly in Tomcat 3.3

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5353.
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=5353

Characters with accents not displayed correctly in Tomcat 3.3





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 11:29 ---
One more good information.

If I create an HTML page with the same contents it works.

If I create a servlet that do something like:


public void doGet(HttpServletRequest req, HttpServletResponse res) 
throws IOException {

PrintWriter out = res.getWriter();
out.println(HTML);
out.println(BODY);
out.println(áéíóú âêîôû);
out.println(/BODY);
out.println(/HTML);
out.close();

}

It works too !!

The problem is definitely with JSP.

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




DO NOT REPLY [Bug 5285] - JSP File Not Found

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5285.
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=5285

JSP File Not Found





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 11:30 ---
I still don't a test case that let me reproduce the problem.  Can you come up
with a small test case and put all the files in a .war?

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




DO NOT REPLY [Bug 5354] - destroy() method in jsp file throws exception

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5354.
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=5354

destroy() method in jsp file throws exception

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 11:46 ---
This is not a bug, but a feature!  Jasper runtime choose to make the method
destroy final so that it won't be overrided.  In general, it is a bad idea to
override methods defined in HttpServlet.  If this wasn't your intention, pick
another name!

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




ajpv12 socket closure

2001-12-12 Thread Keith Wannamaker

I've been debugging a socket problem in ajpv12 (NT) where bits
are being written by Tomcat to the socket (back to mod_jk), but
jk's read fails with a SHUTDOWN.  It's as if the bits don't 
quite make it onto the wire, and the socket closure is a hard close.

I thought the point of so_linger was to specify the amount of time
to try to send the queue bits onto the wire prior to closing the socket.

Wouldn't this indicate that the present value (100) is too small?

The relevant t-d thread is 
http://w6.metronet.com/~wjm/tomcat/2000/Sep/msg00151.html

Thanks for any info,
Keith

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




DO NOT REPLY [Bug 5390] New: - jsp-file and load-on-startup and init-param does not work.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5390.
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=5390

jsp-file and load-on-startup and init-param does not work.

   Summary: jsp-file and load-on-startup and init-param does not
work.
   Product: Tomcat 3
   Version: 3.3 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The following code in the web.xml does not fire up the jsp on startup.  In the 
web.dtd, it states:

!-- The servlet element contains the declarative data of a
servlet. If a jsp-file is specified and the load-on-startup element is
present, then the JSP should be precompiled and loaded. --

No matter what I did, tomcat would not compile and load the jsp on startup.  I 
have an jspInit() method in the jsp which grabs the init parmameters and 
nothing happens.  I notice in the logs that the LoadOnStartupInterceptor: 
Initializing JSP with JspWrapper is invoked but nothing happens.  No compile 
is done until I call it manually with a browser.  And even when I do, the 
jspInit method fires but there are no config.getInitParameter(param1) there?  
Please advise.  Thank you.  I noticed there is a bug id 4518 with a similar 
problem, but that was for tomcat 4.

servlet
servlet-nameloadonstartup/servlet-name
jsp-file/loadonstartup.jsp/jsp-file
init-param
param-nameparam1/param-name
param-valueValueOfParam1/param-value
/init-param
load-on-startup1/load-on-startup
/servlet


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




DO NOT REPLY [Bug 5176] - getPathInfo() return wrong path info

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5176.
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=5176

getPathInfo() return wrong path info

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:11 ---
No reproducible test case has been provided, despite repeated requests.

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




DO NOT REPLY [Bug 5189] - Tomcat does not recognize tag-class changes in .TLD file

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5189.
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=5189

Tomcat does not recognize tag-class changes in .TLD file

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:14 ---
Tomcat does not automatically recompile JSP pages when a TLD is changed. 
Therefore, the old generated class name was still used, and this is expected
behavior.

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




DO NOT REPLY [Bug 5391] New: - Can't change the ClassLoader for WebappLoader using loaderClass

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5391.
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=5391

Can't change the ClassLoader for WebappLoader using loaderClass

   Summary: Can't change the ClassLoader for WebappLoader using
loaderClass
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The documentation says that it is possible to change the WebappLoader's default
class loader org.apache.catalina.loader.WebappClassLoader using loaderClass
attribute in Loader config. e.g:
Loader className=org.apache.catalina.loader.WebappLoader
loaderClass=MyClassLoader / 

However, this has no effect. I'm not sure but the reason might be in
WebappLoader's code. The method setLoaderClass does not take any arguments:

/**
  * Set the ClassLoader class name.
  *
  * @param loaderClass The new ClassLoader class name
  */
  public void setLoaderClass() {
 this.loaderClass = loaderClass;
  }

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




DO NOT REPLY [Bug 5198] - one Apache with two Tomcats via warp failed

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5198.
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=5198

one Apache with two Tomcats via warp failed





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:15 ---
Reclassify as an enhancement.

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




DO NOT REPLY [Bug 5319] - AccessLogValve does not resolve hostname

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5319.
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=5319

AccessLogValve does not resolve hostname





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:20 ---
Even if your TOmcat configuration is set up correctly, you will still get IP
addresses instead of host names if your DNS environment is not set up correctly.
 Can you confirm that a stand-alone application can get a host name via
InetAddress.getByName() when running on the same computer that Tomcat runs on?

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




DO NOT REPLY [Bug 5368] - StandardContextValve changes session state from new to old too late for other Valves

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5368.
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=5368

StandardContextValve changes session state from new to old too late for other Valves

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||tomcat-
   ||[EMAIL PROTECTED]
 AssignedTo|tomcat- |[EMAIL PROTECTED]
   |[EMAIL PROTECTED]  |



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:36 ---
Doing something like this makes sense to me.  Implementing it would seem to
involve the following:

* Modify o.a.c.Pipeline to include a method that lets
  you stick a Valve at the head of the chain instead
  of the end.

* Modify o.a.c.core.StandardPipeline to implement this

* Modify o.a.c.startup.ContextConfig to add a new valve
  containing the session.access() call.

Does this sound like a reasonable approach?

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




DO NOT REPLY [Bug 5319] - AccessLogValve does not resolve hostname

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5319.
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=5319

AccessLogValve does not resolve hostname





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:38 ---
As I already noted in this bug, 
   InetAddress.getByName(request.getRemoteAddr()).getHostName()
works correctly in the servlet that is invoked.

therefore the DNS name is being retrieved by Java, but the AccessLogValve AND 
request.getRemoteHost() do not return the correct name.

I created my own access log(within my servlet) for my servlets under 3.2 and 
ported to 4.0. My log, which uses the above InetAddress.getByName(), gives the 
DNS name, but the AccessLogValve log always gives the ip address for the same 
request to my servlet.

I would like to use the AccessLogValve as I am sure it is 100 times more 
efficient than my log and it also logs non-servlet requests.

thanks,
Charlie

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




DO NOT REPLY [Bug 5143] - Please allow to specify the cipher set for HTTPS connectors

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5143.
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=5143

Please allow to specify the cipher set for HTTPS connectors





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:42 ---
In the mean time, filtering based on the cipher suite can be easily implemented
in a Valve (inside Catalina) or as a Filter (inside the application), since the
cipher suite negotiated with the client, and the key size, are visible as
request attributes in Servlet 2.3.

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-12-12 Thread craigmcc

craigmcc01/12/12 12:53:02

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  Allow the webapp class loader to be overridden.
  
  PR: Bugzilla #5391
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.20  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- WebappLoader.java 2001/11/25 21:06:23 1.19
  +++ WebappLoader.java 2001/12/12 20:53:02 1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.19 2001/11/25 21:06:23 glenn Exp $
  - * $Revision: 1.19 $
  - * $Date: 2001/11/25 21:06:23 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.20 2001/12/12 20:53:02 craigmcc Exp $
  + * $Revision: 1.20 $
  + * $Date: 2001/12/12 20:53:02 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.19 $ $Date: 2001/11/25 21:06:23 $
  + * @version $Revision: 1.20 $ $Date: 2001/12/12 20:53:02 $
*/
   
   public class WebappLoader
  @@ -420,7 +420,7 @@
*
* @param loaderClass The new ClassLoader class name
*/
  -public void setLoaderClass() {
  +public void setLoaderClass(String loaderClass) {
   
   this.loaderClass = loaderClass;
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-12-12 Thread craigmcc

craigmcc01/12/12 12:54:27

  Modified:catalina/src/share/org/apache/catalina/loader Tag:
tomcat_40_branch WebappLoader.java
  Log:
  Port setLoaderClass() fix to 4.0.x branch.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.12.2.4  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.12.2.3
  retrieving revision 1.12.2.4
  diff -u -r1.12.2.3 -r1.12.2.4
  --- WebappLoader.java 2001/11/03 02:28:17 1.12.2.3
  +++ WebappLoader.java 2001/12/12 20:54:27 1.12.2.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.12.2.3 2001/11/03 02:28:17 remm Exp $
  - * $Revision: 1.12.2.3 $
  - * $Date: 2001/11/03 02:28:17 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.12.2.4 2001/12/12 20:54:27 craigmcc Exp $
  + * $Revision: 1.12.2.4 $
  + * $Date: 2001/12/12 20:54:27 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.12.2.3 $ $Date: 2001/11/03 02:28:17 $
  + * @version $Revision: 1.12.2.4 $ $Date: 2001/12/12 20:54:27 $
*/
   
   public class WebappLoader
  @@ -420,7 +420,7 @@
*
* @param loaderClass The new ClassLoader class name
*/
  -public void setLoaderClass() {
  +public void setLoaderClass(String loaderClass) {
   
   this.loaderClass = loaderClass;
   
  
  
  

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




DO NOT REPLY [Bug 5391] - Can't change the ClassLoader for WebappLoader using loaderClass

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5391.
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=5391

Can't change the ClassLoader for WebappLoader using loaderClass

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 12:55 ---
Fixed in nightly build 20011213.  Will be fixed in Tomcat 4.0.2 release.

(Some days open source can be *so* embarrassing :-)

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




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_msg_ajp.c jk_msg_buff.c jk_msg_buff.h

2001-12-12 Thread costin

costin  01/12/12 13:23:57

  Modified:jk/native2/include jk_msg.h
  Added:   jk/native2/common jk_msg_ajp.c
  Removed: jk/native2/common jk_msg_buff.c jk_msg_buff.h
  Log:
  Better abstraction for message serializing/deserializing, protecting the internal
  data ( the buf is no longer used/useable outside ).
  
  This is supposed to allow other encodings/protocols to be added with minimal
  effort and without changes in mod_jk.
  In addition, this is supposed to work with JNI as well - each 'appendFoo' can
  be translated to converting to java and saving it in a jobject[], with
  send() implemented as a jni call.
  
  It also cleans up a lot of code that used 'dirty' tricks.
  
  Revision  ChangesPath
  1.2   +75 -24jakarta-tomcat-connectors/jk/native2/include/jk_msg.h
  
  Index: jk_msg.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_msg.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_msg.h  2001/12/01 22:30:57 1.1
  +++ jk_msg.h  2001/12/12 21:23:57 1.2
  @@ -61,14 +61,25 @@
   #include jk_global.h
   #include jk_logger.h
   #include jk_pool.h
  -#include jk_msg_buff.h
  +#include jk_endpoint.h
  +#include jk_service.h
   
   #ifdef __cplusplus
   extern C {
   #endif /* __cplusplus */
   
  +struct jk_msg;
  +typedef struct jk_msg jk_msg_t;
  +
  +struct jk_endpoint;
  +struct jk_ws_service;
  +struct jk_logger;
  +
  +#define DEF_BUFFER_SZ (8 * 1024)
  +#define AJP13_MAX_SEND_BODY_SZ  (DEF_BUFFER_SZ - 6)
  +
   /**
  - * Abstract interface to jk marshalling. Different encodings and
  + * Abstract interface to marshalling. Different encodings and
* communication mechanisms can be supported.
*
* This object is recyclable, but is not thread safe - it can
  @@ -94,14 +105,6 @@
*/
   int id;

  -/** List of properties. The handler can be configured.
  - *  ( password for login, etc ).
  - */
  -/*
  -  char **supportedProperties;
  -  jk_map_t *properties;
  -*/
  -
   /*
* Prepare the buffer for a new invocation 
*/
  @@ -116,37 +119,85 @@
* Dump the buffer header
*   @param err Message text
*/
  -void (*dump)(struct jk_msg *_this, char *err);
  +void (*dump)(struct jk_msg *_this, struct jk_logger *log, char *err);
   
  -void (*appendByte)(struct jk_msg *_this, unsigned char val);
  +int (*appendByte)(struct jk_msg *_this, unsigned char val);
   
  -void (*appendBytes)(struct jk_msg *_this, 
  -   const unsigned char * param,
  -   const int len);
  +int (*appendBytes)(struct jk_msg *_this, 
  +const unsigned char * param,
  +const int len);
   
  -void (*appendInt)(struct jk_msg *_this, 
  -  const unsigned short val);
  +int (*appendInt)(struct jk_msg *_this, 
  + const unsigned short val);
   
  -void (*appendLong)(struct jk_msg *_this, 
  +int (*appendLong)(struct jk_msg *_this, 
  const unsigned long val);
   
  -void (*appendString)(struct jk_msg *_this, 
  +int (*appendString)(struct jk_msg *_this, 
const char *param);
   
   unsigned char (*getByte)(struct jk_msg *_this);
   
   unsigned short (*getInt)(struct jk_msg *_this);
   
  +/** Look at the next int, without reading it
  + */
  +unsigned short (*peekInt)(struct jk_msg *_this);
  +
   unsigned long (*getLong)(struct jk_msg *_this);
  +
  +/** Return a string. 
  +The buffer is internal to the message, you must save
  +or make sure the message lives long enough.
  + */ 
  +unsigned char *(*getString)(struct jk_msg *_this);
  +
  +/** Return a byte[] and it's length.
  +The buffer is internal to the message, you must save
  +or make sure the message lives long enough.
  + */ 
  +unsigned char *(*getBytes)(struct jk_msg *_this, int *len);
  +
  +
  +/*
  + * Receive a message from endpoint
  + */
  +int (*receive)(jk_msg_t *_this, struct jk_endpoint *ae );
  +
  +/*
  + * Send a message to endpoint
  + */
  +int (*send)(jk_msg_t *_this, struct jk_endpoint *ae );
   
  -char * (*getString)(struct jk_msg *_this);
  - 
  +/** 
  + * Special method. Will read data from the server and add them as
  + * bytes. It is equivalent with jk_requtil_readFully() in a buffer
  + * and then jk_msg_appendBytes(), except that we use directly the
  + * internal buffer.
  + *
  + * Returns -1 on error, else number of bytes read
  + */
  +int (*appendFromServer)(struct jk_msg *_this,
  +struct jk_ws_service *r,
  +struct 

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_handler.h

2001-12-12 Thread costin

costin  01/12/12 13:25:56

  Modified:jk/native2/include jk_handler.h
  Log:
  Finalized a working version of jk_handler.
  
  Jk is based on messages, and jk_handler is the interface used to get
  ( custom ) message handlers.
  
  Revision  ChangesPath
  1.3   +45 -11jakarta-tomcat-connectors/jk/native2/include/jk_handler.h
  
  Index: jk_handler.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_handler.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_handler.h  2001/12/06 22:48:49 1.2
  +++ jk_handler.h  2001/12/12 21:25:56 1.3
  @@ -77,30 +77,64 @@
   #include jk_uriMap.h
   #include jk_worker.h
   #include jk_endpoint.h
  +#include jk_msg.h
   
   #ifdef __cplusplus
   extern C {
   #endif /* __cplusplus */
   
  +/* Return codes from the handler method
  + */
   
  -typedef int (JK_METHOD *jk_handle_in_t)(jk_msg_buf_t   *msg,
  -jk_ws_service_t  *r,
  -jk_endpoint_t *ae,
  -jk_logger_t*l);
  -
  -typedef int (JK_METHOD *jk_handle_out_t)(jk_msg_buf_t   *msg,
  - jk_ws_service_t  *r,
  - jk_endpoint_t *ae,
  - jk_logger_t*l);
  +/**
  + * Message does not have a response, jk will continue
  + * to wait.
  + */
  +#define JK_HANDLER_OK0
  +
  +/** Message requires a response. The handler will prepare
  + *  the response in e-post message.
  + */
  +#define JK_HANDLER_RESPONSE  1
  +
  +/** This is the last message ( in a sequence ). The original
  + *  transaction is now completed.
  + */
  +#define JK_HANDLER_LAST  2
  +
  +/** An error ocurred during handler execution. The processing
  + *  will be interrupted, but the connection remains open.
  + *  After an error handler we should continue receiving messages,
  + *  but ignore them and send an error message on the first ocassion.
  + */
  +#define JK_HANDLER_ERROR 3
  +
  +/** A fatal error ocurred, we should close the channel
  + *  and report the error. This should be used if something unexpected,
  + *  from which we can't recover happens. ( for example an unexpected packet,
  + *  an invalid code, etc ).
  + */
  +#define JK_HANDLER_FATAL 4
  +
  +struct jk_msg;
  +struct jk_ws_service;
  +struct jk_endpoint;
  +struct jk_logger;
  +
  +typedef int (JK_METHOD *jk_handler_callback)(struct jk_msg *msg,
  + struct jk_ws_service *r,
  + struct jk_endpoint *ae,
  + struct jk_logger *l);
   
   struct jk_handler;
   typedef struct jk_handler jk_handler_t;
   
   struct jk_handler {
   struct jk_workerEnv *workerEnv;
  -
  -int (*init)( jk_worker_t *w );
   
  +char *name;
  +int messageId;
  +jk_handler_callback callback;
   };
   
   #ifdef __cplusplus
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_handler_response.c jk_handler_logon.c jk_handler_discovery.c

2001-12-12 Thread costin

costin  01/12/12 13:34:47

  Modified:jk/native2/common jk_handler_response.c jk_handler_logon.c
jk_handler_discovery.c
  Log:
  Rewrote the existing handlers to use the new interface.
  
  Note that each file will have a factory method that will create a map containing
  all the handlers it supports ( not perfect, it can be done clener, but this is the
  first round )
  
  As before, the handler will process the message and optionally generate a reply
  ( like the original JK_GET_CHUNK message )
  
  Using messages have the benefit that we don't need round-trips.
  The disadvantage is that RPC is more familiar to people, but if we can do soap we
  can probably handle this as well. It is possible to emulate one over the other.
  
  Revision  ChangesPath
  1.5   +192 -149  
jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c
  
  Index: jk_handler_response.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_handler_response.c 2001/12/06 22:54:44 1.4
  +++ jk_handler_response.c 2001/12/12 21:34:47 1.5
  @@ -57,112 +57,36 @@
   
   #include jk_global.h
   #include jk_service.h
  -#include jk_msg_buff.h
  +#include jk_msg.h
   #include jk_env.h
   #include jk_requtil.h
   #include jk_env.h
   #include jk_handler.h
   #include jk_endpoint.h
   
  -static int ajp_unmarshal_response(jk_msg_buf_t   *msg,
  -  jk_ws_service_t  *s,
  -  jk_endpoint_t *ae,
  -  jk_logger_t*l);
  -
  -int ajp_handle_sendChunk(jk_msg_buf_t   *msg,
  - jk_ws_service_t  *r,
  - jk_endpoint_t *ae,
  - jk_logger_t*l);
  -
  -
  -int ajp_handle_startResponse(jk_msg_buf_t   *msg,
  - jk_ws_service_t  *r,
  - jk_endpoint_t *ae,
  - jk_logger_t*l);
  -
  -int ajp_handle_getChunk(jk_msg_buf_t   *msg,
  - jk_ws_service_t  *r,
  - jk_endpoint_t *ae,
  - jk_logger_t*l);
  -
  -/** SEND_HEADERS handler
  +/*
  + * Write a body chunk from the servlet container to the web server
*/
  -int ajp_handle_startResponse(jk_msg_buf_t   *msg,
  - jk_ws_service_t  *r,
  - jk_endpoint_t *ae,
  - jk_logger_t*l)
  -{
  -int err;
  -
  -err=ajp_unmarshal_response(msg, r, ae, l);
  -if( err!=JK_TRUE ) {
  -l-jkLog(l, JK_LOG_ERROR, Error ajp_process_callback - 
ajp_unmarshal_response failed\n);
  -return JK_AJP13_ERROR;
  -}
  -err=r-start_response(r, r-status, r-msg, 
  -  (const char * const *)r-out_header_names,
  -  (const char * const *)r-out_header_values,
  -  r-out_headers);
  -if( err!=JK_TRUE ) {
  -l-jkLog(l, JK_LOG_ERROR, Error ajp_process_callback - start_response 
failed\n);
  -return JK_CLIENT_ERROR;
  -}
  -return JK_TRUE;
  -}
  +#define JK_AJP13_SEND_BODY_CHUNK(unsigned char)3
   
  -/** SEND_BODY_CHUNK handler
  +/*
  + * Send response headers from the servlet container to the web server.
*/
  -int ajp_handle_sendChunk(jk_msg_buf_t   *msg,
  - jk_ws_service_t  *r,
  - jk_endpoint_t *ae,
  - jk_logger_t*l)
  -{
  -int err;
  -unsigned len = (unsigned)jk_b_get_int(msg);
  +#define JK_AJP13_SEND_HEADERS   (unsigned char)4
   
  -err=r-write(r, jk_b_get_buff(msg) + jk_b_get_pos(msg), len);
  -if( err!= JK_TRUE ) {
  -l-jkLog(l, JK_LOG_ERROR, Error ajp_process_callback - write failed\n);
  -return JK_CLIENT_ERROR;
  -}
  -
  -return JK_TRUE;
  -}
  -
  -/** SEND_BODY_CHUNK handler
  +/*
  + * Marks the end of response.
*/
  -int ajp_handle_getChunk(jk_msg_buf_t   *msg,
  -jk_ws_service_t  *r,
  -jk_endpoint_t *ae,
  -jk_logger_t*l)
  -{
  -int len = jk_b_get_int(msg);
  -
  -if(len  AJP13_MAX_SEND_BODY_SZ) {
  -len = AJP13_MAX_SEND_BODY_SZ;
  -}
  -if(len  ae-left_bytes_to_send) {
  -len = ae-left_bytes_to_send;
  -}
  -if(len  0) {
  -len = 0;
  -}
  -
  -/* the right place to add file storage for upload */
  -if ((len = ajp_read_into_msg_buff(ae, r, msg, len, l)) = 0) {
  -r-content_read += len;
  -return JK_AJP13_HAS_RESPONSE;
  -}  
  -
  -l-jkLog(l, JK_LOG_ERROR, Error ajp_process_callback - 

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_workerEnv.c

2001-12-12 Thread costin

costin  01/12/12 13:36:17

  Modified:jk/native2/common jk_workerEnv.c
  Log:
  Add logic to look for all handlers and create the dispatch table.
  
  Moved the main dispatcher logic from ajp_worker/ajp_endpoint - it is a generic
  mechanism that can be used by any worker ( of course, not required, like everything 
else )
  
  Revision  ChangesPath
  1.6   +206 -23   jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_workerEnv.c2001/12/06 23:00:44 1.5
  +++ jk_workerEnv.c2001/12/12 21:36:17 1.6
  @@ -59,7 +59,7 @@
* Description: Workers controller *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.5 $   *
  + * Version: $Revision: 1.6 $   *
***/
   
   #include jk_workerEnv.h 
  @@ -111,23 +111,16 @@
   /* Ignore it, other workers may be ok.
  return JK_FALSE; */
} else {
  - map_put(_this-worker_map, worker_list[i], w, (void *)oldw);
  -
  -if(oldw!=NULL) {
  -l-jkLog(_this-l, JK_LOG_DEBUG, 
  -   build_worker_map, removing old %s worker \n,
  -   worker_list[i]);
  -oldw-destroy(oldw, _this-l);
  -}
   if( _this-defaultWorker == NULL )
   _this-defaultWorker=w;
   }
   }
  -
  -l-jkLog(_this-l, JK_LOG_DEBUG, build_worker_map, done\n); 
   
  -l-jkLog(_this-l, JK_LOG_DEBUG,
  -   workerEnv.init() done: %d %s\n, _this-num_of_workers, 
worker_list[0]); 
  +jk_workerEnv_initHandlers( _this );
  +
  +l-jkLog(_this-l, JK_LOG_INFO,
  +   workerEnv.init() %d workers, default %s\n,
  + _this-num_of_workers, worker_list[0]); 
   return JK_TRUE;
   }
   
  @@ -164,15 +157,17 @@
   jk_logger_t *l=_this-l;
   
   if(!name) {
  -l-jkLog(l, JK_LOG_ERROR, wc_get_worker_for_name NULL name\n);
  +l-jkLog(l, JK_LOG_ERROR,
  + workerEnv.getWorkerForName() NullPointerException\n);
   return NULL;
   }
   
   rc = map_get(_this-worker_map, name, NULL);
   
  -if( rc==NULL ) {
  -l-jkLog(l, JK_LOG_ERROR, getWorkerForName: no worker found for %s \n, 
name);
  -} 
  +/* if( rc==NULL ) { */
  +/* l-jkLog(l, JK_LOG_INFO, */
  +/*  workerEnv.getWorkerForName(): no worker found for %s \n, name); */
  +/* }  */
   return rc;
   }
   
  @@ -211,6 +206,175 @@
   
   }
   
  +static void jk_workerEnv_checkSpace( jk_pool_t *pool,
  + void ***tableP, int *sizeP, int id )
  +{
  +void **newTable;
  +int i;
  +int newSize=id+4;
  +
  +if( *sizeP  id ) return;
  +/* resize the table */
  +newTable=(void **)pool-calloc( pool, newSize * sizeof( void *));
  +for( i=0; i*sizeP; i++ ) {
  +newTable[i]= (*tableP)[i];
  +}
  +*tableP=newTable;
  +*sizeP=newSize;
  +}
  +
  +static void jk_workerEnv_initHandlers(jk_workerEnv_t *_this)
  +{
  +/* Find the max message id */
  +/* XXX accessing private data... env most provide some method to get this */
  +jk_map_t *registry=_this-env-_registry;
  +int size=map_size( registry );
  +int i,j;
  +
  +for( i=0; isize; i++ ) {
  +jk_handler_t *handler;
  +jk_map_t *localHandlers;
  +int rc;
  +
  +char *name=map_name_at( registry, i );
  +if( strstr( name, handler ) == name ) {
  +char *type=name+ strlen( handler ) +1;
  +printf(XXX Found handler: %s %s\n, name, type );
  +
  +localHandlers=(jk_map_t *)_this-env-getInstance(_this-env,
  +  _this-pool,
  +  handler,
  +  type );
  +if( localHandlers==NULL ) continue;
  +
  +for( j=0; j map_size( localHandlers ); j++ ) {
  +handler=(jk_handler_t *)map_value_at( localHandlers, j );
  +jk_workerEnv_checkSpace( _this-pool,
  + (void ***)_this-handlerTable,
  + _this-lastMessageId,
  + handler-messageId );
  +   

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_serialize_ajp.c jk_handler_request.c jk_handler_shutdown.c

2001-12-12 Thread costin

costin  01/12/12 13:37:13

  Added:   jk/native2/common jk_serialize_ajp.c
  Removed: jk/native2/common jk_handler_request.c jk_handler_shutdown.c
  Log:
  Moved the 'serialization' code to a separate file.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native2/common/jk_serialize_ajp.c
  
  Index: jk_serialize_ajp.c
  ===
  /* = *
   *   *
   * 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 http://www.apache.org/.  *
   *   *
   *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 the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see http://www.apache.org/.   *
   *   *
   * = */
  
  /**
   * Serializing requests.
   *
   

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

2001-12-12 Thread costin

costin  01/12/12 13:40:53

  Modified:jk/native2/common jk_ajp14.h
  Log:
  Removed most of the stuff from ajp14, moved to individual handlers.
  
  We must start making the distinction between 'protocol' and 'api'.
  
  jk supports 'ajp13' protocol, 'jni' protocol, etc. It could also support warp
  protocol or even a (minimal) IIOP.
  
  The API is the set of messages we use - confusingly called 'ajp13', 'ajp14', etc.
  All the details about message is implemented in message handlers, which are
  independent ( or should be ) of the protocol.
  
  Revision  ChangesPath
  1.3   +14 -171   jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.h
  
  Index: jk_ajp14.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_ajp14.h2001/12/04 18:40:42 1.2
  +++ jk_ajp14.h2001/12/12 21:40:53 1.3
  @@ -58,14 +58,14 @@
   /***
* Description: Next generation bi-directional protocol handler.   *
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.2 $   *
  + * Version: $Revision: 1.3 $   *
***/
   #ifndef JK_AJP14_H
   #define JK_AJP14_H
   
   #include jk_global.h
   #include jk_mt.h
  -#include jk_msg_buff.h
  +#include jk_msg.h
   #include jk_pool.h
   #include jk_logger.h
   #include jk_service.h
  @@ -76,186 +76,29 @@
   extern C {
   #endif /* __cplusplus */
   
  -
  -#define AJP_DEF_RETRY_ATTEMPTS(1)
  -
  -#define AJP_HEADER_LEN(4)
  -#define AJP_HEADER_SZ_LEN (2)
  -#define CHUNK_BUFFER_PAD  (12)
  -
  -#define AJP13_PROTO  13
  -#define AJP13_WS_HEADER  0x1234
  -#define AJP13_SW_HEADER  0x4142  /* 'AB' */
  -
  -#define AJP13_DEF_HOST   (localhost)
  -#define AJP13_DEF_PORT   (8009)
  -#define AJP13_READ_BUF_SIZE (8*1024)
  -#define AJP13_DEF_CACHE_SZ  (1)
  -#define JK_INTERNAL_ERROR(-2)
  -#define JK_FATAL_ERROR  (-3)
  -#define JK_CLIENT_ERROR (-4)
  -#define AJP13_MAX_SEND_BODY_SZ  (DEF_BUFFER_SZ - 6)
  -
  -/*
  - * Message does not have a response (for example, JK_AJP13_END_RESPONSE)
  - */
  -#define JK_AJP13_ERROR  -1
  -/*
  - * Message does not have a response (for example, JK_AJP13_END_RESPONSE)
  - */
  -#define JK_AJP13_NO_RESPONSE0
  -/*
  - * Message have a response.
  - */
  -#define JK_AJP13_HAS_RESPONSE   1
  -
  -/*
  - * Forward a request from the web server to the servlet container.
  - */
  -#define JK_AJP13_FORWARD_REQUEST(unsigned char)2
  -
  -/*
  - * Write a body chunk from the servlet container to the web server
  - */
  -#define JK_AJP13_SEND_BODY_CHUNK(unsigned char)3
  -
  -/*
  - * Send response headers from the servlet container to the web server.
  - */
  -#define JK_AJP13_SEND_HEADERS   (unsigned char)4
  -
  -/*
  - * Marks the end of response.
  - */
  -#define JK_AJP13_END_RESPONSE   (unsigned char)5
  -
  -/*
  - * Marks the end of response.
  - */
  -#define JK_AJP13_GET_BODY_CHUNK (unsigned char)6
  -
  -/*
  - * Asks the container to shutdown
  - */
  -#define JK_AJP13_SHUTDOWN   (unsigned char)7
  -
  -/*
  - * Functions
  - */
  -int ajp13_marshal_shutdown_into_msgb(jk_msg_buf_t *msg,
  - jk_pool_t *p,
  - jk_logger_t *l);
  -
  -#define AJP14_PROTO  14
  -
  -#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)
  -
  -/*
  - * Servlet Engine Status (web server - servlet engine), what's the status of the 
servlet engine ?
  - */
  -#define AJP14_STATUS_CMD (unsigned char)0x18
  +/* Common ajp13 methods */
   
  -/*
  - * Unknown Packet Reply (web server - servlet engine),
  - * when a packet couldn't be decoded
  - */
  -#define AJP14_UNKNOW_PACKET_CMD  (unsigned char)0x1E
  -
  -
  -/*
  - * Negociation flags 
  - */
  -
  -/*
  - * web-server want context info after login
  - */
  -#define AJP14_CONTEXT_INFO_NEG  0x8000 
  -
  -/*
  - * web-server want context updates
  - */
  -#define AJP14_CONTEXT_UPDATE_NEG0x4000 
  -
  -/*
  - * web-server want compressed stream 
  - */
 

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

2001-12-12 Thread costin

costin  01/12/12 13:45:56

  Modified:jk/native2/common jk_ajp14_worker.c
  Log:
  Quite a few changes to support the separation between protocol and api and to
  use the new stuff.
  
  The 'endpoint reuse' has been abstracted in jk_objCache and is used by other
  components as well.
  
  The login phase has been changed to use only message-passing style. Apache will
  send a ping request, and then execute whatever tomcat asks him to in order to
  set up the connection.
  
  That means other login protocols could be implemented, and tomcat can use this
  phase to pass config informations ( or grab config information ).
  
  (note that the login code is broken right now, I need to change the java code
  as well. The biggest priority is getting ajp13 and the 'main' code working,
  any feature implementable by handlers can be finished after the code is stable )
  
  Revision  ChangesPath
  1.6   +331 -282  jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c
  
  Index: jk_ajp14_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_ajp14_worker.c 2001/12/06 22:54:44 1.5
  +++ jk_ajp14_worker.c 2001/12/12 21:45:55 1.6
  @@ -66,11 +66,13 @@
   #include jk_global.h
   #include jk_pool.h
   #include jk_channel.h
  -#include jk_msg_buff.h
  -#include jk_ajp14.h 
  +#include jk_msg.h
   #include jk_logger.h
  +#include jk_handler.h
   #include jk_service.h
   #include jk_env.h
  +#include jk_objCache.h
  +#include jk_ajp14.h
   
   int JK_METHOD jk_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool, void 
**result,
  const char *type, const char *name);
  @@ -98,43 +100,34 @@
   jk_worker_ajp14_destroy(jk_worker_t **pThis, jk_logger_t *l);
   
   
  -#define  JK_RETRIES 3
  +#define AJP_DEF_RETRY_ATTEMPTS(2)
  +#define AJP14_PROTO 14
  +#define AJP13_PROTO 13
  +
  +#define AJP13_DEF_HOST   (localhost)
  +#define AJP13_DEF_PORT   (8009)
  +#define AJP14_DEF_HOST   (localhost)
  +#define AJP14_DEF_PORT   (8011)
   
   /*  Impl  */
   
  -int JK_METHOD jk_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool, void 
**result,
  +int JK_METHOD jk_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool,
  +   void **result,
  const char *type, const char *name)
   {
   jk_logger_t *l=env-logger;
   jk_worker_t *w=(jk_worker_t *)pool-calloc(pool, sizeof(jk_worker_t));
   
  -l-jkLog(l, JK_LOG_DEBUG, Into ajp14_worker_factory\n);
  -
   if (name == NULL || w == NULL) {
  -l-jkLog(l, JK_LOG_ERROR, In ajp14_worker_factory, NULL parameters\n);
  +l-jkLog(l, JK_LOG_ERROR, ajp14.factory() NullPointerException\n);
   return JK_FALSE;
   }
   w-pool = pool;
  -w-name = strdup(name);
  +w-name = (char *)pool-pstrdup(pool, name);
   
   w-proto= AJP14_PROTO;
   
  -w-login= (jk_login_service_t *)malloc(sizeof(jk_login_service_t));
  -
  -if (w-login == NULL) {
  -l-jkLog(l, JK_LOG_ERROR,
  -   In ajp14_worker_factory, malloc failed for login area\n);
  -return JK_FALSE;
  -}
  - 
  -memset(w-login, 0, sizeof(jk_login_service_t));
  -
  -w-login-negociation=
  -(AJP14_CONTEXT_INFO_NEG | AJP14_PROTO_SUPPORT_AJP14_NEG);
  -w-login-web_server_name=NULL; /* must be set in init */
  -
  -w-ep_cache_sz= 0;
  -w-ep_cache= NULL;
  +w-endpointCache= NULL;
   w-connect_retry_attempts= AJP_DEF_RETRY_ATTEMPTS;
   
   w-channel= NULL;
  @@ -148,131 +141,17 @@
   
   *result = w;
   
  -return JK_TRUE;
  -}
  +l-jkLog(l, JK_LOG_INFO, ajp14.factory() Created %s %s\n,
  + w-name, name);
   
  -/*
  - * service is now splitted in ajp_send_request and ajp_get_reply
  - * much more easier to do errors recovery
  - *
  - * We serve here the request, using AJP13/AJP14 (e-proto)
  - *
  - */
  -static int JK_METHOD
  -jk_worker_ajp14_service(jk_endpoint_t   *e, 
  -jk_ws_service_t *s,
  -jk_logger_t *l,
  -int  *is_recoverable_error)
  -{
  -int i;
  -int err;
  -
  -l-jkLog(l, JK_LOG_DEBUG, Into jk_endpoint_t::service\n);
  -
  -if( ( e== NULL ) 
  - || ( s == NULL )
  -|| ! is_recoverable_error ) {
  - l-jkLog(l, JK_LOG_ERROR, jk_endpoint_t::service: NULL parameters\n);
  - return JK_FALSE;
  -}
  - 
  -e-request = jk_b_new(e-pool);
  -jk_b_set_buffer_size(e-request, DEF_BUFFER_SZ); 
  -jk_b_reset(e-request);
  -
  -e-reply = jk_b_new(e-pool);
  -jk_b_set_buffer_size(e-reply, DEF_BUFFER_SZ);
  -

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_lb_worker.c

2001-12-12 Thread costin

costin  01/12/12 13:51:33

  Modified:jk/native2/common jk_lb_worker.c
  Log:
  Start to use the new code, reuse the endpoints.
  
  Revision  ChangesPath
  1.7   +107 -41   jakarta-tomcat-connectors/jk/native2/common/jk_lb_worker.c
  
  Index: jk_lb_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_lb_worker.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_lb_worker.c2001/12/06 22:54:44 1.6
  +++ jk_lb_worker.c2001/12/12 21:51:33 1.7
  @@ -60,7 +60,7 @@
*  several workers.   *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Based on:   *
  - * Version: $Revision: 1.6 $   *
  + * Version: $Revision: 1.7 $   *
***/
   
   #include jk_pool.h
  @@ -170,12 +170,8 @@
   /* The 'real' endpoint */
   jk_endpoint_t *end = NULL;
   
  -l-jkLog(l, JK_LOG_DEBUG, 
  -   Into jk_endpoint_t::service\n);
  -
   if(e==NULL || s==NULL || is_recoverable_error==NULL) {
  -l-jkLog(l, JK_LOG_ERROR, 
  -   In jk_endpoint_t::service: NULL Parameters\n);
  +l-jkLog(l, JK_LOG_ERROR, lb.service() NullPointerException\n);
   return JK_FALSE;
   }
   
  @@ -195,13 +191,14 @@
   return JK_FALSE;
   }
   
  +l-jkLog(l, JK_LOG_INFO, lb.service() try %s\n, rec-name );
  +
   s-jvm_route = s-pool-pstrdup(s-pool,  rec-name);
   
   rc = rec-get_endpoint(rec, end, l);
   if( rc!= JK_TRUE ||
   end==NULL ) {
  -
  -} else {
  + } else {
   
   rc = end-service(end, s, l, is_recoverable);
   end-done(end, l);
  @@ -249,25 +246,41 @@
   static int JK_METHOD done(jk_endpoint_t **eP,
 jk_logger_t *l)
   {
  -l-jkLog(l, JK_LOG_DEBUG, 
  -   Into jk_endpoint_t::done\n);
  +jk_worker_t *w;
  +jk_endpoint_t *e;
  +int err;
  +
  +if(eP==NULL || *eP==NULL ) {
  +l-jkLog(l, JK_LOG_ERROR, lb.done() NullPointerException\n );
  +return JK_FALSE;
  +}
   
  -if(eP  *eP ) {
  -jk_endpoint_t *e = *eP;
  +e=*eP;
  +w=e-worker;
   
  -if(e-realEndpoint!=NULL) {  
  -e-realEndpoint-done(e-realEndpoint, l);  
  -}  
  +if( e-cPool != NULL ) 
  +e-cPool-reset(e-cPool);
   
  -free(e);
  -*eP = NULL;
  -return JK_TRUE;
  +if(e-realEndpoint!=NULL) {  
  +e-realEndpoint-done(e-realEndpoint, l);  
  +}  
  +
  +if (w-endpointCache != NULL ) {
  +err=w-endpointCache-put( w-endpointCache, e );
  +if( err==JK_TRUE ) {
  +l-jkLog(l, JK_LOG_INFO, lb.done() return to pool %s\n,
  + w-name );
  +return JK_TRUE;
  +}
   }
  +
  +l-jkLog(l, JK_LOG_INFO, lb.done() %s\n, w-name );
   
  -l-jkLog(l, JK_LOG_ERROR, 
  -   In jk_endpoint_t::done: NULL Parameters\n);
  +e-cPool-close( e-cPool );
  +e-pool-close( e-pool );
   
  -return JK_FALSE;
  +*eP = NULL;
  +return JK_TRUE;
   }
   
   static int JK_METHOD validate(jk_worker_t *_this,
  @@ -280,10 +293,8 @@
   unsigned num_of_workers;
   unsigned i = 0;
   
  -l-jkLog(l, JK_LOG_DEBUG, lb_workers.validate()\n);
  -
   if(! _this ) {
  -l-jkLog(l, JK_LOG_ERROR,lb_worker.validate(): NPE\n);
  +l-jkLog(l, JK_LOG_ERROR,lb_worker.validate(): NullPointerException\n);
   return JK_FALSE;
   }
   
  @@ -306,11 +317,9 @@
   _this-num_of_workers=0;
   for(i = 0 ; i  num_of_workers ; i++) {
   char *name = _this-pool-pstrdup(_this-pool, worker_names[i]);
  -
  +
   _this-lb_workers[i]=
  -_this-workerEnv-createWorker( _this-workerEnv,
  -name, props );
  -
  +_this-workerEnv-createWorker( _this-workerEnv,  name, props );
   if( _this-lb_workers[i] == NULL ) {
   l-jkLog(l, JK_LOG_ERROR,
lb_worker.validate(): Error creating %s %s\n,
  @@ -337,15 +346,36 @@
   _this-num_of_workers++;
   }
   
  +l-jkLog(l, JK_LOG_INFO, lb_workers.validate() %s %d workers\n,
  + _this-name, _this-num_of_workers );
  +
   return JK_TRUE;
   }
   
  -static int JK_METHOD init(jk_worker_t *pThis,
  +static int JK_METHOD init(jk_worker_t *_this,
 jk_map_t *props, 
 jk_workerEnv_t *we,
  

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_requtil.c

2001-12-12 Thread costin

costin  01/12/12 13:52:41

  Modified:jk/native2/common jk_requtil.c
  Log:
  Moved the 'read chunk from the web server' code to jk_requtil, it can
  be used by any worker/protocol.
  
  Removed any internal use of ajp buffers.
  
  Revision  ChangesPath
  1.3   +47 -0 jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c
  
  Index: jk_requtil.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_requtil.c  2001/12/04 23:56:07 1.2
  +++ jk_requtil.c  2001/12/12 21:52:40 1.3
  @@ -68,6 +68,8 @@
   #include jk_env.h
   #include jk_requtil.h
   
  +#define CHUNK_BUFFER_PAD  (12)
  +
   const char *response_trans_headers[] = {
   Content-Type, 
   Content-Language, 
  @@ -352,6 +354,51 @@
   return NULL;
   }
   return ch;
  +}
  +
  +
  +/*
  + * Read data from the web server.
  + *
  + * Socket API didn't garanty all the data will be kept in a single 
  + * read, so we must loop up to all awaited data are received 
  + */
  +int jk_requtil_readFully(jk_ws_service_t *s,
  + unsigned char   *buf,
  + unsigned len)
  +{
  +unsigned rdlen = 0;
  +unsigned padded_len = len;
  +
  +if (s-is_chunked  s-no_more_chunks) {
  + return 0;
  +}
  +if (s-is_chunked) {
  +/* Corner case: buf must be large enough to hold next
  + * chunk size (if we're on or near a chunk border).
  + * Pad the length to a reasonable value, otherwise the
  + * read fails and the remaining chunks are tossed.
  + */
  +padded_len = (len  CHUNK_BUFFER_PAD) ?
  +len : len - CHUNK_BUFFER_PAD;
  +}
  +
  +while(rdlen  padded_len) {
  +unsigned this_time = 0;
  +if(!s-read(s, buf + rdlen, len - rdlen, this_time)) {
  +return -1;
  +}
  +
  +if(0 == this_time) {
  + if (s-is_chunked) {
  + s-no_more_chunks = 1; /* read no more */
  + }
  +break;
  +}
  +rdlen += this_time;
  +}
  +
  +return (int)rdlen;
   }
   
   /** Initialize the request 
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2001-12-12 Thread costin

costin  01/12/12 13:53:58

  Modified:jk/native2/common jk_channel_socket.c
  Log:
  Few cosmetic changes, messages and code organization.
  
  Revision  ChangesPath
  1.6   +50 -50jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
  
  Index: jk_channel_socket.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_channel_socket.c   2001/12/06 22:54:44 1.5
  +++ jk_channel_socket.c   2001/12/12 21:53:58 1.6
  @@ -147,10 +147,9 @@
   jk_worker_t *worker, 
   jk_logger_t *l )
   {
  -int err=l-jkLog(l, JK_LOG_DEBUG, Into jk_channel_socket_init\n);
  +int err;
   jk_channel_socket_private_t *socketInfo=
(jk_channel_socket_private_t *)(_this-_privatePtr);
  -
   char *host=socketInfo-host;
   short port=socketInfo-port;
   struct sockaddr_in *rc=socketInfo-addr;
  @@ -169,8 +168,8 @@
l-jkLog(l, JK_LOG_ERROR, jk_channel_socket_init: 
   can't resolve %s:%d errno=%d\n, host, port, errno );
   }
  -l-jkLog(l, JK_LOG_DEBUG, jk_channel_socket_init: ok 
  - %s:%d\n, host, port );
  +l-jkLog(l, JK_LOG_INFO, channel_socket.init(): %s:%d for %s\n, host,
  + port, worker-name );
   
   return err;
   }
  @@ -232,7 +231,7 @@
   jk_endpoint_t *endpoint)
   {
   jk_logger_t *l=_this-worker-workerEnv-l;
  -int err=l-jkLog(l, JK_LOG_DEBUG, Into jk_channel_socket_open\n);
  +int err;
   jk_channel_socket_private_t *socketInfo=
(jk_channel_socket_private_t *)(_this-_privatePtr);
   
  @@ -240,60 +239,61 @@
   int ndelay=socketInfo-ndelay;
   
   int sock;
  +int ret;
   
   sock = socket(AF_INET, SOCK_STREAM, 0);
  -if(sock  -1) {
  -int ret;
  -/* Tries to connect to JServ (continues trying while error is EINTR) */
  -do {
  -l-jkLog(l, JK_LOG_DEBUG, jk_open_socket, try to connect socket = 
%d\n, sock);
  -ret = connect(sock,
  -  (struct sockaddr *)addr,
  -  sizeof(struct sockaddr_in));
  +if(sock  0) {
   #ifdef WIN32
  -if(SOCKET_ERROR == ret) { 
  -errno = WSAGetLastError() - WSABASEERR;
  -}
  +if(SOCKET_ERROR == ret) { 
  +errno = WSAGetLastError() - WSABASEERR;
  +}
   #endif /* WIN32 */
  -l-jkLog(l, JK_LOG_DEBUG, jk_open_socket, after connect ret = %d\n, 
ret);
  -} while (-1 == ret  EINTR == errno);
  +l-jkLog(l, JK_LOG_ERROR,
  + channelSocket.open(): can't create socket %d %s\n,
  + errno, strerror( errno ) );
  +return JK_FALSE;
  +}
   
  -/* Check if we connected */
  -if(0 == ret) {
  -if(ndelay) {
  -int set = 1;
  -
  -l-jkLog(l, JK_LOG_DEBUG, jk_open_socket, set TCP_NODELAY to 
on\n);
  -setsockopt(sock, 
  -   IPPROTO_TCP, 
  -   TCP_NODELAY, 
  -   (char *)set, 
  -   sizeof(set));
  -}   
  -
  -l-jkLog(l, JK_LOG_DEBUG, jk_open_socket, return, sd = %d\n, sock);
  - {
  - jk_channel_socket_data_t *sd=endpoint-channelData;
  - if( sd==NULL ) {
  - sd=(jk_channel_socket_data_t *)
  - malloc( sizeof( jk_channel_socket_data_t ));
  - endpoint-channelData=sd;
  - }
  - sd-sock=sock;
  - }
  -return JK_TRUE;
  -}   
  -jk_close_socket(sock);
  -} else {
  +/* Tries to connect to JServ (continues trying while error is EINTR) */
  +do {
  +l-jkLog(l, JK_LOG_INFO, channelSocket.open() connect on %d\n,sock);
  +ret = connect(sock,(struct sockaddr *)addr,
  +  sizeof(struct sockaddr_in));
  +
   #ifdef WIN32
  -errno = WSAGetLastError() - WSABASEERR;
  +if(SOCKET_ERROR == ret) { 
  +errno = WSAGetLastError() - WSABASEERR;
  +}
   #endif /* WIN32 */
  -}
   
  -l-jkLog(l, JK_LOG_ERROR, jk_open_socket, connect() failed errno = %d %s\n,
  -errno, strerror( errno ) ); 
  +} while (-1 == ret  EINTR == errno);
   
  -return -1;
  +/* Check if we connected */
  +if(ret != 0 ) {
  +jk_close_socket(sock);
  +l-jkLog(l, JK_LOG_ERROR,
  + channelSocket.connect() connect failed %d %s\n,
  + errno, strerror( errno ) );
  +return JK_FALSE;
  +}
  +
  +if(ndelay) {
  +

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_logger_file.c

2001-12-12 Thread costin

costin  01/12/12 13:54:51

  Modified:jk/native2/common jk_logger_file.c
  Log:
  Few changes to make it consistent with the apache ap_log.
  
  Revision  ChangesPath
  1.6   +7 -4  jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c
  
  Index: jk_logger_file.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_logger_file.c  2001/12/06 22:59:52 1.5
  +++ jk_logger_file.c  2001/12/12 21:54:51 1.6
  @@ -59,7 +59,7 @@
* Description: Utility functions (mainly configuration)   *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.5 $   *
  + * Version: $Revision: 1.6 $   *
***/
   
   #include jk_env.h
  @@ -221,7 +221,8 @@
   #ifdef WIN32
set_time_str(buf, HUGE_BUFFER_SIZE);
used = strlen(buf);
  -used += _snprintf(buf[used], HUGE_BUFFER_SIZE,  [%s (%d)]: , f, line);   
 
  +if( level = JK_LOG_DEBUG_LEVEL )
  +used += _snprintf(buf[used], HUGE_BUFFER_SIZE,  [%s (%d)]: , f, 
line);
   #elif defined(NETWARE) /* until we get a snprintf function */
   buf = (char *) malloc(HUGE_BUFFER_SIZE);
   if (NULL == buf)
  @@ -229,11 +230,13 @@
   
jk_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
used = strlen(buf);
  -used += sprintf(buf[used],  [%s (%d)]: , f, line);
  +if( level = JK_LOG_DEBUG_LEVEL )
  +used += sprintf(buf[used],  [%s (%d)]: , f, line);
   #else 
jk_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
used = strlen(buf);
  -used += snprintf(buf[used], HUGE_BUFFER_SIZE,  [%s (%d)]: , f, line);

  +if( level = JK_LOG_DEBUG_LEVEL )
  +used += snprintf(buf[used], HUGE_BUFFER_SIZE,  [%s (%d)]: , f, 
line);
   #endif
   if(used  0) {
   return 0; /* [V] not sure what to return... */
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_objCache.c

2001-12-12 Thread costin

costin  01/12/12 13:55:30

  Modified:jk/native2/common jk_objCache.c
  Log:
  Finishing the implementation ( actually code move ) of the obj cache.
  
  Revision  ChangesPath
  1.2   +50 -4 jakarta-tomcat-connectors/jk/native2/common/jk_objCache.c
  
  Index: jk_objCache.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_objCache.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_objCache.c 2001/12/06 22:51:23 1.1
  +++ jk_objCache.c 2001/12/12 21:55:29 1.2
  @@ -59,11 +59,7 @@
   
   #include jk_global.h
   #include jk_pool.h
  -#include jk_channel.h
  -#include jk_msg_buff.h
  -#include jk_ajp14.h 
   #include jk_logger.h
  -#include jk_service.h
   #include jk_env.h
   
   #include jk_objCache.h
  @@ -101,6 +97,43 @@
   return JK_FALSE; 
   }
   
  +static int
  +jk_objCache_init(jk_objCache_t *_this, int cacheSize ) {
  +int i;
  +
  +_this-ep_cache =
  +(void **)_this-pool-calloc(_this-pool, sizeof(void *) * cacheSize);
  +
  +if( _this-ep_cache==NULL )
  +return JK_FALSE;
  +
  +JK_INIT_CS((_this-cs), i);
  +if (!i) {
  +_this-l-jkLog(_this-l, JK_LOG_ERROR, objCache.create(): Can't init 
CS\n);
  +return JK_FALSE;
  +}
  +
  +for(i = 0 ; i  cacheSize ; i++) {
  +_this-ep_cache[i] = NULL;
  +}
  +
  +_this-ep_cache_sz=cacheSize;
  +return JK_TRUE;
  +}
  +
  +static int  
  +jk_objCache_destroy(jk_objCache_t *_this ) {
  +int i;
  +
  +JK_DELETE_CS((_this-cs), i);
  +
  +_this-ep_cache_sz=0;
  +/* Nothing to free, we use pools */
  +
  +return JK_TRUE;
  +}
  +
  +
   static void * 
   jk_objCache_get(jk_objCache_t *_this )
   {
  @@ -129,3 +162,16 @@
   return NULL;
   }
   
  +jk_objCache_t *jk_objCache_create(jk_pool_t *pool, jk_logger_t *l ) {
  +jk_objCache_t *_this=pool-calloc( pool, sizeof( jk_objCache_t ));
  +
  +_this-l=l;
  +_this-pool=pool;
  +
  +_this-get=jk_objCache_get;
  +_this-put=jk_objCache_put;
  +_this-init=jk_objCache_init;
  +_this-destroy=jk_objCache_destroy;
  +
  +return _this;
  +}
  
  
  

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




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

2001-12-12 Thread costin

costin  01/12/12 13:55:58

  Modified:jk/native2/common jk_registry.c
  Log:
  Added the new objects.
  
  Revision  ChangesPath
  1.5   +30 -7 jakarta-tomcat-connectors/jk/native2/common/jk_registry.c
  
  Index: jk_registry.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_registry.c 2001/12/06 23:04:46 1.4
  +++ jk_registry.c 2001/12/12 21:55:57 1.5
  @@ -62,7 +62,7 @@
   
   /***
* Description: Worker list*
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -89,32 +89,51 @@
  const char *type, const char *name);
   
  
  -int JK_METHOD jk_worker_lb_factory(jk_env_t *env, jk_pool_t *pool, void **result,
  +int JK_METHOD jk_worker_lb_factory(jk_env_t *env, jk_pool_t *pool,
  +   void **result,
  const char *type, const char *name);
   
   
  -int JK_METHOD jk_worker_jni_factory(jk_env_t *env, jk_pool_t *pool, void **result,
  +int JK_METHOD jk_worker_jni_factory(jk_env_t *env, jk_pool_t *pool,
  +void **result,
   const char *type, const char *name);
   
  -int JK_METHOD jk_worker_ajp12_factory(jk_env_t *env, jk_pool_t *pool, void **result,
  +int JK_METHOD jk_worker_ajp12_factory(jk_env_t *env, jk_pool_t *pool,
  +  void **result,
 const char *type, const char *name);
   
   /* Factories for 'new' types. We use the new factory interface,
*  workers will be updated later 
*/
  -int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, void 
**result,
  +int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool,
  +void **result,
const char *type, const char *name);
   
  -int JK_METHOD jk_workerEnv_factory(jk_env_t *env, jk_pool_t *pool, void **result,
  +int JK_METHOD jk_workerEnv_factory(jk_env_t *env, jk_pool_t *pool,
  +   void **result,
  const char *type, const char *name);
   
   int JK_METHOD jk_uriMap_factory(jk_env_t *env, jk_pool_t *pool, void **result,
   const char *type, const char *name);
   
  -int JK_METHOD jk_logger_file_factory(jk_env_t *env, jk_pool_t *pool, void **result,
  +int JK_METHOD jk_logger_file_factory(jk_env_t *env, jk_pool_t *pool,
  + void **result,
const char *type, const char *name);
   
   
  +int JK_METHOD jk_handler_logon_factory( jk_env_t *env, jk_pool_t *pool,
  +void **result,
  +const char *type, const char *name);
  +
  +int JK_METHOD jk_handler_discovery_factory( jk_env_t *env, jk_pool_t *pool,
  +void **result,
  +const char *type, const char *name);
  +
  +int JK_METHOD jk_handler_response_factory( jk_env_t *env, jk_pool_t *pool,
  +   void **result,
  +   const char *type, const char *name);
  +
  +
   /**
*   Init the components that we compile in by default. 
*   In future we should have a more flexible mechanism that would allow 
  @@ -142,6 +161,10 @@
 env-registerFactory( env, worker, ajp14, jk_worker_ajp14_factory );
 env-registerFactory( env, worker, lb,jk_worker_lb_factory );
 env-registerFactory( env, channel, socket, jk_channel_socket_factory );
  +  env-registerFactory( env, handler, response, jk_handler_response_factory );
  +  env-registerFactory( env, handler, logon,   jk_handler_logon_factory );
  +  env-registerFactory( env, handler, discovery,
  +jk_handler_discovery_factory );
   
 /* Optional objects */
   
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_map.c jk_uriMap.c jk_endpoint.c

2001-12-12 Thread costin

costin  01/12/12 13:56:43

  Modified:jk/native2/common jk_map.c jk_uriMap.c
  Removed: jk/native2/common jk_endpoint.c
  Log:
  Fixes, updates to the new apis.
  
  Revision  ChangesPath
  1.6   +2 -2  jakarta-tomcat-connectors/jk/native2/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_map.c  2001/12/06 22:59:52 1.5
  +++ jk_map.c  2001/12/12 21:56:43 1.6
  @@ -58,7 +58,7 @@
   /***
* Description: General purpose map object *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.5 $   *
  + * Version: $Revision: 1.6 $   *
***/
   
   #include jk_global.h
  @@ -246,7 +246,7 @@
   void **old)
   {
   int rc = JK_FALSE;
  -int i;
  +unsigned int i;
   
   if(m==NULL ||  name==NULL )
   return JK_FALSE;
  
  
  
  1.8   +41 -44jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c
  
  Index: jk_uriMap.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_uriMap.c   2001/12/06 23:04:33 1.7
  +++ jk_uriMap.c   2001/12/12 21:56:43 1.8
  @@ -67,7 +67,7 @@
* servlet container.  
* 
* Author:  Gal Shachor [EMAIL PROTECTED]   
  - * Version: $Revision: 1.7 $   
  + * Version: $Revision: 1.8 $   
*/
   
   #include jk_pool.h
  @@ -197,11 +197,12 @@
   char *worker;
   int err;
   char *asterisk;
  -
  +
  +printf(XXX addMapping1 %s, puri); 
   /* make sure we have space */
   err=uriMap_realloc(_this);
   if (err != JK_TRUE ) {
  -l-jkLog(l, JK_LOG_ERROR,Allocation error\n);
  +l-jkLog(l, JK_LOG_ERROR,uriMa.addMappint() OutOfMemoryException\n);
   return NULL;
   }
   
  @@ -213,10 +214,8 @@
   worker = _this-pool-pstrdup(_this-pool, pworker);
   uwr-webapp-workerName = worker;
   
  -if (uri==NULL ||
  -worker==NULL ||
  -uwr==NULL ) {
  -l-jkLog(l, JK_LOG_ERROR,Allocation error\n);
  +if (uri==NULL || worker==NULL || uwr==NULL ) {
  +l-jkLog(l, JK_LOG_ERROR,uriMap.addMapping() NullPointerException\n);
   return NULL;
   }
   
  @@ -236,8 +235,6 @@
   _this-maps[_this-size] = uwr;
   _this-size++;
   
  -l-jkLog(l, JK_LOG_DEBUG,uriMap.addMapping(%s)\n, uri );
  -
   asterisk = strchr(uri, '*');
   
   // set the mapping type
  @@ -247,17 +244,12 @@
   uwr-prefix_len  =strlen( uwr-prefix );
   uwr-suffix  = NULL;
   uwr-match_type  = MATCH_TYPE_EXACT;
  -l-jkLog(l, JK_LOG_DEBUG,
  +l-jkLog(l, JK_LOG_INFO,
  uriMap.addMapping() exact mapping %s=%s was added\n,
  uri, worker);
   return uwr;
   }
   
  -if (!uwr-uri) {
  -l-jkLog(l, JK_LOG_ERROR,Allocation error\n);
  -return NULL;
  -}
  -
   /*
* Now, lets check that the pattern is /context/STAR.suffix
* or /context/STAR
  @@ -274,7 +266,7 @@
   uwr-prefix_len  =strlen( uwr-prefix );
   uwr-suffix  = asterisk + 3;
   uwr-match_type  = MATCH_TYPE_SUFFIX;
  -l-jkLog(l, JK_LOG_DEBUG,
  +l-jkLog(l, JK_LOG_INFO,
  uriMap.addMapping() suffix mapping %s.%s=%s was added\n,
  uri, asterisk + 3, worker); 
   } else if ('\0' != asterisk[2]) {
  @@ -284,7 +276,7 @@
   uwr-prefix  = uri;
   uwr-prefix_len  =strlen( uwr-prefix );
   uwr-match_type = MATCH_TYPE_GENERAL_SUFFIX;
  -l-jkLog(l, JK_LOG_DEBUG,
  +l-jkLog(l, JK_LOG_INFO,
  uriMap.addMapping() general suffix mapping %s.%s=%s\n,
  uri, asterisk + 2, worker);
   } else {
  @@ -294,8 +286,8 @@
   uwr-prefix  = uri;
   uwr-prefix_len  =strlen( uwr-prefix );
   uwr-match_type  = MATCH_TYPE_CONTEXT;
  -l-jkLog(l, JK_LOG_DEBUG,
  -   uriMap.addMapping() context mapping %s=%s\n,
  +l-jkLog(l, JK_LOG_INFO,
  +

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_endpoint.h

2001-12-12 Thread costin

costin  01/12/12 14:00:07

  Modified:jk/native2/include jk_endpoint.h
  Log:
  Moved left_bytes_to_send to ws_service ( it's a characteristic of the request,
  not endpoint )
  
  Added some more documentation on message. Moved the 'negotiation' flags ( since
  will be set per endpoint ), same for the servletContainerName ( you can have
   a pool with different versions of tomcat or other containers ).
  
  Moved teh 'send', 'get' into msg.
  
  Revision  ChangesPath
  1.5   +24 -21jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
  
  Index: jk_endpoint.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_endpoint.h 2001/12/07 23:10:34 1.4
  +++ jk_endpoint.h 2001/12/12 22:00:06 1.5
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   
* Author:  Dan Milstein [EMAIL PROTECTED]
* Author:  Henri Gomez [EMAIL PROTECTED]   
  - * Version: $Revision: 1.4 $  
  + * Version: $Revision: 1.5 $  
***/
   
   #ifndef JK_ENDPOINT_H
  @@ -72,7 +72,7 @@
   #include jk_logger.h
   #include jk_pool.h
   #include jk_uriMap.h
  -#include jk_msg_buff.h
  +#include jk_msg.h
   
   #ifdef __cplusplus
   extern C {
  @@ -141,18 +141,33 @@
   
   int sd;
   int reuse;
  -int left_bytes_to_send;
   
   /* Buffers for req/res */
   /* Used to be ajp_operation */
  -struct jk_msg_buf*request;   /* original request storage */
  -struct jk_msg_buf*reply; /* reply storage (chuncked by ajp13 */
  -struct jk_msg_buf*post;  /* small post data storage area */
  +
  +/* Incoming messages ( from tomcat ). Will be overriten after each
  +   message, you must safe any data you want to keep.
  + */
  +struct jk_msg *reply;
  +
  +/* Outgoing messages ( from server ). If the handler will return
  +   JK_HANDLER_RESPONSE this message will be sent to tomcat
  +*/
  +struct jk_msg *post;
  +
  +struct jk_msg *request;   /* original request storage */
   int uploadfd;   /* future persistant storage id */
   int recoverable;/* if exchange could be conducted on another TC */
   
   /* For redirecting endpoints like lb */
   jk_endpoint_t *realEndpoint;
  +
  +/* Ajp14-specific field, negotiate protocol features.
  +   XXX Replace it with a name/value set */
  +unsigned long negociation;
  +unsigned long negociated;
  +
  +char *servletContainerName;
   
   /* int (JK_METHOD *sendRequest)(jk_endpoint_t *e,  */
   /*  struct jk_ws_service *s, */
  @@ -177,6 +192,9 @@
* Note that the first argument is *not* a 'this' pointer, but is
* rather a pointer to a 'this' pointer.  This is necessary, because
* we may need to free this object.
  + *
  + * XXX This is the 'pair' of worker.getEndpoint - it should be part of
  + * worker.
*/
   int (JK_METHOD *done)(jk_endpoint_t **p,
 jk_logger_t *l);
  @@ -193,15 +211,6 @@
   void ajp_close_endpoint(jk_endpoint_t *ae,
   jk_logger_t*l);
   
  -int ajp_connection_tcp_send_message(jk_endpoint_t *ae,
  -jk_msg_buf_t   *msg,
  -jk_logger_t*l);
  -
  -int ajp_connection_tcp_get_message(jk_endpoint_t *ae,
  -   jk_msg_buf_t   *msg,
  -   jk_logger_t*l);
  -
  -
   int ajp_send_request(jk_endpoint_t *e,
struct jk_ws_service *s,
jk_logger_t *l);
  @@ -211,12 +220,6 @@
 jk_logger_t *l);
   
   void ajp_reset_endpoint(jk_endpoint_t *ae);
  -
  -int ajp_read_into_msg_buff(jk_endpoint_t  *ae,
  -   struct jk_ws_service *r,
  -   jk_msg_buf_t*msg,
  -   intlen,
  -   jk_logger_t *l);
   
   
   
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_worker.h

2001-12-12 Thread costin

costin  01/12/12 14:01:49

  Modified:jk/native2/include jk_worker.h
  Log:
  Removed the login_struct, it's private to the login handler.
  
  The secret is now a property of the worker (not specific to ajp14 ).
  
  logon method is no longer needed, normal message handlers are used instead.
  
  Revision  ChangesPath
  1.6   +5 -52 jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
  
  Index: jk_worker.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_worker.h   2001/12/07 23:10:34 1.5
  +++ jk_worker.h   2001/12/12 22:01:49 1.6
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.5 $   *
  + * Version: $Revision: 1.6 $   *
***/
   
   #ifndef JK_WORKER_H
  @@ -71,6 +71,7 @@
   #include jk_mt.h
   #include jk_uriMap.h
   #include jk_objCache.h
  +#include jk_msg.h
   
   #ifdef __cplusplus
   extern C {
  @@ -80,55 +81,10 @@
   struct jk_endpoint;
   struct jk_env;
   struct jk_objCache;
  +struct jk_msg;
   typedef struct jk_worker jk_worker_t;
   
  -
   /*
  - * The login structure
  - */
  -typedef struct jk_login_service jk_login_service_t;
  -#define AJP14_ENTROPY_SEED_LEN   32  /* we're using MD5 = 32 chars 
*/
  -#define AJP14_COMPUTED_KEY_LEN   32  /* we're using MD5 also */
  -
  -struct jk_login_service {
  -
  -/*
  - *  Pointer to web-server name
  - */
  -char * web_server_name;
  -
  -/*
  - * Pointer to servlet-engine name
  - */
  -char * servlet_engine_name;
  -
  -/*
  - * Pointer to secret key
  - */
  -char * secret_key;
  -
  -/*
  - * Received entropy seed
  - */
  -char entropy[AJP14_ENTROPY_SEED_LEN + 1];
  -
  -/*
  - * Computed key
  - */
  -char computed_key[AJP14_COMPUTED_KEY_LEN + 1];
  -
  -/*
  - *  What we want to negociate
  - */
  -unsigned long negociation;
  -
  -/*
  - * What we received from servlet engine 
  - */
  -unsigned long negociated;
  -};
  -
  -/*
* The worker 'class', which represents something to which the web server
* can delegate requests. 
*
  @@ -213,7 +169,8 @@
   /* struct jk_endpoint **ep_cache; */
   
   int proto;
  -struct jk_login_service *login;
  +/* Password for ajp14+ connections. If null we default to ajp13.*/
  +char * secret;
   
   /* Each worker can be part of a load-balancer scheme.
* The information can be accessed by other components -
  @@ -230,10 +187,6 @@
   jk_worker_t **lb_workers;
   int num_of_workers;
   
  -int (* logon)(struct jk_endpoint *ae,
  -  jk_logger_t*l);
  -
  -
   /*
* For all of the below (except destroy), the first argument is
* essentially a 'this' pointer.  
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2001-12-12 Thread costin

costin  01/12/12 14:02:08

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Added the handler table and processCallback.
  
  Revision  ChangesPath
  1.5   +16 -1 jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_workerEnv.h2001/12/06 22:48:49 1.4
  +++ jk_workerEnv.h2001/12/12 22:02:08 1.5
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -70,6 +70,8 @@
   #include jk_map.h
   #include jk_uriMap.h
   #include jk_webapp.h
  +#include jk_handler.h
  +#include jk_service.h
   
   #ifdef __cplusplus
   extern C {
  @@ -81,6 +83,8 @@
   struct jk_uriMap;
   struct jk_webapp;
   struct jk_map;
  +struct jk_handler;
  +struct jk_ws_service;
   
   /*
* Jk configuration and global methods. 
  @@ -187,6 +191,13 @@
   int envvars_in_use;
   jk_map_t * envvars;
   
  +/* Handlers. This is a dispatch table for messages, for
  + * each message id we have an entry containing the jk_handler_t.
  + * lastMessageId is the size of the table.
  + */
  +struct jk_handler **handlerTable;
  +int lastMessageId;
  +
   /** Private data, associated with the 'real' server
*  server_rec * in apache
*/
  @@ -208,6 +219,10 @@
 const char *vhost,
 const char *name, 
 struct jk_map *init_data);
  +
  +int (*processCallbacks)(struct jk_workerEnv *_this,
  +struct jk_endpoint *e,
  +struct jk_ws_service *r );
   
   /**
*  Init the workers, prepare the worker environment.
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_objCache.h jk_requtil.h jk_service.h

2001-12-12 Thread costin

costin  01/12/12 14:02:31

  Modified:jk/native2/include jk_channel.h jk_objCache.h jk_requtil.h
jk_service.h
  Log:
  Various other changes and updates.
  
  Revision  ChangesPath
  1.3   +1 -1  jakarta-tomcat-connectors/jk/native2/include/jk_channel.h
  
  Index: jk_channel.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_channel.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_channel.h  2001/12/06 22:48:49 1.2
  +++ jk_channel.h  2001/12/12 22:02:30 1.3
  @@ -61,7 +61,7 @@
   #include jk_global.h
   #include jk_logger.h
   #include jk_pool.h
  -#include jk_msg_buff.h
  +#include jk_msg.h
   
   #ifdef __cplusplus
   extern C {
  
  
  
  1.3   +3 -3  jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h
  
  Index: jk_objCache.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_objCache.h 2001/12/07 23:10:34 1.2
  +++ jk_objCache.h 2001/12/12 22:02:30 1.3
  @@ -55,13 +55,13 @@
*   *
* = */
   
  -#ifndef JK_REQ_H
  -#define JK_REQ_H
  +#ifndef JK_OBJCACHE_H
  +#define JK_OBJCACHE_H
   
   #include jk_global.h
   #include jk_logger.h
   #include jk_pool.h
  -#include jk_msg_buff.h
  +#include jk_msg.h
   #include jk_mt.h
   
   #ifdef __cplusplus
  
  
  
  1.2   +5 -1  jakarta-tomcat-connectors/jk/native2/include/jk_requtil.h
  
  Index: jk_requtil.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_requtil.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_requtil.h  2001/12/04 18:29:11 1.1
  +++ jk_requtil.h  2001/12/12 22:02:30 1.2
  @@ -67,7 +67,6 @@
   #define JK_REQUTIL_H
   
   #include jk_global.h
  -#include jk_ajp14.h
   #include jk_channel.h
   #include jk_env.h
   
  @@ -196,6 +195,11 @@
* jk_init_ws_service
*/ 
   void jk_requtil_initRequest(jk_ws_service_t *s);
  +
  +
  +int jk_requtil_readFully(jk_ws_service_t *s,
  + unsigned char   *buf,
  + unsigned len);
   
   #ifdef __cplusplus
   }
  
  
  
  1.4   +3 -2  jakarta-tomcat-connectors/jk/native2/include/jk_service.h
  
  Index: jk_service.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_service.h  2001/12/06 22:48:49 1.3
  +++ jk_service.h  2001/12/12 22:02:30 1.4
  @@ -63,7 +63,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Author:  Dan Milstein [EMAIL PROTECTED]*
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.3 $   *
  + * Version: $Revision: 1.4 $   *
***/
   
   #ifndef JK_SERVICE_H
  @@ -224,7 +224,8 @@
   char  **out_header_names;
   char  **out_header_values;
   
  -
  +/* Count remaining bytes ( original content length minus what was sent */
  +int left_bytes_to_send;
   
   /*
* Callbacks into the web server.  For each, the first argument is
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 mod_jk.c

2001-12-12 Thread costin

costin  01/12/12 14:07:25

  Modified:jk/native2/server/apache2 mod_jk.c
  Log:
  JkMounts will be added to the config, but no actual call is made before init().
  
  ( the same model that is used on the java side in both 3.x and 4.0 - first we
  set properties, then we properly start the object )
  No distinction is made between JkMounts or uriworkers.properties or even
  properties in workers.properties ( or any other properties file ).
  
  During the config stage, we'll collect properties from various sources:
  - workers.properties.
  - native server config ( both specialized JkMount or specific options, or
  JkWorker foo bar which is equivalent with foo=bar in workers.properties ).
  - urimap.properties
  
  That means the config file to be used is entirely matter of taste.
  
  Few more fixes to the code that detects the 'first config' done by
  apache and doesn't initialize on it.
  
  Revision  ChangesPath
  1.9   +32 -55jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_jk.c  2001/12/07 23:05:45 1.8
  +++ mod_jk.c  2001/12/12 22:07:25 1.9
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   /*
  @@ -69,6 +69,8 @@
   #include ap_config.h
   #include apr_lib.h
   #include apr_date.h
  +#include apr_strings.h
  +
   #include httpd.h
   #include http_config.h
   #include http_request.h
  @@ -76,14 +78,8 @@
   #include http_protocol.h
   #include http_main.h
   #include http_log.h
  -#include util_script.h
   
  -/* moved to apr since http-2.0.19-dev */
  -#if (MODULE_MAGIC_NUMBER_MAJOR  20010523)
  -#include util_date.h
  -#endif
  -
  -#include apr_strings.h
  +#include util_script.h
   /*
* Jakarta (jk_) include files
*/
  @@ -97,9 +93,9 @@
   #include jk_uriMap.h
   #include jk_requtil.h
   
  -#define JK_WORKER_ID(jakarta.worker)
   #define JK_HANDLER  (jakarta-servlet)
   #define JK_MAGIC_TYPE   (application/x-jakarta-servlet)
  +
   #define NULL_FOR_EMPTY(x)   ((x  !strlen(x)) ? NULL : x) 
   
   module AP_MODULE_DECLARE_DATA jk_module;
  @@ -332,22 +328,10 @@
   s-remote_host  = NULL_FOR_EMPTY(s-remote_host);
   s-remote_addr  = NULL_FOR_EMPTY(r-connection-remote_ip);
   
  -if( l-level = JK_LOG_DEBUG_LEVEL ) {
  -l-jkLog(l, JK_LOG_DEBUG, 
  -   agsp=%u agsn=%s hostn=%s shostn=%s cbsport=%d sport=%d \n,
  -   ap_get_server_port( r ),
  -   ap_get_server_name( r ),
  -   r-hostname,
  -   r-server-server_hostname,
  -   r-connection-base_server-port,
  -   r-server-port);
  -}
  -
   /* get server name */
   s-server_name= (char *)(r-hostname ? r-hostname :
r-server-server_hostname);
   
  -
   /* get the real port (otherwise redirect failed) */
   apr_sockaddr_port_get(port,r-connection-local_addr);
   s-server_port = port;
  @@ -561,8 +545,7 @@
*
* JkMount URI(context) worker
*/
  -static const char *jk_mount_context(cmd_parms *cmd, 
  -void *dummy, 
  +static const char *jk_mount_context(cmd_parms *cmd, void *dummy, 
   const char *context,
   const char *worker,
   const char *maybe_cookie)
  @@ -570,21 +553,11 @@
   server_rec *s = cmd-server;
   jk_workerEnv_t *workerEnv =
   (jk_workerEnv_t *)ap_get_module_config(s-module_config, jk_module);
  -char *old;
  -jk_uriMap_t *uriMap=workerEnv-uriMap;
  -jk_uriEnv_t *uriEnv;
   
  -if (context[0]!='/')
  -return Context should start with /;
  +if (context[0]!='/') return Context must start with /;
   
  -/*
  - * Add the new worker to the alias map. XXX host ?
  - */
  -uriEnv=uriMap-addMapping( uriMap, NULL, context, worker );
  -if( uriEnv==NULL ) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 
  - NULL, mod_jk: Error mounting %s %s \n, context, worker  );
  -}
  +map_put( workerEnv-init_data, context, worker, NULL );
  +
   return NULL;
   }
   
  @@ -594,8 +567,7 @@
*
* JkWorkersFile file
*/
  -static const char 

cvs commit: jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers CcCompiler.java CompilerAdapter.java LibtoolCompiler.java LibtoolLinker.java

2001-12-12 Thread costin

costin  01/12/12 14:09:16

  Modified:jk/jkant/java/org/apache/jk/ant SoTask.java
   jk/jkant/java/org/apache/jk/ant/compilers CcCompiler.java
CompilerAdapter.java LibtoolCompiler.java
LibtoolLinker.java
  Log:
  Few changes to get warnings to work, and some fixes ( debug was not added )
  
  Revision  ChangesPath
  1.22  +8 -0  
jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/SoTask.java
  
  Index: SoTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/SoTask.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- SoTask.java   2001/11/16 22:18:50 1.21
  +++ SoTask.java   2001/12/12 22:09:16 1.22
  @@ -115,6 +115,7 @@
   protected int debug;
   
   protected boolean optG=true;
  +protected boolean optWgcc=true;
   protected boolean optimize=false;
   protected boolean profile=false;
   protected Vector defines= new Vector();
  @@ -154,6 +155,7 @@
so.buildDir=buildDir;
so.debug=debug;
so.optG=optG;
  +so.optWgcc=optWgcc;
so.optimize=optimize;
so.profile=profile;
so.defines=defines;
  @@ -190,6 +192,12 @@
*/
   public void setProfile(boolean b) {
profile=b;
  +}
  +
  +/** Gcc warnings
  + */
  +public void setGccWarn(boolean b) {
  + optWgcc=b;
   }
   
   /** Debug the so task
  
  
  
  1.7   +20 -11
jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/CcCompiler.java
  
  Index: CcCompiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/CcCompiler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CcCompiler.java   2001/11/16 22:23:22 1.6
  +++ CcCompiler.java   2001/12/12 22:09:16 1.7
  @@ -103,7 +103,7 @@
   
addIncludes(cmd);
addExtraFlags( cmd );
  - addDefines(cmd);
  + addDebug(cmd);
addDefines( cmd );
addOptimize( cmd );
addProfile( cmd );
  @@ -113,25 +113,34 @@
project.log( Compiling  + source);
   
int result=execute( cmd );
  - if( result!=0 ) {
  - displayError( result, source, cmd );
  - }
  +displayError( result, source, cmd );
closeStreamHandler();
   }
   protected void addDebug(Commandline cmd) {
if( optG ) {
cmd.createArgument().setValue(-g );
  +}
  +
  +if( optWgcc ) {
cmd.createArgument().setValue(-W);
  - cmd.createArgument().setValue(-Wall);
  - 
  - cmd.createArgument().setValue(-Wtraditional);
  - cmd.createArgument().setValue(-Wredundant-decls);
  +
  +//cmd.createArgument().setValue(-Wall);
  +cmd.createArgument().setValue(-Wimplicit);
  +cmd.createArgument().setValue(-Wreturn-type);
  +cmd.createArgument().setValue(-Wcomment);
  +cmd.createArgument().setValue(-Wformat);
  +cmd.createArgument().setValue(-Wchar-subscripts);
  +cmd.createArgument().setValue(-O);
  +cmd.createArgument().setValue(-Wuninitialized);
  +
  +// Non -Wall
  +//   cmd.createArgument().setValue(-Wtraditional);
  +//   cmd.createArgument().setValue(-Wredundant-decls);
cmd.createArgument().setValue(-Wmissing-declarations);
cmd.createArgument().setValue(-Wmissing-prototypes);
  - cmd.createArgument().setValue(-Wconversions);
  +//   cmd.createArgument().setValue(-Wconversions);
cmd.createArgument().setValue(-Wcast-align);
  -
  - cmd.createArgument().setValue(-pedantic );
  +//   cmd.createArgument().setValue(-pedantic );
}
   }
   protected void addOptimize( Commandline cmd ) {
  
  
  
  1.7   +10 -1 
jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/CompilerAdapter.java
  
  Index: CompilerAdapter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/CompilerAdapter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CompilerAdapter.java  2001/11/16 22:21:03 1.6
  +++ CompilerAdapter.java  2001/12/12 22:09:16 1.7
  @@ -250,6 +250,16 @@
   protected void displayError( int result, String source, Commandline cmd )
throws BuildException
   {
  +if( result == 0 ) {
  +String err=errorstream.toString();
  +if(err==null ) return;
  +if( err.indexOf( warning ) = 0 )
 

Jk2: jkctl handler

2001-12-12 Thread costinm


This tries to solve the 'egg and chicken' config problem, and to
fix/enable some other things.

I want to add a second handler in mod_jk, similar with the 'status' for
apache, mod_jserv, etc. ( same security issues - i.e. users will need
access control, to use it, etc ).

The most important feature ( for now ) will be the handling of 'ping',
where mod_jk will connect to any worker it knows about and send a ping
message.

Whenever tomcat starts, the ajp connector ( if configured to ) will access
this control uri - Apache will then reconnect to it and update it's info.
( apache does try to connect to workers when it starts, but it is possible
that tomcat was down ). It will also update it's up/down state for
workers that were marked as down as result of connection failure.

This will also alow user to add/remove application in a 'lb' environment
in a nice and clean manner.

The handler will report the status of it's workers as result ( in simple
XHTML format, nothing fancy ).

Opinions ? Votes ( I'm looking for +1s == I will help :-)

Costin





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




DO NOT REPLY [Bug 5343] - taglib-location doesn't accept an '/' as first character

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5343.
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=5343

taglib-location doesn't accept an '/' as first character

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 14:28 ---
Hmm... I copied your wem.xml and my.tld and tomcat starts without problem. 
Though I am using the nightly build, 4.0.1 Final should work the same.  In fact,
examples/WEB-INF/web.xml contains taglib-locations that start with /, and they
obviously work.  I am closing this one as WORKSFORME; but if you still have
problems, please reopen it, and attach a .war test case.  Thanks.

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




DO NOT REPLY [Bug 5396] New: - Tomcat start shutcut fails when HTTPS is set

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5396.
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=5396

Tomcat start shutcut fails when HTTPS is set

   Summary: Tomcat start shutcut fails when HTTPS is set
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Other Connectors
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Tomcat start shutcut in Windows fails after the HTTPS connector is uncomment in
server.xml. (The startup.bat in /bin works well).

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




cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF web.xml

2001-12-12 Thread craigmcc

craigmcc01/12/12 14:34:20

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Redirect01.java
Redirect01a.java
   tester/web Redirect02.jsp Redirect02a.jsp Redirect03.jsp
Redirect03a.jsp
  Log:
  Add unit tests to demonstrate that response.sendRedirect() is handled
  correctly, including ignoring any subsequent output, from either a servlet
  or a JSP page.
  
  Revision  ChangesPath
  1.75  +20 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- tester.xml2001/12/12 02:26:10 1.74
  +++ tester.xml2001/12/12 22:34:20 1.75
  @@ -1464,6 +1464,26 @@
 outHeaders=Content-Language:en-US/
   
   
  +!-- == SendRedirect Handling = --
  +
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/Redirect01 debug=${debug}
  +  outContent=Redirect01a PASSED redirect=true/
  +
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/WrappedRedirect01 debug=${debug}
  +  outContent=Redirect01a PASSED redirect=true/
  +
  +!-- JSP page includes return after redirect --
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/Redirect02.jsp debug=${debug}
  +  outContent=Redirect02a.jsp PASSED redirect=true/
  +
  +!-- Same as Redirect02.jsp except without the return --
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/Redirect03.jsp debug=${debug}
  +  outContent=Redirect03a.jsp PASSED redirect=true/
  +
 /target
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Redirect01.java
  
  Index: Redirect01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 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 http://www.apache.org/.  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  The  Jakarta  Project,  Tomcat,  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 

DO NOT REPLY [Bug 5353] - Characters with accents not displayed correctly in Tomcat 3.3

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5353.
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=5353

Characters with accents not displayed correctly in Tomcat 3.3





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 14:37 ---
More information.

If I set the parameter largeFile=true  in JspInterceptor, the page displays 
OK. 

html
body
p áéíóú âêîôû /p
/body
/html

I'm still trying to tracking it down...

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




Re: getPathInfo() return wrong path info - still an issue

2001-12-12 Thread Craig R. McClanahan

Andy,

Could you package your test case as a WAR and add it to the bug report?
There's no way to know whether the behavior you quote or not is correct
without seeing your servlet mappings, and everything else.

Craig


On Wed, 12 Dec 2001, Andy Olliver wrote:

 Date: Wed, 12 Dec 2001 22:44:48 -
 From: Andy Olliver [EMAIL PROTECTED]
 Reply-To: Tomcat Developers List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Subject: getPathInfo() return wrong path info - still an issue

 Craig

 This is definitely a problem with build 4.01 - I will try with last nights
 build.

 I have log files (produced by RequestDumperFilter) showing unreliable
 results for  getPathInfo().
 (don't get confused by context = servlet, so when I use Invoker I have
 .../servlet/servlet/)
 I tried this using Invoker and servlet class names, and then with servlet
 aliases.

 ###
 2001-12-12 09:18:22 Request Received at 2001-12-12 09:18:22.276
  characterEncoding=null
  contentLength=-1
contentType=null
 locale=en_GB
locales=en_GB
  parameter=a=dsds
   protocol=HTTP/1.1
 remoteAddr=127.0.0.1
 remoteHost=127.0.0.1
 scheme=http
 serverName=wma_local2
 serverPort=80
   isSecure=false
 -
contextPath=/servlet
 cookie=WMRCSession=1008148444816
 cookie=JSESSIONID=6464919682997592E4D9A533D2B322B9
 header=accept-language=en-gb
 header=connection=Keep-Alive
 header=cookie=WMRCSession=1008148444816;
 JSESSIONID=6464919682997592E4D9A533D2B322B9
 header=accept=*/*
 header=host=wma_local2
 header=accept-encoding=gzip, deflate
 header=user-agent=Mozilla/4.0 (compatible; MSIE 5.5; Windows NT
 5.0)
 method=GET
   pathInfo=/foo/bar/
queryString=a=dsds
 remoteUser=null
 requestedSessionId=6464919682997592E4D9A533D2B322B9
 requestURI=/servlet/servlet/andy.test.RequestData/foo/bar/
servletPath=/servlet/andy.test.RequestData
 =
 ###
 2001-12-12 22:14:56 Request Received at 2001-12-12 22:14:56.846
  characterEncoding=null
  contentLength=-1
contentType=null
 locale=en_GB
locales=en_GB
  parameter=a=b
   protocol=HTTP/1.1
 remoteAddr=127.0.0.1
 remoteHost=127.0.0.1
 scheme=http
 serverName=wma_local2
 serverPort=80
   isSecure=false
 -
contextPath=/servlet
 cookie=WMRCSession=1008149958182
 cookie=JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept-language=en-gb
 header=connection=Keep-Alive
 header=cookie=WMRCSession=1008149958182;
 JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept=image/gif, image/x-xbitmap, image/jpeg,
 image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel,
 application/msword, */*
 header=host=wma_local2
 header=accept-encoding=gzip, deflate
 header=user-agent=Mozilla/4.0 (compatible; MSIE 5.5; Windows NT
 5.0)
 method=GET
   pathInfo=/andy.test.RequestData/open/dfoo
queryString=a=b
 remoteUser=null
 requestedSessionId=D03605F26332C358B0F6A10081343290
 requestURI=/servlet/servlet/andy.test.RequestData/open/dfoo
servletPath=/servlet
 =
 ##

 also if I set up Aliases:

 #
 2001-12-12 22:10:22 Request Received at 2001-12-12 22:10:22.611
  characterEncoding=null
  contentLength=-1
contentType=null
 locale=en_GB
locales=en_GB
  parameter=WMRCSession=1008149958182
   protocol=HTTP/1.1
 remoteAddr=127.0.0.1
 remoteHost=127.0.0.1
 scheme=http
 serverName=wma_local2
 serverPort=80
   isSecure=false
 -
contextPath=/servlet
 cookie=WMRCSession=1008149958182
 cookie=JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept-language=en-gb
 header=connection=Keep-Alive
 header=cookie=WMRCSession=1008149958182;
 JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept=*/*
 header=host=wma_local2
 header=accept-encoding=gzip, deflate
 header=user-agent=Mozilla/4.0 (compatible; MSIE 5.5; Windows NT
 5.0)
 method=GET
   pathInfo=/open
queryString=WMRCSession=1008149958182
 remoteUser=null
 requestedSessionId=D03605F26332C358B0F6A10081343290
 requestURI=/servlet/rd/open

RE: getPathInfo() return wrong path info - still an issue

2001-12-12 Thread Andy Olliver

here are the conf files - let us know if any other stuff is helpfull - a WAR
file would be very big (and my companies precious assets).

A.

-Original Message-
From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
R. McClanahan
Sent: 12 December 2001 22:44
To: Tomcat Developers List; [EMAIL PROTECTED]
Subject: Re: getPathInfo() return wrong path info - still an issue


Andy,

Could you package your test case as a WAR and add it to the bug report?
There's no way to know whether the behavior you quote or not is correct
without seeing your servlet mappings, and everything else.

Craig


On Wed, 12 Dec 2001, Andy Olliver wrote:

 Date: Wed, 12 Dec 2001 22:44:48 -
 From: Andy Olliver [EMAIL PROTECTED]
 Reply-To: Tomcat Developers List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: Tomcat Developers List [EMAIL PROTECTED]
 Subject: getPathInfo() return wrong path info - still an issue

 Craig

 This is definitely a problem with build 4.01 - I will try with last nights
 build.

 I have log files (produced by RequestDumperFilter) showing unreliable
 results for  getPathInfo().
 (don't get confused by context = servlet, so when I use Invoker I have
 .../servlet/servlet/)
 I tried this using Invoker and servlet class names, and then with servlet
 aliases.

 ###
 2001-12-12 09:18:22 Request Received at 2001-12-12 09:18:22.276
  characterEncoding=null
  contentLength=-1
contentType=null
 locale=en_GB
locales=en_GB
  parameter=a=dsds
   protocol=HTTP/1.1
 remoteAddr=127.0.0.1
 remoteHost=127.0.0.1
 scheme=http
 serverName=wma_local2
 serverPort=80
   isSecure=false
 -
contextPath=/servlet
 cookie=WMRCSession=1008148444816
 cookie=JSESSIONID=6464919682997592E4D9A533D2B322B9
 header=accept-language=en-gb
 header=connection=Keep-Alive
 header=cookie=WMRCSession=1008148444816;
 JSESSIONID=6464919682997592E4D9A533D2B322B9
 header=accept=*/*
 header=host=wma_local2
 header=accept-encoding=gzip, deflate
 header=user-agent=Mozilla/4.0 (compatible; MSIE 5.5; Windows
NT
 5.0)
 method=GET
   pathInfo=/foo/bar/
queryString=a=dsds
 remoteUser=null
 requestedSessionId=6464919682997592E4D9A533D2B322B9
 requestURI=/servlet/servlet/andy.test.RequestData/foo/bar/
servletPath=/servlet/andy.test.RequestData
 =
 ###
 2001-12-12 22:14:56 Request Received at 2001-12-12 22:14:56.846
  characterEncoding=null
  contentLength=-1
contentType=null
 locale=en_GB
locales=en_GB
  parameter=a=b
   protocol=HTTP/1.1
 remoteAddr=127.0.0.1
 remoteHost=127.0.0.1
 scheme=http
 serverName=wma_local2
 serverPort=80
   isSecure=false
 -
contextPath=/servlet
 cookie=WMRCSession=1008149958182
 cookie=JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept-language=en-gb
 header=connection=Keep-Alive
 header=cookie=WMRCSession=1008149958182;
 JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept=image/gif, image/x-xbitmap, image/jpeg,
 image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel,
 application/msword, */*
 header=host=wma_local2
 header=accept-encoding=gzip, deflate
 header=user-agent=Mozilla/4.0 (compatible; MSIE 5.5; Windows
NT
 5.0)
 method=GET
   pathInfo=/andy.test.RequestData/open/dfoo
queryString=a=b
 remoteUser=null
 requestedSessionId=D03605F26332C358B0F6A10081343290
 requestURI=/servlet/servlet/andy.test.RequestData/open/dfoo
servletPath=/servlet
 =
 ##

 also if I set up Aliases:

 #
 2001-12-12 22:10:22 Request Received at 2001-12-12 22:10:22.611
  characterEncoding=null
  contentLength=-1
contentType=null
 locale=en_GB
locales=en_GB
  parameter=WMRCSession=1008149958182
   protocol=HTTP/1.1
 remoteAddr=127.0.0.1
 remoteHost=127.0.0.1
 scheme=http
 serverName=wma_local2
 serverPort=80
   isSecure=false
 -
contextPath=/servlet
 cookie=WMRCSession=1008149958182
 cookie=JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept-language=en-gb
 header=connection=Keep-Alive
 header=cookie=WMRCSession=1008149958182;
 JSESSIONID=D03605F26332C358B0F6A10081343290
 header=accept=*/*
   

DO NOT REPLY [Bug 5397] New: - Rejecting properly formatted web.xml files

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5397.
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=5397

Rejecting properly formatted web.xml files

   Summary: Rejecting properly formatted web.xml files
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


On Tomcat startup:
PARSE error at line 13 column -1
org.xml.sax.SAXParseException: Element web-app does not allow context-param 
here.

Servlet spec 2.3 does allow for context-param under web-app.

Moving elements around in the web.xml file makes problem go away.
Will attach 2 testcases.  One that causes the problem, one that parses 
successfully.

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




DO NOT REPLY [Bug 5397] - Rejecting properly formatted web.xml files

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5397.
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=5397

Rejecting properly formatted web.xml files





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 15:01 ---
Created an attachment (id=892)
web.xml that fails to parse

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




DO NOT REPLY [Bug 5397] - Rejecting properly formatted web.xml files

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5397.
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=5397

Rejecting properly formatted web.xml files





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 15:03 ---
Created an attachment (id=893)
very similar web.xml that DOES parse correctly

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




DO NOT REPLY [Bug 5397] - Rejecting properly formatted web.xml files

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5397.
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=5397

Rejecting properly formatted web.xml files

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 15:09 ---
The DTD for deployment descriptors is very specific about the *order* of the
elements, not just what their names are.  If you have them in the wrong order,
you will (correctly) get this XML parsing error, because your web.xml file
violates the constraints.

In your particular scenario, you have a tag library element *before* the context
parameter, and this is not allowed.

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




RE: ajpv12 socket closure

2001-12-12 Thread Keith Wannamaker

It turns out that disabling Nagle in Ajp12Interceptor
fixes this problem of lost data.  The question is, why?
I can't imagine that Nagle holds back data during a
socket shutdown.  Yet, I don't have any other explanation.

I'm not going to commit a change for this until I understand
why this solves the problem, but at least the fix is now 
documented for posterity.

Keith


| -Original Message-
| From: Keith Wannamaker [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, December 12, 2001 2:59 PM
| To: [EMAIL PROTECTED]
| Subject: ajpv12 socket closure
| 
| 
| I've been debugging a socket problem in ajpv12 (NT) where bits
| are being written by Tomcat to the socket (back to mod_jk), but
| jk's read fails with a SHUTDOWN.  It's as if the bits don't 
| quite make it onto the wire, and the socket closure is a hard close.
| 
| I thought the point of so_linger was to specify the amount of time
| to try to send the queue bits onto the wire prior to closing the socket.
| 
| Wouldn't this indicate that the present value (100) is too small?
| 
| The relevant t-d thread is 
| http://w6.metronet.com/~wjm/tomcat/2000/Sep/msg00151.html
| 
| Thanks for any info,
| Keith
| 
| --
| To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
| For additional commands, e-mail: mailto:[EMAIL PROTECTED]
| 

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




cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c

2001-12-12 Thread costin

costin  01/12/12 15:36:01

  Modified:jk/native2/common jk_ajp14_worker.c jk_channel_socket.c
jk_env.c jk_handler_response.c jk_jni_worker.c
jk_msg_ajp.c jk_uriMap.c jk_workerEnv.c
   jk/native2/server/apache2 jk_logger_apache2.c
  Log:
  Hunting malloc/frees. minor fixes.
  
  Cosmetic: change p to pool for easier grepping.
  
  We now have only 2 places where malloc/free is used ( only at startup time).
  
  We still need to check and make sure the pools are destroyed/reset when
  needed, but the hard part was getting all the code to use pools.
  
  ( note that I haven't tested the jk_pool code for a while, I'm using
  the apr_pool. When I start udating the other connectors I'll have
  to use jk_pool anyway )
  
  Revision  ChangesPath
  1.7   +4 -6  jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c
  
  Index: jk_ajp14_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_ajp14_worker.c 2001/12/12 21:45:55 1.6
  +++ jk_ajp14_worker.c 2001/12/12 23:36:01 1.7
  @@ -131,14 +131,13 @@
   w-connect_retry_attempts= AJP_DEF_RETRY_ATTEMPTS;
   
   w-channel= NULL;
  +w-secret= NULL;
  
   w-validate= jk_worker_ajp14_validate;
   w-init= jk_worker_ajp14_init;
   w-get_endpoint= jk_worker_ajp14_getEndpoint;
   w-destroy=jk_worker_ajp14_destroy;
   
  -w-logon= NULL; 
  -
   *result = w;
   
   l-jkLog(l, JK_LOG_INFO, ajp14.factory() Created %s %s\n,
  @@ -172,7 +171,6 @@
  ajp14.validate() No secretkey, use AJP13\n);
   proto=AJP13_PROTO;
   aw-proto= AJP13_PROTO;
  -aw-logon= NULL; 
   }
   
   if (proto == AJP13_PROTO) {
  @@ -243,7 +241,7 @@
   }
   
   /* Check if we must execute a logon after the physical connect */
  -if (ae-worker-logon == NULL)
  +if (ae-worker-secret == NULL)
   return JK_TRUE;
   
   /* Do the logon process */
  @@ -519,10 +517,10 @@
   if( secret_key==NULL ) {
   proto=AJP13_PROTO;
   _this-proto= AJP13_PROTO;
  -_this-logon= NULL; 
  +_this-secret=NULL;
   } else {
   /* Set Secret Key (used at logon time) */
  -_this-secret = strdup(secret_key);
  +_this-secret = _this-pool-pstrdup(_this-pool, secret_key);
   }
   
   
  
  
  
  1.7   +13 -5 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
  
  Index: jk_channel_socket.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_channel_socket.c   2001/12/12 21:53:58 1.6
  +++ jk_channel_socket.c   2001/12/12 23:36:01 1.7
  @@ -64,6 +64,8 @@
*  - port
*  - ndelay
*
  + * This channel should 'live' as much as the workerenv. It is stateless.
  + * It allocates memory for endpoint private data ( using endpoint's pool ).
*
* @author:  Gal Shachor [EMAIL PROTECTED]   
* @author: Costin Manolache
  @@ -288,7 +290,8 @@
   jk_channel_socket_data_t *sd=endpoint-channelData;
   if( sd==NULL ) {
   sd=(jk_channel_socket_data_t *)
  -malloc( sizeof( jk_channel_socket_data_t ));
  +endpoint-pool-calloc( endpoint-pool,
  +sizeof( jk_channel_socket_data_t ));
   endpoint-channelData=sd;
   }
   sd-sock=sock;
  @@ -306,8 +309,12 @@
   jk_channel_socket_data_t *chD=endpoint-channelData;
   if( chD==NULL ) 
return JK_FALSE;
  -sd=chD-sock;
   
  +sd=chD-sock;
  +chD-sock=-1;
  +/* nothing else to clean, the socket_data was allocated ouf of
  + *  endpoint's pool
  + */
   return jk_close_socket(sd);
   }
   
  @@ -399,7 +406,8 @@
   
   
   
  -int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, void 
**result,
  +int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, 
  +void **result,
const char *type, const char *name)
   {
   jk_channel_t *_this;
  @@ -409,10 +417,10 @@
*result=NULL;
return JK_FALSE;
   }
  -_this=(jk_channel_t *)pool-alloc(pool, sizeof( jk_channel_t));
  +_this=(jk_channel_t *)pool-calloc(pool, sizeof( jk_channel_t));
   
   _this-_privatePtr= (jk_channel_socket_private_t *)
  - pool-alloc( pool, sizeof( jk_channel_socket_private_t));
  + pool-calloc( pool, sizeof( jk_channel_socket_private_t));
   
   _this-recv= jk_channel_socket_recv; 
   

DO NOT REPLY [Bug 5368] - StandardContextValve changes session state from new to old too late for other Valves

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5368.
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=5368

StandardContextValve changes session state from new to old too late for other Valves





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 16:37 ---
Attaching a sample implementation.  StandardContextValve is currently added to
the pipeline by o.a.c.core.StandardContext, so I add the new Valve in the same
spot (rather than in o.a.c.startup.ContextConfig).  ContextConfig did reference
SCV, but only as an optimization when searching for an authenticator.


The notFound() method is currently duplicated in both the StandardContextValve,
and the new StandardInitialValve.  Also, I'm not especially attached to the
naming scheme for the new Valve (which is based on the word initial), just
wanted to get a patch together.

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




DO NOT REPLY [Bug 5368] - StandardContextValve changes session state from new to old too late for other Valves

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5368.
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=5368

StandardContextValve changes session state from new to old too late for other Valves





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 16:38 ---
Created an attachment (id=895)
Allows use of container valves at both beginning and end of the pipeline

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




DO NOT REPLY [Bug 5401] New: - jsp:include fails on WindowsXP with WSPackb06

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5401.
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=5401

jsp:include fails on WindowsXP with WSPackb06

   Summary: jsp:include fails on WindowsXP with WSPackb06
   Product: Tomcat 4
   Version: Nightly Build
  Platform: PC
OS/Version: Other
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When a jsp:include is used in a JSP page , the contents of included page is not
displayed .This happens only on WIndows XP.

This is one of the JSPs that fail:
*
HTML
HEAD
TITLETest22.jsp : using lt;jsp:include page=includeme.html flush=true
/gt; (Relative Path) /TITLE
/HEAD
BODY BGCOLOR=white

CENTER
FONT COLOR=BLUE
STRONGTest Output/STRONG
/FONT
/CENTER
HR

STRONGTest22.jsp : /STRONG  using lt;jsp:include page=includeme.html
flush=true /gt; ( Relative Path )
  to include a html file contents in this JSP page. 
P


 Content of includeme.html

hr
jsp:include page=includeme.html flush=true / 

hr
 

/BODY
/HTML
*
The output does not contain the contents of includeme.html

This works fine on win2k.

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




DO NOT REPLY [Bug 5402] New: - WarpConnection raise IOException

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5402.
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=5402

WarpConnection raise IOException

   Summary: WarpConnection raise IOException
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: WARP Connector
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The warp connection only work for examples provided by tomcat. When I try to 
run jetspeed portal server under tomcat and apache http server, it crash with 
the following error. Once I change to use ajp13 connector, jetspeed works fine.

I am using apache 1.3.22 win32 binary version and tomcat 4.0.1 win32 binary 
version with mod_webapp module win32 binary version to link between apache http 
server and tomcat.


2001-12-12 11:05:19 [org.apache.catalina.connector.warp.WarpConnection] 
Exception on socket
java.io.IOException: Premature packet header end
at org.apache.catalina.connector.warp.WarpConnection.recv
(WarpConnection.java:237)
at org.apache.catalina.connector.warp.WarpRequestHandler.handle
(WarpRequestHandler.java:112)
at org.apache.catalina.connector.warp.WarpConnection.run
(WarpConnection.java:194)
at java.lang.Thread.run(Thread.java:484)

2001-12-12 11:08:29 [org.apache.catalina.connector.warp.WarpConnector] Error 
accepting requests
java.net.SocketException: socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:421)
at java.net.ServerSocket.implAccept(ServerSocket.java:243)
at java.net.ServerSocket.accept(ServerSocket.java:222)
at org.apache.catalina.connector.warp.WarpConnector.run
(WarpConnector.java:580)
at java.lang.Thread.run(Thread.java:484)

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




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

2001-12-12 Thread billbarker

billbarker01/12/12 20:20:06

  Modified:src/facade22/org/apache/tomcat/facade
LoadOnStartupInterceptor.java
  Log:
  Fix behavior when servlet is a JspFile.
  
  Fix for bug #5390.
  Reported by: Mike [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.4   +19 -22
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/LoadOnStartupInterceptor.java
  
  Index: LoadOnStartupInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/LoadOnStartupInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LoadOnStartupInterceptor.java 2001/06/28 07:10:01 1.3
  +++ LoadOnStartupInterceptor.java 2001/12/13 04:20:06 1.4
  @@ -132,9 +132,8 @@
((ServletHandler)result).getServletInfo().
getJspFile() != null ) {
loadJsp( ctx, result );
  - } else {
  - ((ServletHandler)result).init();
}
  + ((ServletHandler)result).init();
} catch (Throwable ee) {
// it can be ClassNotFound or other - servlet errors
// shouldn't stop initialization
  @@ -155,29 +154,27 @@
log(Initializing JSP with JspWrapper);

// Ugly code to trick JSPServlet into loading this.
  +BaseInterceptor ri[];
ContextManager cm=context.getContextManager();
String path=((ServletHandler)result).getServletInfo().getJspFile();
  - Request request = new Request();
  - Response response = new Response();
  - request.recycle();
  - response.recycle();
  - cm.initRequest(request,response);
  - 
String requestURI = path + ?jsp_precompile=true;
  -
  - if( !path.startsWith( / ) ) path=/ + path;
  - request.requestURI().setString(context.getPath() + path);
  -
  - // this is not used with JspInterceptor, but maybe a jsp servlet is
  - // used
  - request.queryString().setString( jsp_precompile=true );
  - 
  - request.setContext(context);
  -
  - //cm.service( request, response );
  - // If we switch to JspInterceptor, it's enough to process the
  - // request, it'll detect the page and precompile
  - cm.processRequest( request );
  + Request request = cm.createRequest(context, requestURI);
  + Response response = request.getResponse();
  + request.setHandler(result);
  + /* If we switch to JspInterceptor, it's enough to process the
  +request, it'll detect the page and precompile.
  +Note, we can call ContextManager.processRequest since the one
  +thing we do know at this point is that the context isn't started.
  +However, we should be able go jump straight to requestMap.
  + */
  + ri=context.getContainer().
  + getInterceptors(Container.H_requestMap);
  + for( int i=0; i ri.length; i++ ) {
  + if( debug  1 )
  + log( RequestMap  + ri[i] );
  + int status=ri[i].requestMap( request );
  + if( status!=0 ) return ;
  + }
   }
   //  
   // Old logic from Context - probably something cleaner can replace it.
  
  
  

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




DO NOT REPLY [Bug 5390] - jsp-file and load-on-startup and init-param does not work.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5390.
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=5390

jsp-file and load-on-startup and init-param does not work.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 20:23 ---
This is now fixed in the CVS HEAD and will appear in the next nightly.

Note that the initParameter only applies to the JSP page accessed through a 
servlet-mapping of the defined servlet.  Accessing via 
http://myserver/myapp/loadonstartup.jsp is a different servlet.

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




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

2001-12-12 Thread billbarker

billbarker01/12/12 20:26:09

  Modified:.RELEASE-NOTES-3.3.1.txt
  Log:
  Document fix for LoadOnStartup JSP pages.
  
  Revision  ChangesPath
  1.13  +3 -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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- RELEASE-NOTES-3.3.1.txt   2001/12/08 04:57:28 1.12
  +++ RELEASE-NOTES-3.3.1.txt   2001/12/13 04:26:09 1.13
  @@ -3,7 +3,7 @@
Release Notes
=
   
  -$Id: RELEASE-NOTES-3.3.1.txt,v 1.12 2001/12/08 04:57:28 billbarker Exp $
  +$Id: RELEASE-NOTES-3.3.1.txt,v 1.13 2001/12/13 04:26:09 billbarker Exp $
   
   
   This document describes the changes that have been made since the
  @@ -112,6 +112,8 @@
   4826 Fixed AutoWebApp so the dir attribute can be an absolute path on
Windows systems.
   
  +5390  Fixed the behavior of LoadOnStartup servlets when the servlet is
  +  actually a JSP page.
   
   Documentation:
   
  
  
  

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




How to setup the Virtual Directory in Tomcat

2001-12-12 Thread seng-keen . lau

Hi,

I'm new to the TOMCAT, can somebody tell me how/where to setup the virtual directory 
and the port conf in TOMCAT server ?
thanks

Regards
SK LAU


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




DO NOT REPLY [Bug 5390] - jsp-file and load-on-startup and init-param does not work.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5390.
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=5390

jsp-file and load-on-startup and init-param does not work.





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 21:06 ---
So are you saying if I added this:
servlet-mapping
servlet-nameloadonstartup/servlet-name
url-pattern/loadonstartup.jsp/url-pattern
/servlet-mapping

that I would be able to get the init-param value at startup as well as 
subsequent requests for /loadonstartup.jsp since I now have the servlet-mapping 
in place for this jsp-file running off the root context?  I forgot to mention 
that this root context is within a virtual host Host ../Host although 
it should work in whatever host+context this web.xml is associated with.

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




Jk2: error handling and method signatures

2001-12-12 Thread costinm

Hi,

One more change I want to do in jk2 is better error handling. Most of us
spent enough time with java that using an 'int' is very uncomfortable :-)

My proposal is to use jk_env in the same 'style' as in JNI programming.
Each jk method will have as the first parameter a jk_env *env ( that
requires just a bit of regexp ).

Before the first call to a jk method, we'll use a jk_getEnv, which will
return a (pooled) jk_env.

env will have errorString, errorFile, eventually a method throw() that
will set the things. This would allow mod_jk to report the exact problem.

Exactly the same method is used in jni - a jni worker could actually
wrap JNIEnv.

I also believe the code will be easier to read this way.

This is obviously not 'required' - we can live without it. Please let me
know what you think - I implement it pretty quickly.

Costin


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




DO NOT REPLY [Bug 5390] - jsp-file and load-on-startup and init-param does not work.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5390.
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=5390

jsp-file and load-on-startup and init-param does not work.





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 21:41 ---
The virtual host shouldn't matter, although I admit to not having tested 
against it.  The ROOT context isn't treated any differently than any other 
context.

Yes, an explicit mapping will take precedence over the default *.jsp mapping, 
so that you will get the declared servlet (which has the initParameters).

Of course, none of this works unless you build from a cvs checkout, or wait 
until tomorrow's nightly.

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




DO NOT REPLY [Bug 5390] - jsp-file and load-on-startup and init-param does not work.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5390.
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=5390

jsp-file and load-on-startup and init-param does not work.





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 21:50 ---
I'll wait for the nightly build and test it with virtual hosts for you.  If I 
have problems, I will request to reopen this bug report.  Could you mention 
what java source file was patched.

Thanks Much ... Mike

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




Re: error handling and method signatures

2001-12-12 Thread Bill Barker

If you are talking about status codes, I'm -1.  That should be passed
through from Tomcat without change.

If Tomcat hangs up, then there is almost no useful information available, so
there isn't much to report.  If the client hangs up, then like jk1, we
should just stop processing and return OK to Apache.

I'm probably just misunderstanding what situations you are trying to handle
here, so if you can be a little bit more verbose, I'll probably change my
vote.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 9:12 PM
Subject: Jk2: error handling and method signatures


 Hi,

 One more change I want to do in jk2 is better error handling. Most of us
 spent enough time with java that using an 'int' is very uncomfortable :-)

 My proposal is to use jk_env in the same 'style' as in JNI programming.
 Each jk method will have as the first parameter a jk_env *env ( that
 requires just a bit of regexp ).

 Before the first call to a jk method, we'll use a jk_getEnv, which will
 return a (pooled) jk_env.

 env will have errorString, errorFile, eventually a method throw() that
 will set the things. This would allow mod_jk to report the exact problem.

 Exactly the same method is used in jni - a jni worker could actually
 wrap JNIEnv.

 I also believe the code will be easier to read this way.

 This is obviously not 'required' - we can live without it. Please let me
 know what you think - I implement it pretty quickly.

 Costin


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



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




DO NOT REPLY [Bug 5390] - jsp-file and load-on-startup and init-param does not work.

2001-12-12 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5390.
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=5390

jsp-file and load-on-startup and init-param does not work.





--- Additional Comments From [EMAIL PROTECTED]  2001-12-12 22:04 ---
jakarta-
tomcat/src/facade22/org/apache/tomcat/facade/LoadOnStartupIntercepter.java

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




Re: error handling and method signatures

2001-12-12 Thread costinm

On Wed, 12 Dec 2001, Bill Barker wrote:

 If you are talking about status codes, I'm -1.  That should be passed
 through from Tomcat without change.

 If Tomcat hangs up, then there is almost no useful information available, so
 there isn't much to report.  If the client hangs up, then like jk1, we
 should just stop processing and return OK to Apache.

 I'm probably just misunderstanding what situations you are trying to handle
 here, so if you can be a little bit more verbose, I'll probably change my
 vote.

I want mod_jk to display a page saying 'tomcat is temporary down, please
make sure tomcat is started' or something like that. Right now we just
display 'jakarta-handler not available' - and we have no way to know what
was the exact cause for that ( bad config, tomcat not started, something
else ).

It's true, the module that detects an error is logging the error, but the
information is lost for the caller. For example memory allocation errors
or null pointer exceptions should be treated diferently from connection
errors.

is_recoverable is an ugly way to let called code pass some info up ( i.e.
if the error was 'really bad' or not ).

It's pretty hard to come with a list of why exceptions are usefull and
list the use-cases :-)

Costin


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




PATCH: Fix I18N problems in Tomcat 3.3

2001-12-12 Thread Kazuhiro Kazama

Dear Tomcat 3.3 committers,

The atached two patches resolve character corruption problems when
Tomcat 3.3 lists directories or displays an error message in
non-ISO-8859-1 environments.

And I created Japanese resource bundles for Tomcat 3.3 according to
Henri Gomez's advice (Note: they requires the attached patches). I
think it is better to send them to one of committers because they are
a little bit huge.

Could anyone recieve them and commit them to Tomcat 3.3 CVS?

Kazuhiro Kazama ([EMAIL PROTECTED]) NTT Network Innovation Laboratories



Index: src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java,v
retrieving revision 1.15
diff -c -u -r1.15 StaticInterceptor.java
--- src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java   
2001/08/12 02:13:25 1.15
+++ src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java   
+2001/12/13 07:38:04
@@ -465,7 +465,13 @@
}
 
if (! inInclude) {
-   res.setContentType(text/html);
+   String charset = LocaleToCharsetMap.getCharset(Locale.getDefault());
+   if (charset == null || charset.equalsIgnoreCase(ISO-8859-1))
+   res.setContentType(text/html);
+   else {
+   res.setContentType(text/html; charset= + charset);
+   res.setUsingWriter(true);
+   }
buf.write(html\r\n);
buf.write(head\r\n);
buf.write(title);


Index: src/share/org/apache/tomcat/modules/generators/ErrorHandler.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java,v
retrieving revision 1.20
diff -c -u -r1.20 ErrorHandler.java
--- src/share/org/apache/tomcat/modules/generators/ErrorHandler.java2001/10/06 
02:31:10 1.20
+++ src/share/org/apache/tomcat/modules/generators/ErrorHandler.java2001/12/13 
+07:38:35
@@ -63,6 +63,7 @@
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.qlog.Logger;
 import org.apache.tomcat.util.http.HttpMessages;
+import org.apache.tomcat.util.http.LocaleToCharsetMap;
 import java.io.*;
 import java.net.*;
 import java.util.*;
@@ -573,7 +574,13 @@
 
// only include head...body if reset was successful
if ( needsHead ) {
-   res.setContentType(text/html);
+   String charset = LocaleToCharsetMap.getCharset(Locale.getDefault());
+   if (charset == null || charset.equalsIgnoreCase(ISO-8859-1))
+   res.setContentType(text/html);
+   else {
+   res.setContentType(text/html; charset= + charset);
+   res.setUsingWriter(true);
+   }
res.setStatus( 500 );

buf.append(headtitle);



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