Webapp and SSL?

2002-07-07 Thread Sam Ewing

What do we need to do for using SSL when we have a
webapp connector? 

Is all we have to do revolve around getting Apache to
handle SSL? Any special webapp directives in
httpd.conf? What about server.xml changes- do we only
need to set scheme to https and secure to true?
Anything else?

tx,



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: webapp- who handles static content: Tomcat or Apache

2002-07-07 Thread Bill Barker


- Original Message -
From: "Pier Fumagalli" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Sunday, July 07, 2002 4:04 PM
Subject: Re: webapp- who handles static content: Tomcat or Apache


> Sam Ewing <[EMAIL PROTECTED]> wrote:
>
> > I read elsewhere that that mod_webapp fowarded
> > requests for static resources to Tomcat (instead of
> > Apache). Is this fixed? If not, are there workarounds?
>
> It is forwarding requests, and it's definitely the last of my priorities
to
> "fix" (actually I don't even consider it a "bug" anymore).
>

I want some of what he is smoking ;-).

> I wrote an article for OnJava.COM about it. It should be published fairly
> soon (this week AFAIK).
>
> Pier
>
> --
> [Perl] combines all the worst aspects of C and Lisp:  a billion of
different
> sublanguages in  one monolithic executable.  It combines the power of C
with
> the readability of PostScript. [Jamie Zawinski - DNA Lounge - San
Francisco]
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




DO NOT REPLY [Bug 10544] New: - crossContext for servlets not working

2002-07-07 Thread bugzilla

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

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

crossContext for servlets not working 

   Summary: crossContext for servlets not working
   Product: Tomcat 4
   Version: 4.0.4 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Servlet & JSP API
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I am not able to reference resources from one webapp to another in the same 
host. I have previously successfully used the configuration (in 4.03):

   

I also tried adding crossContext="true" to the contexts for each webapp in the 
host. This made no change.

The following (from a page in the ROOT context) gets a 404 error and the host 
log shows the error is for the URI /test.jsp (root cause: 
java.io.FileNotFoundException: /test.jsp), where it previously successfully 
forwarded to the page /webapp2/test.jsp:

RequestDispatcher dispatcher = ctx.getContext
("/webapp2").getRequestDispatcher("/test.jsp");
dispatcher.forward(request, response);

For any value I use in ctx.getContext("/asdas") that begins with a "/", I get 
the current context (non-null), EVEN if the value does not match any existing 
context.

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




DO NOT REPLY [Bug 10541] New: - Content-length header should be automatically set for buffered Servlets/JSPs

2002-07-07 Thread bugzilla

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

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

Content-length header should be automatically set for buffered Servlets/JSPs

   Summary: Content-length header should be automatically set for
buffered Servlets/JSPs
   Product: Tomcat 4
   Version: 4.0.4 Final
  Platform: PC
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Servlet & JSP API
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The Servlet 2.3 API spec on pages 186 (bottom) and 189 (top)
states that if a Servlet (and therefore a JSP also) is using a buffer
and does not fill up
the buffer, (and is not using Chunked transfer encoding)
the container should automatically set the content-length header
if the servlet itself doesn't do it.

This is really more important for JSP's, since custom Servlet's generally
set the content length themselves and don't call response.setBuffer(size)
anyway. JSP's on the other hand, are buffered by default (according to
spec) and really benefit from having the container set the content length
header for them because they basically never bother to do this themselves.

And the reason (in case you need one) that having the
content length header set is important is that it effects performance.
Web browsers, giving a content length, can handle the response more
efficently, and the server can also use persistent connections
(keep-alive), which is impossible w/o content length headers.

So from my testing, Tomcat 4.0.4 doesn't ever set the content length
header automaticaly -- actually I should say I've tested a lot more
with JSP's than plain Servlets, but I assume the piece of code that
would do this is shared by both.

Thanks.

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




DO NOT REPLY [Bug 8006] - native lib not found in common/lib but works in WEB-INF/lib

2002-07-07 Thread bugzilla

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

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

native lib not found in common/lib but works in WEB-INF/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-08 01:08 ---
Bug is fixed with 4.0.4 final

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




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

2002-07-07 Thread nacho

nacho   2002/07/07 17:26:33

  Modified:jk/native2/common jk_signal.c jk_user.c
  Log:
  Less warnings
  
  Revision  ChangesPath
  1.2   +1 -0  jakarta-tomcat-connectors/jk/native2/common/jk_signal.c
  
  Index: jk_signal.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_signal.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_signal.c   11 Jun 2002 22:09:10 -  1.1
  +++ jk_signal.c   8 Jul 2002 00:26:33 -   1.2
  @@ -161,6 +161,7 @@
 const char *type, const char *name)
   {
   result->disabled=JK_TRUE;
  +return JK_FALSE;
   }
   
   #endif
  
  
  
  1.2   +1 -0  jakarta-tomcat-connectors/jk/native2/common/jk_user.c
  
  Index: jk_user.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_user.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_user.c 11 Jun 2002 22:09:10 -  1.1
  +++ jk_user.c 8 Jul 2002 00:26:33 -   1.2
  @@ -145,6 +145,7 @@
 const char *type, const char *name)
   {
   result->disabled=JK_TRUE;
  +return JK_FALSE;
   }
   
   #endif
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c jk_service_iis.c

2002-07-07 Thread nacho

nacho   2002/07/07 17:26:07

  Modified:jk/java/org/apache/jk/common ChannelSocket.java
JkInputStream.java
   jk/native2/common jk_worker_ajp13.c
   jk/native2/include jk_service.h
   jk/native2/server/isapi jk_isapi_plugin.c jk_service_iis.c
  Log:
  * Fix for PUT problmes in tc417+IIS+slide
  
  Revision  ChangesPath
  1.19  +1 -1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java
  
  Index: ChannelSocket.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ChannelSocket.java2 Jul 2002 20:00:15 -   1.18
  +++ ChannelSocket.java8 Jul 2002 00:26:07 -   1.19
  @@ -383,7 +383,7 @@
   
   total_read = this.read(ep, buf, hlen, blen);
   
  -if (total_read <= 0) {
  +if ((total_read <= 0) && (blen > 0)) {
   log.warn("can't read body, waited #" + blen);
   return  -1;
   }
  
  
  
  1.12  +4 -3  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java
  
  Index: JkInputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JkInputStream.java29 Jun 2002 22:39:13 -  1.11
  +++ JkInputStream.java8 Jul 2002 00:26:07 -   1.12
  @@ -276,12 +276,13 @@
   if( log.isDebugEnabled())
   log.debug( "doRead " + pos + " " + blen + " " + available + " " + 
end_of_stream+
  " " + responseChunk.getOffset()+ " " + 
responseChunk.getLength());
  -if( contentLength == pos ) {
  -end_of_stream=true;
  +if( end_of_stream ) {
   return -1;
   }
   if( blen == pos ) {
  -refillReadBuffer();
  +if ( !refillReadBuffer() ){
  +return -1;
  +}
   }
   responseChunk.setBytes( bodyBuff, pos, blen );
   pos=blen;
  
  
  
  1.37  +4 -0  jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- jk_worker_ajp13.c 29 Jun 2002 18:29:51 -  1.36
  +++ jk_worker_ajp13.c 8 Jul 2002 00:26:07 -   1.37
  @@ -496,6 +496,10 @@
   } else {
   err=jk2_worker_ajp13_forwardSingleThread( env, w, s, e );
   }
  +if (err != JK_OK){
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +  "ajp13.service() Error  forwarding %s\n", e->worker->mbean->name);
  +}
   
   if( w->mbean->debug > 0 ) 
   env->l->jkLog(env, env->l, JK_LOG_INFO,
  
  
  
  1.16  +2 -1  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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_service.h  5 Jun 2002 21:56:39 -   1.15
  +++ jk_service.h  8 Jul 2002 00:26:07 -   1.16
  @@ -204,6 +204,7 @@
   unsigned is_chunked;/* 1 if content length is unknown (chunked rq) */
   unsigned no_more_chunks;/* 1 if last chunk has been read */
   long content_read;  /* number of bytes read */
  +int  end_of_stream; /* For IIS avoids blocking calls to 
lpEcb->ReadClient */
   
   /*
* SSL information
  
  
  
  1.36  +3 -3  
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- jk_isapi_plugin.c 6 Jul 2002 08:05:49 -   1.35
  +++ jk_isapi_plugin.c 8 Jul 2002 00:26:07 -   1.36
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
  + *  Copyright (c) 1999-2002 The Apache Software Foundation.  *
*  

DO NOT REPLY [Bug 10539] New: - Active lock discovery returns invalid lock tokens ("dummytoken")

2002-07-07 Thread bugzilla

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

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

Active lock discovery returns invalid lock tokens ("dummytoken")

   Summary: Active lock discovery returns invalid lock tokens
("dummytoken")
   Product: Tomcat 4
   Version: Nightly Build
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Servlets:WebDAV
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Problem:

The reply to PROPFIND queries returns "dummytoken" as lock token 
instead of the correct lock token. This confuses Adobe Golive 6.0 
and Macromedia Dreamweaver MX and they can't be used for editing 
resources on a Tomcat 4 server.

The behaviour is observed on Tomcat 4.x (4.0.4-4.1.7b).


Discussion:
===
This issue has been discussed at least once before, see URL
http://faqchest.dynhost.com/prgm/tomcat-l/tmct-01/tmct-0111/tmct-04/tmct0111
0721_30463.html
where, Remy Maucherat says
>the behavior is correct (servers are allowed to obsfucate 
>lock-tokens returned by a PROPFIND)

I guess this is based on section 13.8 that states:
>13.8 lockdiscovery Property
[---]
>Description: The lockdiscovery property returns a listing of who has
>a lock, 
what type of lock he has, the timeout type and the time
>remaining on the 
timeout, and the associated lock token.  The server
>is free to withhold any or 
all of this information if the requesting
>principal does not have sufficient 
access rights to see the requested
>data.

As I understand it, the server can only refuse to show the lock token
if the user is not authenticated. Now, even when using the right 
credentials, the lock token is not returned by Tomcat.

There is one other applicable example 13.8.1 in the RFC that returns 
the correct token, and as Golive and Dreamweaver does not work at all
with the dummy token enabled, I suggest changing Tomcat's reply to the
correct lock token for PROPFIND queries.

The main reason I can see for providing a dummy token would be that 
anybody listening can unlock it if the correct token is used. This is 
covered in RFC2518 section 6.3:
>Having a lock token provides no special access rights. Anyone can
>find out 
anyone else's lock token by performing lock discovery.
>Locks MUST be enforced 
based upon whatever authentication mechanism
>is used by the server, not based 
on the secrecy of the token values.


Solution:
=
Change WebdavServlet.java to return the correct lock token every time.
For example, the change can be done according to this diff -u file:
(not tested because I can't build Tomcat from sources)

--- WebdavServlet.java  Sun Jul  7 23:37:28 2002
+++ WebdavServlet.java.orig 
Sun Jul  7 22:35:29 2002
@@ -2667,7 +2667,7 @@
  * append an XML 
fragment to the given XML writer.
  */
 public void toXML(XMLWriter generatedXML) {
-toXML(generatedXML, true);
+toXML(generatedXML, false);
 }

Alternatively, there should be a possibility to set the behaviour 
(dummytoken=no/yes) in a configuration file. As this problem is 
quite convoluted to find, the default should be not to use dummies.


Example:

Using Golive 6.0 and Tomcat 4.1.7-beta (as recorded by httpsniffer.pl)
The file /davtest/test.txt contains a short text and was locked by the
same application in the last transaction when the correct lock token
was returned. Now it does a PROPFIND when I'm trying to unlock the file.

>> Query
 --> C05 --> S06  (60) Request 
 --> C05 --> S06 PROPFIND /davtest/test.txt HTTP/1.0
 --> C05 --> S06 accept-language: en_US
 --> C05 --> S06 depth: 0
 --> C05 --> S06 Mime-Version: 1.0
 --> C05 --> S06 Content-Type: text/xml
 --> C05 --> S06 Content-Length: 332
 --> C05 --> S06 Host: localhost:80
 --> C05 --> S06 Connection: keep-alive
 --> C05 --> S06 Keep-Alive: 300
 --> C05 --> S06 Accept: */*
 --> C05 --> S06  Body 332 bytes
 --> C05 --> S06   Body  => http://ns.adobe.com/golive/5.0/";>


<< Reply
 <-- C05 <-- S06  (60) Response 207 to 
 <-- C05 <-- S06 HTTP/1.1 207 Multi-Status
 <-- C05 <-- S06 Content-Type: text/xml; charset=UTF-8
 <-- C05 <-- S06 Connection: close
 <-- C05 <-- S06 Date: Sun, 07 Jul 2002 20:04:18 GMT
 <-- C05 <-- S06 Server: Apache Tomcat/4.1.7 (HTTP/1.1 Connector)
 <-- C05 <-- S06  Body 1031 bytes
 <-- C05 <-- S06   Body  => 
/davtest/test.txt
2002-07-07T19:47:44Z

sv_SE
24
text/plain
24-1026071264185
Sun, 07 Jul 2002 19:47:44 GMT


0
fredrikv
Second-604799
opaquelocktoken:dummytoken




<
/locktype>

HTTP/1.1 200 OK





/Fredrik

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

Re: Fix for bug #8331??

2002-07-07 Thread Pier Fumagalli

Sam Ewing <[EMAIL PROTECTED]> wrote:

> Hi Pier,
> 
> Yes, I am building on Linux (Redhat 7.3).

Aw... I know there are some issues with APR and ATOMICS on Linux (or was it
Solaris? Need to investigate).

> I see a 
> tempval="--enable-static --disable-shared
> --disable-threads"
> in the configure script.. do I knock of the
> disable-threads?

Quick fix? Edit the configure script and when you see the line
  tmpval=" --disable-threads"
Change the disable into enable.. :)

Longer fix, edit configure.in, patch in the same way, re run
support/buildconf.sh and you'll get a new configure script...

> Do you mean my apr_config (I dont see a apr_config.h
> being created..).

Sorry, me dumb... In the APR directory, it's a file called include/apr.h
(without the config part)...

Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


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




Re: Fix for bug #8331??

2002-07-07 Thread Sam Ewing

Hi Pier,

 Yes, I am building on Linux (Redhat 7.3).

 I see a 
tempval="--enable-static --disable-shared
--disable-threads"
 in the configure script.. do I knock of the
disable-threads?

 Do you mean my apr_config (I dont see a apr_config.h
being created..).

 It looks like this:
"
prefix="/usr/local"
exec_prefix="${prefix}"
bindir="${exec_prefix}/bin"
libdir="/home/sam/jakarta-tomcat-connectors/webapp/objects"
datadir="${prefix}/share"
installbuilddir="${prefix}/share/build"
includedir="${prefix}/include"

CC="gcc"
CPP="gcc -E"
SHELL="/bin/sh"
CPPFLAGS="-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE"
CFLAGS="-g -O2"
LDFLAGS=""
LIBS="-lm -lcrypt -lnsl  -ldl"
EXTRA_INCLUDES=""
SHLIBPATH_VAR="LD_LIBRARY_PATH"
APR_SOURCE_DIR="/home/sam/jakarta-tomcat-connectors/webapp/apr"
APR_SO_EXT="lo"
APR_LIB_TARGET="-rpath \$(libdir) \$\$objects"

show_usage()
...
"

 Thanks!

 
> I know. The webapp configure actually forces threads
> to be disabled because
> of the way in which they don't work that great with
> Apache 1.3. But of
> course this disables ATOMICS, which is not what you
> want...
> 
> It is really odd, because all the atomics code I can
> see is actually
> ifdef(ed) out with APR_HAS_THREADS, but somehow it
> gets foobared up
> somewhere...
> 
> UNLESS, don't tell me you're building it on Linux...
> Can you send me over
> your apr_config.h file after configure is run?
> 
> Pier
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: Fix for bug #8331??

2002-07-07 Thread Pier Fumagalli

Sam Ewing <[EMAIL PROTECTED]> wrote:

> Thanks Pier- its working with Apache 2.0 now.

Toldya! :)

> How do I solve the apache 1.3 problem though?
> 
> I tried rebuilding the connector as
> 
> $ ./configure --with-apxs=/path/apache1.3/bin/apxs
> --enable-threads
> $ make
> 
> But I still get the same problem..

I know. The webapp configure actually forces threads to be disabled because
of the way in which they don't work that great with Apache 1.3. But of
course this disables ATOMICS, which is not what you want...

It is really odd, because all the atomics code I can see is actually
ifdef(ed) out with APR_HAS_THREADS, but somehow it gets foobared up
somewhere...

UNLESS, don't tell me you're building it on Linux... Can you send me over
your apr_config.h file after configure is run?

Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


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




Re: webapp- who handles static content: Tomcat or Apache

2002-07-07 Thread Pier Fumagalli

Sam Ewing <[EMAIL PROTECTED]> wrote:

> I read elsewhere that that mod_webapp fowarded
> requests for static resources to Tomcat (instead of
> Apache). Is this fixed? If not, are there workarounds?

It is forwarding requests, and it's definitely the last of my priorities to
"fix" (actually I don't even consider it a "bug" anymore).

I wrote an article for OnJava.COM about it. It should be published fairly
soon (this week AFAIK).

Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


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




Re: Fix for bug #8331??

2002-07-07 Thread Sam Ewing

Thanks Pier- its working with Apache 2.0 now.

How do I solve the apache 1.3 problem though?

I tried rebuilding the connector as

$ ./configure --with-apxs=/path/apache1.3/bin/apxs
--enable-threads
$ make

But I still get the same problem..

> That's because the latest APR has introduced a
> "flaw" (doesn¹t support
> atomics if --disable-threads - and that's how we
> compile APR).


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




webapp- who handles static content: Tomcat or Apache

2002-07-07 Thread Sam Ewing

I read elsewhere that that mod_webapp fowarded
requests for static resources to Tomcat (instead of
Apache). Is this fixed? If not, are there workarounds?

Tx,

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




RE: [PATCH] experimental jk2 iis thread pool

2002-07-07 Thread Ignacio J. Ortega

+1000! Commit then review :), i've barely tested it, seems to work..,
this was needed from many time ago, i've tried to use the automatic
pooling capabilities, but i was stucked when trying to separate filter
and extension, ;), Thanks..

Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> De: Mladen Turk [mailto:[EMAIL PROTECTED]]
> Enviado el: 6 de julio de 2002 17:27
> Para: [EMAIL PROTECTED]
> Asunto: [PATCH] experimental jk2 iis thread pool
> 
> 
> Hi,
> 
> Before going to commit something I would like to hear some 
> opinions, and
> tests preferably.
> 
> Here are some facts:
> IIS maintains a pool of threads to handle incoming HTTP 
> requests.  When
> all of these threads are in use, new requests will be 
> rejected.  If all
> the pool threads are in a wait state (for instance, running our dll),
> IIS may reject incoming requests even if there is plenty of 
> CPU power to
> handle them.
> 
> Now since we basically most of the are waiting for a TC to 
> respond, the
> thread pool and the patch I'm proposing effectively deals with choking
> the server.
> 
> To set the things up, you'll need to (beside the patches) put the
> 'threadPool' with the value of 10 or higher in the i_r2 registry
> configuration. Lesser values doesn't make sense.
> 
> The thread pool manager currently doesn't do anything, but my 
> intention
> is to make him a watcher for a hanged responses, and dynamic pool
> allocator. The pool itself is static (defined by the threadPool
> configuration value), but it will be extended with the min/max size,
> closing unused connections after a peak load.
> 
> Comments?
> 
> MT.
> ICQ# 163961212
> 

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




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-07-07 Thread Mladen Turk

> -Original Message-
> From: Mladen Turk [mailto:[EMAIL PROTECTED]] 
> Sent: 7. srpanj 2002 21:50
> To: 'Tomcat Developers List'
> Subject: RE: cvs commit: 
> jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c
> > 
> > Mladen, there are 2 ways to configure i_r2.dll, with a
> 
> I'm aware of that, but the problem is that all that has to 
> happen in the
> phase that we don't have a environment created yet. The solution is
> either to create the environment prior to or inside the 
> GetFilterVersion

Ok, it can be used in the GetFilterVersion, just tested moving creation
to that function.
I'll change that tomorrow to use the existing config param mechanism.

MT.


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




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-07-07 Thread Mladen Turk



> -Original Message-
> From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] 
> Sent: 7. srpanj 2002 21:28
> To: 'Tomcat Developers List'
> Subject: RE: cvs commit: 
> jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c
> 
> 
> Mladen, there are 2 ways to configure i_r2.dll, with a 
> properties file in the same dir where the dll resides, and 
> using the registry, i'm all to this patch but i like to see 
> it configurable in the p file aswell, right now this needs to 
> have jk2 inited as is using jk2 own p files reading methods, 
> using jk2 pools and map objets and so on , see 
> read_registry_init_data in jk_isapi_plugin.c.., 
> 

I'm aware of that, but the problem is that all that has to happen in the
phase that we don't have a environment created yet. The solution is
either to create the environment prior to or inside the GetFilterVersion
to be able to use the current file or registry functions, or use the one
I've created.
Since I think that this patch is only temporary solution to the
SF_NOTIFY_AUTH_COMPLETE problems, and will eventually disappear,
rearranging environment creation process and initialization would be IMO
overhead.
But if you can think of a cleaner solution that wouldn't involve any
kind of locking inside either DllMain or GetFilterVersion, and that way
locking the iis itself, than we could use the existing configuration
mechanism.

MT.



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




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c

2002-07-07 Thread Ignacio J. Ortega

Mladen, there are 2 ways to configure i_r2.dll, with a properties file
in the same dir where the dll resides, and using the registry, i'm all
to this patch but i like to see it configurable in the p file aswell,
right now this needs to have jk2 inited as is using jk2 own p files
reading methods, using jk2 pools and map objets and so on , see
read_registry_init_data in jk_isapi_plugin.c.., 

Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Enviado el: 6 de julio de 2002 10:06
> Para: [EMAIL PROTECTED]
> Asunto: cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi
> jk_isapi_plugin.c
> 
> 
> mturk   2002/07/06 01:05:49
> 
>   Modified:jk/native2/server/isapi jk_isapi_plugin.c
>   Log:
>   Fix the Q250397 bug introducing authComplete registry param
>   that one when set enables the SF_NOTIFY_AUTH_COMPLETE
>   filter notification.
>   Remove the iis5 version checking acordingly using new approach.
>   
>   Revision  ChangesPath
>   1.35  +83 -46
> jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
>   
>   Index: jk_isapi_plugin.c
>   ===
>   RCS file: 
> /home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk
> _isapi_plugin.c,v
>   retrieving revision 1.34
>   retrieving revision 1.35
>   diff -u -r1.34 -r1.35
>   --- jk_isapi_plugin.c   5 Jul 2002 08:12:09 -   1.34
>   +++ jk_isapi_plugin.c   6 Jul 2002 08:05:49 -   1.35
>   @@ -85,6 +85,7 @@
>#define SERVER_ROOT_TAG ("serverRoot")
>#define EXTENSION_URI_TAG   ("extensionUri")
>#define WORKERS_FILE_TAG("workersFile")
>   +#define USE_AUTH_COMP_TAG   ("authComplete")
>
>
>static char  file_name[_MAX_PATH];
>   @@ -93,7 +94,7 @@
>static int   is_inited = JK_FALSE;
>static int   is_mapread = JK_FALSE;
>static int   was_inited = JK_FALSE;
>   -static int   iis5 = -1;
>   +static int   auth_notification_flags = 0;
>
>static jk_workerEnv_t *workerEnv;
>static apr_pool_t *jk_globalPool;
>   @@ -117,7 +118,7 @@
>
>
>static jk_env_t* jk2_create_config();
>   -
>   +static int get_auth_flags();
>
>
>static void write_error_response(PHTTP_FILTER_CONTEXT 
> pfc,char *status,char * msg)
>   @@ -151,20 +152,23 @@
>if (pVer->dwFilterVersion > http_filter_revision) {
>pVer->dwFilterVersion = http_filter_revision;
>}
>   -
>   +auth_notification_flags = get_auth_flags();
>#ifdef SF_NOTIFY_AUTH_COMPLETE
>   -
>   -pVer->dwFlags = SF_NOTIFY_ORDER_HIGH| 
>   -SF_NOTIFY_SECURE_PORT   | 
>   -SF_NOTIFY_NONSECURE_PORT|
>   -SF_NOTIFY_PREPROC_HEADERS   |
>   -SF_NOTIFY_AUTH_COMPLETE;
>   -#else
>   -pVer->dwFlags = SF_NOTIFY_ORDER_HIGH| 
>   -SF_NOTIFY_SECURE_PORT   | 
>   -SF_NOTIFY_NONSECURE_PORT|
>   -SF_NOTIFY_PREPROC_HEADERS;   
>   +if (auth_notification_flags == SF_NOTIFY_AUTH_COMPLETE) {
>   +pVer->dwFlags = SF_NOTIFY_ORDER_HIGH| 
>   +SF_NOTIFY_SECURE_PORT   | 
>   +SF_NOTIFY_NONSECURE_PORT|
>   +SF_NOTIFY_PREPROC_HEADERS   |
>   +SF_NOTIFY_AUTH_COMPLETE;
>   +}
>   +else
>#endif
>   +{
>   +pVer->dwFlags = SF_NOTIFY_ORDER_HIGH| 
>   +SF_NOTIFY_SECURE_PORT   | 
>   +SF_NOTIFY_NONSECURE_PORT|
>   +SF_NOTIFY_PREPROC_HEADERS;   
>   +}
>
>strcpy(pVer->lpszFilterDesc, VERSION_STRING);
>
>   @@ -201,28 +205,8 @@
>}
>if (is_inited && is_mapread) {
>env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
>   -if (is_inited && (iis5 < 0) ) {
>   -char serverSoftware[256];
>   -DWORD dwLen = sizeof(serverSoftware);
>   -iis5=0;
>   -if 
> (pfc->GetServerVariable(pfc,SERVER_SOFTWARE, serverSoftware, &dwLen)){
>   -iis5=(atof(serverSoftware + 14) >= 5.0);
>   -if (iis5) {
>   -env->l->jkLog(env, env->l,  
> JK_LOG_INFO,"Detected IIS >= 5.0\n");
>   -} else {
>   -env->l->jkLog(env, env->l,  
> JK_LOG_INFO,"Detected IIS < 5.0\n");
>   -}
>   -}
>   -}
>   -#ifdef SF_NOTIFY_AUTH_COMPLETE
>   -if (is_inited &&
>   - (((SF_NOTIFY_PREPROC_HEADERS == 
> dwNotificationType) && !iis5) ||
>   -  ((SF_NOTIFY_AUTH_COMPLETE   == 
> dwNotificationType) &&  iis5)
>   -  )
>   -)
>   -#else
>   -if (is_inited && (SF_NOTIFY_PREPROC_HEADERS == 
> dwNotificationType))
>  

RE: POST Problems Was: RE: [VOTE] 4.1.7 stability rating

2002-07-07 Thread Ignacio J. Ortega

> De: Mladen Turk [mailto:[EMAIL PROTECTED]]
> Enviado el: 6 de julio de 2002 5:46

> That's the problem Nacho and I were discussing of the list.
> All that has to do with the SF_NOTIFY_AUTH_COMPLETE. Some WIN2K's are

The problem i'm facing and tryingto resolve is related to the read
metods in jk2_iis_service.c, it seems this method is expected to work in
a different way that it's built now, the problems are there since i
first cut&pasted this method from the old c file, the difference is that
i'm testing slide, that makes big posts easy, in addition to some signed
unsigned arithmetics, you know, 49152 - 57338 = 4294959110 ;)

So there are 2 different issues.. SF_NOTIFY_AUTH_COMPLETE & mine 

Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> Para: 'Tomcat Developers List'
> Asunto: RE: POST Problems Was: RE: [VOTE] 4.1.7 stability rating
> 
> 
> 
> 
> > -Original Message-
> > From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] 
> > Sent: 6. srpanj 2002 1:28
> > To: 'Tomcat Developers List'
> > Subject: POST Problems Was: RE: [VOTE] 4.1.7 stability rating
> > 
> > 
> > I'm trying JK2 ( native& java ) of course, i've got this logs:
> > 
> > Jul 06 01:16:36 2002] (error ) [jk_service_iis.c (202)] 
> > jk_ws_service_t::read, ReadClient failed
> 
> 
> working depending on the service pack applied, but XP fails no matter
> what. So the proposal is to disable that by default and make that
> configurable through config param (and if works on the particular
> version then ok :), until some mighty service packs appear.
> The other thought is that our code is totally wrong and works only by
> pure luck on some iis versions, but I doubt that cause there is an
> official MSKB Q250397 article explaining that as a bug on the WIN2K
> without SP1 applied.
> 
> It's a pretty big showstopper causing all POST requests to fail, and
> will be fixed today I hope.
> 
> MT.
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




Re: Fix for bug #8331??

2002-07-07 Thread Pier Fumagalli

Sam Ewing <[EMAIL PROTECTED]> wrote:

> Hi Pier,
> 
> Did just that. Apachectl configtest gives a 'Syntax
> OK'; however when I start apache, 'apachectl start'
> fails with the following error:
> 
> "
> (13)Permission denied: make_sock: could not bind to
> address 0.0.0.0:80
> no listening sockets available, shutting down
> "

Shut down Apache, don't restart it, and make sure all processes are out.
There are some issues when shutting down ATM, some of the children need to
be killed -9 by the parent process.

> From your config directives, I assumes that you are
> Apache 1.3 ('libexec' instead of 'modules'). I tried
> to move to Apache 1.3;  but I get the following
> errors:
> "
> Syntax error on line 206 of
> /home/sam/http/conf/httpd.conf:
> Cannot load /home/sam/http/libexec/mod_webapp.so into
> server: /home/sam/http/libexec/mod_webapp.so:
> undefined symbol: apr_atomic_set
> ./apachectl start: httpd could not be started
> "

That's because the latest APR has introduced a "flaw" (doesn¹t support
atomics if --disable-threads - and that's how we compile APR).

> Help!!

Apache 2.0 works no problem... The permission denied you're getting comes
from somewhere else...

Pier


> --- Pier Fumagalli <[EMAIL PROTECTED]> wrote:
>> Sam Ewing <[EMAIL PROTECTED]> wrote:
>> 
>>> I am on Apache 2.0.39 and Tomcat 4.1.3, and the
>> latest
>>> webapp connector code, fresh from CVS.
>>> 
>>> I am facing a "Invalid virtual host name" error
>> from
>>> Apache with this configuration:
>>> 
>>>  LoadModule webapp_module libexec/mod_webapp.so
>>>  WebAppConnection conn warp localhost:8008
>>>  WebAppDeploy examples conn /examples
>>> 
>>> This seems to be identical to bug#8331. Any fixes?
>>> 
>>> 
>> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331
>> 
>> I runs on my own system here... Did you remember to
>> put the "ServerName"
>> directive in your virtual host? This is how my
>> httpd.conf (relevant part of
>> virtualhosts looks like):
>> 
>> [...]
>> LoadModule webapp_module libexec/mod_webapp.so
>> [...]
>> ServerName blossom.betaversion.org:80
>> [...]
>> WebAppConnection local warp 127.0.0.1:8008
>> [...]
>> NameVirtualHost *
>> 
>> 
>> ServerName blossom.betaversion.org:80
>> # DocumentRoot [inherited from main]
>> # ServerAdmin [inherited from main]
>> 
>> WebAppInfo /webapp-status
>> [...]
>> 
>> 
>> 
>> ServerName www1.blossom:80
>> DocumentRoot
>> /Library/Services/Apache2/Sites/www1
>> # ServerAdmin [inherited from main]
>> 
>> WebAppDeploy svnview local /svnview
>> [...]
>> 
>> 
>> Anyhow, this is being fixed... TC should have no
>> clue of what is a virtual
>> host, it just needs to know that a request is mapped
>> to a particular
>> context, no need to care about anything else...
>> 
>> Pier
>> 
>> --
>> [Perl] combines all the worst aspects of C and Lisp:
>>  a billion of different
>> sublanguages in  one monolithic executable.  It
>> combines the power of C with
>> the readability of PostScript. [Jamie Zawinski - DNA
>> Lounge - San Francisco]
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> 
>> For additional commands, e-mail:
>> 
>> 
> 
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


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




Re: Fix for bug #8331??

2002-07-07 Thread Sam Ewing

Hi Pier,

Did just that. Apachectl configtest gives a 'Syntax
OK'; however when I start apache, 'apachectl start'
fails with the following error:

"
(13)Permission denied: make_sock: could not bind to
address 0.0.0.0:80
no listening sockets available, shutting down
"

>From your config directives, I assumes that you are
Apache 1.3 ('libexec' instead of 'modules'). I tried
to move to Apache 1.3;  but I get the following
errors:
"
Syntax error on line 206 of
/home/sam/http/conf/httpd.conf:
Cannot load /home/sam/http/libexec/mod_webapp.so into
server: /home/sam/http/libexec/mod_webapp.so:
undefined symbol: apr_atomic_set
./apachectl start: httpd could not be started
"

Help!!
 
--- Pier Fumagalli <[EMAIL PROTECTED]> wrote:
> Sam Ewing <[EMAIL PROTECTED]> wrote:
> 
> > I am on Apache 2.0.39 and Tomcat 4.1.3, and the
> latest
> > webapp connector code, fresh from CVS.
> > 
> > I am facing a "Invalid virtual host name" error
> from
> > Apache with this configuration:
> > 
> >  LoadModule webapp_module libexec/mod_webapp.so
> >  WebAppConnection conn warp localhost:8008
> >  WebAppDeploy examples conn /examples
> > 
> > This seems to be identical to bug#8331. Any fixes?
> > 
> >
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331
> 
> I runs on my own system here... Did you remember to
> put the "ServerName"
> directive in your virtual host? This is how my
> httpd.conf (relevant part of
> virtualhosts looks like):
> 
> [...]
> LoadModule webapp_module libexec/mod_webapp.so
> [...]
> ServerName blossom.betaversion.org:80
> [...]
> WebAppConnection local warp 127.0.0.1:8008
> [...]
> NameVirtualHost *
> 
> 
> ServerName blossom.betaversion.org:80
> # DocumentRoot [inherited from main]
> # ServerAdmin [inherited from main]
> 
> WebAppInfo /webapp-status
> [...]
> 
> 
> 
> ServerName www1.blossom:80
> DocumentRoot
> /Library/Services/Apache2/Sites/www1
> # ServerAdmin [inherited from main]
> 
> WebAppDeploy svnview local /svnview
> [...]
> 
> 
> Anyhow, this is being fixed... TC should have no
> clue of what is a virtual
> host, it just needs to know that a request is mapped
> to a particular
> context, no need to care about anything else...
> 
> Pier
> 
> --
> [Perl] combines all the worst aspects of C and Lisp:
>  a billion of different
> sublanguages in  one monolithic executable.  It
> combines the power of C with
> the readability of PostScript. [Jamie Zawinski - DNA
> Lounge - San Francisco]
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




DO NOT REPLY [Bug 10531] New: - Allow clean build of Coyote from CVS

2002-07-07 Thread bugzilla

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

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

Allow clean build of Coyote from CVS

   Summary: Allow clean build of Coyote from CVS
   Product: Tomcat 4
   Version: 4.0.4 Final
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote HTTP/1.1
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The CVS version of the coyote build.xml file does not include a reference to
Tomcat's servlet.jar file, causing a clean build from CVS to fail. This patch
adds the reference. This on a CVS version from about 1st July, 2002.

Can't see a way to attach the patch itself, so pasting into the bug report :)



--- jakarta-tomcat-connectors.orig/coyote/build.xml Mon Jun 24 20:32:39 2002
+++ jakarta-tomcat-connectors/coyote/build.xml  Wed Jul  3 22:28:02 2002
@@ -28,7 +28,7 @@
   
   
   
-
+  

@@ -76,6 +76,7 @@
 
 
 
+
 
 
   
@@ -97,6 +98,7 @@
 
 
 
+
 
   

@@ -280,4 +282,4 @@
   


-
\ No newline at end of file
+

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




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/apr TomcatStarter.java

2002-07-07 Thread mturk

mturk   2002/07/07 04:09:01

  Modified:jk/java/org/apache/jk/apr TomcatStarter.java
  Log:
  Fix the reporting of 'No class found'  error message on the stderr.
  
  Revision  ChangesPath
  1.12  +4 -1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/apr/TomcatStarter.java
  
  Index: TomcatStarter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/apr/TomcatStarter.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TomcatStarter.java1 Jul 2002 23:12:33 -   1.11
  +++ TomcatStarter.java7 Jul 2002 11:09:00 -   1.12
  @@ -26,6 +26,7 @@
   
   public static void main( String args[] ) {
   System.err.println("TomcatStarter: main()");
  +int nClasses = 0;
   
   try {
   AprImpl.jniMode();
  @@ -39,13 +40,15 @@
   continue;
   }
   if( c!= null ) {
  +++nClasses;
   Thread startThread=new Thread( new TomcatStarter(c, args));
   c=null;
   startThread.start();
   break;
   }
   }
  -System.err.println("No class found  ");
  +if (nClasses==0)
  +System.err.println("No class found  ");
   
   } catch (Throwable t ) {
   t.printStackTrace(System.err);
  
  
  

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




DO NOT REPLY [Bug 10527] - SSL socket error shuts down access to HTTPS pages

2002-07-07 Thread bugzilla

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

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

SSL socket error shuts down access to HTTPS pages

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-07-07 08:07 ---
Assuming this actually happens (it doesn't for me), it is a problem with your
client. It is unlikely that the phenomenon you describe then happens, as this
stack trace was printed out at a much higher level that the socket handling code
(it wasn't an uncaught exception).

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