Contact: Tel: 2726 - New Media Systems, 1st Floor South, Queens Walk Filippos, Thanks very much for your reply. Unfortunately I am not using Apache, I am not using Jrun, not tomcat, not JWS, not all of those popular ones anyway. Or otherwise I could have solved my problem long time ago. In fact, all I need is to map all image request to a servlet. But the software I am using (now the name :- SilverStream) does not (at least I haven't found a way) to map a pattern to a servlet. Therefore, I was try to get around the problem by doing something unusual. Either I can programmatically map a pattern to the servlet, or if al the "not found" error come to my servlet, that will allow me to serve any image request to my web site, I hope. Cheers, Charles Filippos Slavik <[EMAIL PROTECTED]> on 10/04/2000 05:00:30 PM To: [EMAIL PROTECTED] cc: (bcc: Charles Chen/YellowPages) From: Filippos Slavik <[EMAIL PROTECTED]>, 4 October 2000, 5:00 p.m. Re: Don't kwno the topic for this? [Scanned by Yellow Pages PostMaster] At 04:35 �� 4/10/2000 +0000, you wrote: >Contact: Tel: 2726 - New Media Systems, 1st Floor South, Queens Walk > > >Hi, > >I wonder if anyone knows a way to write a servlet for a web site that will be >invoked if any request to the web could not be served. For instance, if a URL >"http://myhost/anything.gif" is sent to the server, and there is no such >file in >this server. Instead of user getting a 404 error code, I would like to >invoke my >servlet instead. I am sure the error handling is done by the server, and >therefore I ned some way to hook into the server's error handling. Just add the following in your apache httpd.conf ErrorDocument 404 /servlet/myError404Servlet >Don't ask me what happens to the genuine 404 error. My servlet will handle >that. > > >I just want my servlet to intercept this error and do something before the >error >is sent back to the user. > > > >Many thanks and regards, > Best Regards Filippos Slavik >Charles ################################################################ Filippos Slavik FORTHnet R&D, Hrakleio, Greece e-mail : [EMAIL PROTECTED] phone : (+3) 081 391230 ################################################################ "The software said 'runs on Win95 or better,' so I installed it on Linux..." ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
