mod_jk - Apache flush stream issues

2006-02-03 Thread Dirk Slootmaekers

hello,

I have developped a J2EE application, based on tomcat that is streaming 
dynamic content into a JSP page. To do that I'm using the 
writer.write("v"); command and do a response.flushbuffer()


these 2 actions are in a try and catch. When I test my application only 
using tomcat and I kill the connection from the IE6 to the tomcat, tomcat 
sees that the stream is dead, since the writer.write and flushbuffer produce 
an exception. This is great.


The problem is now when I'm using Apache (2.0.54) with mod_jk (1.2.14) and 
tomcat.


When I kill the connection between the IE6 and Apache, tomcat is not aware 
of this and keeps on streaming info, eventhough I use the 
response.flushbuffer. I know the issue is related with the caching and that 
the mod_jk keeps open the connection, therefor tomcat does not see that the 
connection with the browser is gone.


I tried several possibilities (downgading HTTP 1.1 to HTTP 1.0 on apache, 
removing keepalive for mod_jk, try mod_proxy_ajp and Apache 2.2.0) but 
without success.


Can somebody help me on this on?

thanks
Dirk

_
Bescherm je Inbox: Phishing - hoe te herkennen, rapporteren en voorkomen
http://www.msn.be/security/phishing/



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



Re: svn commit: r371765 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java

2006-02-03 Thread Remy Maucherat

Jan Luehe wrote:

I don't think you are misunderstanding the spec.

See the following javadocs snippets from ServletResponse:

public String getCharacterEncoding():

 * If no character encoding
 * has been specified, ISO-8859-1 is returned.


public PrintWriter getWriter() throws IOException:

 * If the response's character encoding has not been
 * specified as described in getCharacterEncoding
 * (i.e., the method just returns the default value
 * ISO-8859-1), getWriter
 * updates it to ISO-8859-1.


public void setCharacterEncoding(String charset):

 * Containers *must* communicate the character encoding used for
 * the servlet response's writer to the client if the protocol
 * provides a way for doing so. In the case of HTTP, the character
 * encoding is communicated as part of the Content-Type
 * header for text media types.


Yes, but the strict dumb application of what ended up being written 
written is definitely not what they intended, because it brings no 
benefits. I think everyone agrees that if the application is very 
careful about not specifying a charset anywhere, it shouldn't be 
forcefully added to the content-type header.


Anyway:
- Did you read the "for text media types" portion ? I find it important.
- "communicated as part of the Content-Type header": ISO-8859-1 is the 
default for HTTP, so one could consider it is communicated even if it is 
not physically present in the Content-Type header.


Rémy

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



Re: Building Tomcat

2006-02-03 Thread Bob Herrmann
Thanks Henri.  It turns out it might have been an issue related to 
jpackage.org.  Namely that on Linux I expected,


   export ANT_HOME=/tmp/apache-ant-1.6.5
   export PATH=$ANT_HOME/bin:$PATH

would run the right version of ant.  Alas ant seems to also use this 
file "/etc/ant.conf" (presumably only on Linux) which ignores the set 
ANT_HOME and overrides it, unless  you run it like this,


   $ ant --noconfig

This kinda blows my mind.  And it is unlike the JDK (when you set 
JAVA_HOME, and add the right one to your path, you get the one you wanted.)


-bob

Henri Gomez wrote:


Did you take a look at jpackage projet www.jpackage.org for prebuild
tomcat 5 Rpms ?

http://www.jpackage.org/rpm.php?id=2772


2006/1/31, Mladen Turk <[EMAIL PROTECTED]>:
 


Bob Herrmann wrote:
   


seems you need both "ant1.5" and "ant1.5" to compile tomcat 5.0

 


Come one :)
I think you have a serious problems with your setup.


   


If you first run "ant1.5" (from a clean setup) you will get this error,

 


Well, lots of us are building Tomcat on a daily basis, so
I would guess that you've tried something no-one ever
anticipated.

Regards,
Mladen.



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


   



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

 




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



RE: svn commit: r371765 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java

2006-02-03 Thread Final Draft Info
Could you please remove us from this email distribution list?

Thanks.

Final Draft Support

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 02, 2006 11:32 AM
To: 'Tomcat Developers List'
Subject: RE: svn commit: r371765 - 
/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java

 

> -Original Message-
> From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 02, 2006 4:02 AM
> To: Tomcat Developers List
> Subject: Re: svn commit: r371765 - 
> /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catali
> na/connector/Response.java
> 
> Bill Barker wrote:
> > Yes, RFC 2616 does specify iso-latin-1 as the default for 
> HTTP/1.1 clients. 
> > However, section 3.4.1 is also relevant for HTTP/1.0 
> clients (like, say, the 
> > TCK :).  In any case, it doesn't matter since section 5.4 
> of the servlet 
> > spec says "must".  Complaints go to the expert group;  here 
> we just develop 
> > Tomcat.
> 
> Ok, so I asked the expert group, and many people interpret the 
> specification as I do (and is logical to do): if the 
> application uses a 
> writer, and never specifies the charset in any way, the 
> container has no 
> business rewriting the content-type header to include 
> ";charset=ISO-8859-1".
> 

Then they should make the language in the spec clearer ;-).

If I'm misunderstanding the spec, then I don't have a valid reason for my
veto.  Consider the veto withdrawn.

> Rémy
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 




This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.



In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.



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


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



RE: DO NOT REPLY [Bug 34107] - session already invalidated before valueUnbound() called

2006-02-03 Thread Final Draft Info
Could you please remove us from the distribution list? 

Final Draft Support.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 02, 2006 10:36 AM
To: tomcat-dev@jakarta.apache.org
Subject: DO NOT REPLY [Bug 34107] - session already invalidated before
valueUnbound() called

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=34107





--- Additional Comments From [EMAIL PROTECTED]  2006-02-02
19:35 ---
(In reply to comment #13)
> (In reply to comment #12)
> > Well re-reading the spec, it finally seems that this the way the 2.4

servlet 
> > is interpreted, but honestly I don't get the interest of it.
> Don't worry, I don't see it either.

That's fun, I've since found a lot of threads about it :
http://issues.apache.org/bugzilla/show_bug.cgi?id=36994
http://jira.opensymphony.com/browse/CACHE-229

Someone even told to complain to [EMAIL PROTECTED] , and 
apparently "they" kept it in 2.4 and even in 2.5.

Do you think it may change anything to complain ? Cause I really agree
with 
developers taking part of the discussion, this "simple" change will
break a 
lot of framework, and I really really don't get the interest of the 
sessionListener anymore :))

-- 
Configure bugmail:
http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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


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



Re: Building Tomcat

2006-02-03 Thread Bob Herrmann


yea, I might be bonkers.Now I can't even seem to get to the cvs 
repo.  I vaguely recall an effort to get everything on svn... is this a 
part of that?


$ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
Logging in to :pserver:[EMAIL PROTECTED]:2401/home/cvspublic
CVS password: anoncvs
Fatal error, aborting.
anoncvs: no such user


Mladen Turk wrote:


Bob Herrmann wrote:


seems you need both "ant1.6" and "ant1.5" to compile tomcat 5.0



Come one :)
I think you have a serious problems with your setup.



If you first run "ant1.5" (from a clean setup) you will get this error,
  



Well, lots of us are building Tomcat on a daily basis, so
I would guess that you've tried something no-one ever
anticipated.

Regards,
Mladen.



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




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



Re: Building Tomcat

2006-02-03 Thread Mark Thomas
Bob Herrmann wrote:
> 
> yea, I might be bonkers.Now I can't even seem to get to the cvs
> repo.  I vaguely recall an effort to get everything on svn... is this a
> part of that?
> 
> $ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
> Logging in to :pserver:[EMAIL PROTECTED]:2401/home/cvspublic
> CVS password: anoncvs
> Fatal error, aborting.
> anoncvs: no such user

cvs has been switched off. Details for accessing svn are on the tomcat
website.
http://tomcat.apache.org/svn.html

Mark


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



Re: mod_jk - Apache flush stream issues

2006-02-03 Thread Mark Thomas
Please do not cross-post. This question belongs on the users list.

Mark



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



Re: Building Tomcat

2006-02-03 Thread Bob Herrmann


Ok,  Is 5.0 a valid build target, or is its usage discouraged?

I was following the build instructions for building tomcat 5.0
 http://tomcat.apache.org/tomcat-5.0-doc/building.html
the build.xml that it provides use CVS tags to extract the 5.0 bits.

-bob

Mark Thomas wrote:


Bob Herrmann wrote:
 


yea, I might be bonkers.Now I can't even seem to get to the cvs
repo.  I vaguely recall an effort to get everything on svn... is this a
part of that?

$ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
Logging in to :pserver:[EMAIL PROTECTED]:2401/home/cvspublic
CVS password: anoncvs
Fatal error, aborting.
anoncvs: no such user
   



cvs has been switched off. Details for accessing svn are on the tomcat
website.
http://tomcat.apache.org/svn.html

Mark


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




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



Re: Building Tomcat

2006-02-03 Thread Mark Thomas
Bob Herrmann wrote:
> 
> Ok,  Is 5.0 a valid build target, or is its usage discouraged?
> 
> I was following the build instructions for building tomcat 5.0
>  http://tomcat.apache.org/tomcat-5.0-doc/building.html
> the build.xml that it provides use CVS tags to extract the 5.0 bits.
> 
> -bob

You can build 5.0 if you need to. You'll just need to modify the
build.xml a bit. If you have the choice, go for 5.5. Very little has
happened on 5.0 for a while - the focus is on 5.5 and starting 6.0

Mark


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



APR Connector Shutdown Problem

2006-02-03 Thread Fenlason, Josh
I'm running into a problem with the APR connector not shutting down
properly on Unix and Linux systems (seems to work fine on Windows).
Tomcat runs fine with the APR connector and there are no errors on
shutdown.  However, when I try to restart Tomcat I get a socket bind
failed error in the catalina log.  I have to wait several minutes
between shutdown and startup for Tomcat to be able to startup correctly.
Apparently it takes a few minutes for the OS to recycle the zombie
socket.  I've tried adding the following lines to network.c (~ line
388), but it didn't fix the problem.

apr_status_t rv = apr_socket_opt_set( s, APR_SO_REUSEADDR, 1 );
if ( rv != APR_SUCCESS )
{
  char errorbuf[ 256];
  apr_strerror( rv, errorbuf, sizeof(errorbuf) );
  fprintf(stderr, "result is %d, %s\n", rv, errorbuf );
 ...

I get this is what is output:  "result is 9, Bad file number".

Does anyone who worked on the APR connector have any suggestions on how
to solve this problem?  It doesn't seem right that you have to wait
several minutes between stopping and restarting Tomcat.  Thanks in
advance.
,
Josh.


Re: Building Tomcat

2006-02-03 Thread Bob Herrmann


Humm.  Since the instructions on the page are broken (cvs and not 
subversion, the build.properties.defaults include sites and urls that 
are out of date), perhaps the page should be removed.   Or a disclaimer 
should be added to the page saying that the 5.0 series is not actively 
maintained and that developers should persue the 5.5 line.


-bob

Mark Thomas wrote:


Bob Herrmann wrote:
 


Ok,  Is 5.0 a valid build target, or is its usage discouraged?

I was following the build instructions for building tomcat 5.0
http://tomcat.apache.org/tomcat-5.0-doc/building.html
the build.xml that it provides use CVS tags to extract the 5.0 bits.

-bob
   



You can build 5.0 if you need to. You'll just need to modify the
build.xml a bit. If you have the choice, go for 5.5. Very little has
happened on 5.0 for a while - the focus is on 5.5 and starting 6.0

Mark


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




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