RE: Problem getting custom 404 error working on 4.1.31

2005-10-24 Thread Robert Graf-Waczenski
IE can be a PITA when it comes to error page display... ;-)) Check if your IE is configured with "friendly HTTP error messages". If this setting is enabled, IE displays its own "friendly" version of an error page and simply skips the server response. To avoid this nonsense-like behavior, your erro

RE: Accessing resource from another context.. ..

2005-10-20 Thread Robert Graf-Waczenski
Remember that you have to configure your web context "app1" to allow cross-context access. If you have not done so, the method you call below will always return null. So your context xml file should look similar to this here: I.e. the parameter crossContext="true" must be there, otherwise all c

RE: classloader during tomcat startup

2005-10-19 Thread Robert Graf-Waczenski
et() method and is therefore supposed to serve web requests, which is not needed in an init class. (Agreed, this is not a major problem, but i like to keep things as small and simple as possible, and a class that *can* serve web requests should also actually be used for this purpose.) Robert > R

RE: classloader during tomcat startup

2005-10-19 Thread Robert Graf-Waczenski
Using the load-on-startup mechanism was the way to go with older servlet APIs. Nowadays, with servlet API 2.4, having a class implement the ServletContextListener interface is better in my eyes. Here you go: public class MyInitClass implements ServletContextListener { static {

RE: Suppress "Connection reset by peer: socket write error".

2005-10-19 Thread Robert Graf-Waczenski
ly no point in thinking of an error page here. The client will never see an error because the client has cancelled the communication prematurely. Sounds weird but if you think more of it, it is quite simple. Robert > > Thanks > > Pavel > > --- Robert Graf-Waczenski <[EMAIL P

RE: Debugging Tomcat hangs

2005-10-18 Thread Robert Graf-Waczenski
OK. Well, feel free to attach your stack dump then. Some curious soul (including myself if i had the time) may either see the problem immediately or use your own stack trace to guide you through it. Robert > -Original Message- > From: David Boyer [mailto:[EMAIL PROTECTED] > Sent: Tuesday,

RE: Debugging Tomcat hangs

2005-10-18 Thread Robert Graf-Waczenski
> If I generate a dump of the JVM using Ctrl-Break while > running Tomcat as a console app, what's the best resource for > interpreting this? I suspect the problem is a thread > deadlock, or something similar. This tells us that you succeed in getting a JVM thread dump and you are asking for he

RE: Character Encoding -ISo-8859-1 Vs UTF-8 Vs GBK

2005-10-18 Thread Robert Graf-Waczenski
Hi, i think that the original poster needs some help with Java & encodings, so i take the freedom to add some (simplified) background here. (And sorry because this is outside the scope of Tomcat but pure Java) A Java char is internally represented as the UTF encoded bytes of that particular chara

RE: Suppress "Connection reset by peer: socket write error".

2005-10-13 Thread Robert Graf-Waczenski
; What a truly fantastic answer! Very detailed and > educational. Your timeis deeply appreciated. > > What I'd like to know is: do I have to do it in every > JSP (I have hundreds). And is there a configuration > solution as was alluded by Bill previously? > > Once again,

RE: Suppress "Connection reset by peer: socket write error".

2005-10-13 Thread Robert Graf-Waczenski
Hi! First, some background: The exception your app actually gets internally is a SocketException with the text you mention below. It occurs if the client browser prematurely cancels an http request before tomcat has completed sending the full response data to the client. Another manifestation may