Curious - with Comet I assume you can now have
multiple servlet requests share a single thread
if they are written cooperatively? I have just
written a "client side" that does this with
NIO. I am working on a system were a lot
of small requests and body chunks are being processed.
PK
At 1
At 16:58 3/20/2007, you wrote:
> From: Peter Kennard [mailto:[EMAIL PROTECTED]
> Subject: Re: Custom error page on Tomcat 6
>
> Can one make a class that spits out the error page that recieves the
> "code number" as input, (and/or maybe an Exception handle if the
>
A refinement on this question I am interested in, that isn't so googleable :)
Can one make a class that spits out the error page that recieves the
"code number" as input, (and/or maybe an Exception handle if the
servelet threw an exception which caused the error) and an
OutputStream to write b
It looks like a Filter receives the same ServletResponse object as
what is passed back from the servlet. Are their methods on that that
allow you to access the Date: and Server: headers (or the whole big
header string)?
PK
At 16:55 3/18/2007, you wrote:
for each servlet / jsp where you want
I found this:
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTE
Thanks - is there a good doc around on "howto write a tomcat filter" :) ?
It sure would be nice to have default headers defined in web.xml :)
PK
At 16:55 3/18/2007, you wrote:
for each servlet / jsp where you want to change the default headers,
write a filter, which changes the headers, include i
It might mean don't hi-jack threads.
Mark
??? I thought I created a new one for this question. (different Subject:)
At 10:57 3/18/2007, you wrote:
Peter Kennard wrote:
> Does no commnent on this mean:
>
> "This is not possible"?
> or:
> "Of cours
Does no commnent on this mean:
"This is not possible"?
or:
"Of course, it is obvious you can, as stated *here*"?
PK
At 15:24 3/16/2007, you wrote:
If I want to remove or alter headers that are the "default" for a
specific servlet, webapp or instance of tomcat, how might I? Either
pro
If I want to remove or alter headers that are the "default" for a
specific servlet, webapp or instance of tomcat, how might I? Either
programmtically or in a config file.
ie:
- remove or replace the "Date:" header.
- remove or replace the "Server:" header.
The reasoning is for servicing
At 20:38 3/14/2007, you wrote:
http://tomcat.apache.org/faq/misc.html#evil
-Tim
All very good points escpecially since it will load classes outside
the webapps sandbox. Definately evil.
What I would probably do in the large # of servlets situation for a
single webapp during development is
I am a newbee here but as a work around, I would think you could have
a "master" servlet and it could scan and load all the servlets in the
directory into a map, and then dispatch requests to them from "/*"
(having them properly initialized in another question)
I would be interested in the off
Curious with the talk about reliability.
Socket timouts will abort waiting on reads and writes that take too long.
But if lets say a servlet takes an overly long time to process
something without reading or writing, is there a high priority
"watchdog" thread in tomcat which will monitor how
Heh - ask Murphy about that :)
just spawn a thread set priority high and loop forever.
At 10:23 3/14/2007, you wrote:
On 14/03/2007, at 3:17 PM, Peter Crowther wrote:
From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
There is no real advantage in multi-instancing.
A minor advantage is that if
Try ServletRequest.getLocalPort() rather than getServerPort().
Yes exactly, thanks - that is an addition to the api after the book I read :)
eclipse auto-complete and the sun website is your friend :)
*
Part of all these questions is I am looking to implement a servlet
subclass which wi
This could be the ticket!
At 11:53 3/13/2007, you wrote:
You could configure proxyPort in your to some value that you
could use as a flag for your particular environment. This will override
the header value returned by getServerPort(). Don't know if there would
be any undesirable side effects
wrote:
Damn! I missed that :) Thanks.
I assume this is taking it from where the hit arrives in at the
server and not the HTTP headers passed in (which could be anything)
At 01:32 3/13/2007, you wrote:
> From: Peter Kennard [mailto:[EMAIL PROTECTED]
> Subject: Re: Can one map a servle
Damn! I missed that :) Thanks.
I assume this is taking it from where the hit arrives in at the
server and not the HTTP headers passed in (which could be anything)
At 01:32 3/13/2007, you wrote:
> From: Peter Kennard [mailto:[EMAIL PROTECTED]
> Subject: Re: Can one map a servle
Thanks - I assume "any way you want" would include the port?
I'll have to dive more into Filters.
At 01:15 3/13/2007, you wrote:
> From: Peter Kennard [mailto:[EMAIL PROTECTED]
> Subject: Can one map a servlet to a specific connctor?
>
> On a stand alone tomcat w
I guess a corrollary question to this would be.
Can I determine the connector port connected to for a request from
service() I don't see it in the servlet API but am willing to access
somthing tomcat specific.
PK
At 21:57 3/12/2007, you wrote:
On a stand alone tomcat with more than one conne
On a stand alone tomcat with more than one connector (port)
Is it possible to map a servlet to only one or a subset of connectors?
Thanks PK
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAI
At 15:33 3/12/2007, you wrote:
> Anyway - I answered my own question.
> I wrote a test, Keep Alive works fine with chunked content.
So... what was the problem? For days you've been railing against Tomcat
for not supporting this properly. Is there something that you overlooked?
- -chris
Part
I answered my own question here:
The client must send the *complete* sequence
"\r\n0\r\n\r\n" or tomcat *will* hang attempting to read the last
"\r\n" after the last "zero length chunk" No one including myself caught this.
PK
Anyway - I answered my own question.
I wrote a test, Keep Alive works fine with chunked content.
If anyone wants the test code let me know. (should I post it?) It
is small - about 150 lines worth, all java.
PK
Does Tomcat support Keep Alive, as a stand alone server, for
multiple Client POS
Does Tomcat support Keep Alive, as a stand alone server, for multiple
Client POST requests to different servlet paths where both request
and response are "Transfer-Encoding: chunked"?
Is there a definition somewhere of when tomcat will drop a connection
when keep-alive is specified?
Thanks.
Not that anyone cares, but the "apparent" lost chunk problem was
caused by the header scanner in the dumper client. He created an
InputStreamReader() and it apparently reads exactly two lines ahead
into it's buffer. Since my test case was "one line" per chunk it
would reliably drop (have in i
Aaack - I really REALLY have to oppolgize. One of the people I
manange gave me the dumper client, and I went through it and the
problem is there :|
I'm really really sorry if I caused any flamage and wasted anyone's time.
I respect you people for hammering on me about it. I'll try to audit
t
The exact tomcat version I have installed is 6.0.10
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
butt, just figure it out.
Peter K.
At 21:16 3/11/2007, you wrote:
On 3/12/07, Peter Kennard <[EMAIL PROTECTED]> wrote:
Unless dropping the first data filled chunk is defined as proper and
documented, and supported, behavior, I would consider this a bug.
As I said in my previous post,
Curious you mean by this? What is obvious?
It's quite simple. You've made a number of claims in your two threads,
every time supposedly verified by yourself, and for every one of them,
I can tell you that the opposite is actually true. So there's really
nothing to talk about ...
I have to opp
wants to avoid allocating a huge buffer,
one would want to use the chunked response.
PK
At 15:13 3/11/2007, you wrote:
Hi!
Yes ofcourse, you are right, I was to hasty.
Does it work if you add an os.flush() before the loop?
/Per Jonsson
Peter Kennard skrev:
That is not an error, the last i
If you file a bug for this, or for the "issue" you describe in your
other thread, I will immediately resolve them as invalid, obviously.
Curious you mean by this? What is obvious?
Tomcat 5.5 and 6 do make "chunked" replys to
HTTP1.1 requests that do not explicitly set
content-length if one
What if you use a non-chunked request? You asked already and the
response was that TC basically doesn't handle chunked requests.
TC handles chunked requests in all ways except that it doesn't have a
methodology in the servlet API (EOFException etc) for notifying you
if you try to read beyond
Have you checked the result with a hex editor or anything like that? Is
it possible that txt.getBytes() in the first loop iteration is giving
you some text with a CR in it? It so, your terminal could be overwriting
I am reading a socket directly in a test client. No data of any kind
comes in
That is not an error, the last item in the (for(;;here)) is executed
after the loop code is executed - the "side effect" only has effect
within the for statement. (;;(side effect only visible inside
statment in here))
ie: for(;;++i) ad for(;;i++) are equivalent
ie: for(;;val = ++i) ad fo
der, though it is
deprecated in HTTP1.1 and is the default value if no header is
supplied. As expected this has no (different) effect.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Peter,
Peter Kennard wrote:
> for HTTP1.1 (in tomcat 6)
>
> Does tomcat handle keep alive (ie: ke
I have some real mysterious behavior, it seems the first chunk just doesn't
make it into the output. Doesn't matter how long or short it is.
Seems like a BUG unles I'm doing something wrong.
/* in my real tiny test servlet */
public void service( ServletRequest req,
Servlet
for HTTP1.1 (in tomcat 6)
Does tomcat handle keep alive (ie: keeping a connection open for
subsequent requests)
If so under what circumstances is the connection closed (or kept open)?
Sending chunked content, with a terminal "\r\n0\r\n" will cause the
connection to be disconnected.
As does
I have a related issue. (should the be a separate thread?)
I had two instances of Tomcat5.5 on a windows XP Pro Workstation.
And I had a "batch" file I got off the web to launch the second
instance using a shared CATALINA_HOME but each with a different CATALINA_BASE
When I upgraded to Tomcat6
e huristic for
culling excess connections after heavy traffic
may hve opened more than configured.
Anyway that is what I would do ;^>
If by "multiplexing" you thought interleaving
routed packets for simultaneous "hits" on one pipe I didn't mean that.
PK
At 02
Doesn't AJP "multiplex" traffic, that is queued
up requests are "serialized" through one
connection that remains connected and it switches
between servlets on the receiving end? and recycles the execution thread?
At 19:19 3/7/2007, you wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ré
I would actually LOVE to have errors directed to a servlet like
interface to reply to the client. In my case we are going to be
routing requests from a lot of mobile devices using a compressed form
for traffic.
PK
At 14:05 3/7/2007, you wrote:
This seems basic, but apparently not. A simila
BTW found the bug it wasn't in tomcat ;^> but in the client :)
In any case the logger info was very helpful!
PK
At 13:18 3/7/2007, you wrote:
> I did what it says here
> http://minaret.biz/tips/log4j.html
> but no results.
>
> I havn't found other decent "instructions" yet.
> PK
>
try this one
r down logging levels on a running production system. It will
revert to your log4j.properties configuration as well, so you can easily go
back to the configured settings when you're done.
I can send you (or anyone else who is interested) the sources and/or war.
PM me off-list.
Tim
>
Thanks will check out after lunch. I definately want to use the
log4j for our apps.
I am assuming the Tomcat internals have very good debug log info like
why sockets are closed or timed out etc (If I can get them activated
:) I dread finding out it might be a windows sockets bug :|
PK
At
I did what it says here
http://minaret.biz/tips/log4j.html
but no results.
I havn't found other decent "instructions" yet.
PK
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I have been looking about :)
I have a simple tomcat instance with one webapp in it. I want to
turn on "high level - type" logging to the console for internal
debugging messages so I know what is happening. I gather I have to
put a log4j.properties file in common/classes I put one I fou
typo, if anyone read it, I meant IPV6 :)
PK
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 04:53 3/5/2007, you wrote:
Peter Kennard wrote:
At 23:07 3/4/2007, you wrote:
But since you can't send the response without finishing the
reading of the input stream - the entire question doesn't seem to make sense.
If the input pipe is slow (ie: cellphone with slow pipe) an
At 23:07 3/4/2007, you wrote:
But since you can't send the response without finishing the reading
of the input stream - the entire question doesn't seem to make sense.
If the input pipe is slow (ie: cellphone with slow pipe) and you are
sending a transaction where the first part of it initiate
But since you can't send the response without finishing the reading
of the input stream - the entire question doesn't seem to make sense.
-Tim
Peter Kennard wrote:
I guess the general form of this question is, with HTTP1.1 chunked
input, how do I read "a chunk at a time", whi
I guess the general form of this question is, with HTTP1.1 chunked
input, how do I read "a chunk at a time", which requires I know the
length of the chunk before calling "read()" so if I attempt to read
more than the length of the chunk so I can process it immediately
instead of waiting for
Hmm - when reading HTTP1.1 chunked data, is there a way of detecting
reciept of the terminal "0" chunk in a servlet ?
Googling about, Apparently this does not report an EOD "exception"
(as I would expect) because some people have been using post last
chunk data for server internal out-of ban
on output, kill socket
}
mypool.reclaim(request);
mypool.reclaim(response);
}
At 23:03 3/2/2007, you wrote:
"Peter Kennard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> would definately be someting to do.
> one has to wade through a lot of stuf
would definately be someting to do.
one has to wade through a lot of stuff to get to that point :)
I have to find out where what defines a connector is, how it is
installed and configured ...
So what people are saying is "get the source and build it" as step #1 ??
At 16:38 3/2/2007, you wrote:
then pass the requests off to servlets.
At 15:53 3/2/2007, David Delbecq wrote:
Peter Kennard a écrit :
> I want to write my own "protocol handler" which I can configure as a
> connector. I want it to do something along the lines of AJP - packet
> hits in, servlet hits out.
>
I want to write my own "protocol handler" which I can configure as a
connector. I want it to do something along the lines of AJP - packet
hits in, servlet hits out.
A - should I be posting this to a "dev" list?
B - I want a good reference on what class I need to subclass, how to
use
OK - persistance has paid off :)
I now have a little client that with a small HTTP header will connect
with a servlet, and run a persistent "telnet" like session with it
until either someone times out or decides to quit. The only
requirement is that you initiate the connection with HTTP
head
So if a servlet is lets say in a long transaction, sending a huge
data set, and the manager is wanting to "undeploy" it,
Does it get notified while the long lasting servlet thread is sending
data so if one wants to abort it, you can truncate writing in a
controlled way and clean up the mess ni
At 09:42 2/28/2007, you wrote:
Back to the original issue: sounds like you really need to develop your
own connector to handle your proprietary protocol, rather than trying to
twist one of Tomcat's HTTP or AJP connectors into doing your bidding.
What we do is to be determined. What I want to
Yes - I'm assuming J2ee facilities.
At 06:57 2/28/2007, you wrote:
That's certainly correct, raw socket communication
is not J2EE. Peter didn't mention, however, that
J2EE was a necessary precondition for his case.
On the contrary, this communication with some
binary messages sent over sockets
Excuse the naivety but I thought you couldn't open a socket with J2EE.
I was told (I think on this list) that you need to use a JCA to make
the connection.
If this is true I want to know about this. I am so far under the
impression if you needed to connect with another protocol in a
servlet
from scratch :)
I am trying to avoid it.
Peter K.
At 06:36 2/28/2007, Georg Sauer-Limbach wrote:
If you don't want to deal with HTTP, you should
not use the Servlet API (which is the Java
abstraction of HTTP) at all. You can do the
indicated code with generic sockets, no need to
mind about
Ok - continuing.
Is it possible to use a "GenricServlet" to do basicly this.
service(req,res)
{
for(;;)
{
readSome(req.getInputStream());
if(writeSome(req.getOutputStream()) {
req.flushBuffer();
} else {
break;
}
}
}
That
I guess I'll answer my own question here after some testing and research
That is:
If you override the "service()" method on servelet all you need is a
"service name" and a "path" to the servlet followed by two newlines
as the "minimal" header.
ie:
X /Z\n\n
for the most minimal header.
"X"
Was this last message of mine just too naive :)
Should I break it into smaller parts?
Still curious :)
Peter K.
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional co
I did see a reference to a "socket servlet" which touches on this.
Tomcat has doe a lot in it that is very useful (to re-itterate)
- Administration of sevlets on a "live" server with web interface
- handling of depolyment and undeplyment
- integration with IDEs and build systems (eclipse, ant, et
66 matches
Mail list logo