|
RE: 404 servlet: msg#00002text.xml.resin.user
In my situation I let all requests go to the servlet container, so the "static" files are served by the file servlet of the container, not by Apache. If you have a 404 rule in apache that goes: if file not found, request 404handler in servlet container you can try if file not found, request file in servlet container and then let the container call the 404handler regards, Andre > -----Original Message----- > From: mbaroukh@xxxxxxxxxxxx [mailto:mbaroukh@xxxxxxxxxxxx] > Sent: Monday, March 01, 2004 8:23 > To: resin-interest@xxxxxxxxxx > Subject: Re: 404 servlet > > > Hi. > > This works perfectly for for found files that are handled by resin. > For what I need to do, I must define a 404 error within apache (and > within resin ...) > > ErrorDocument 404 /servlets/notfound > > .jsp, servlets, .do, ... not found will have the attribute. > but .gif, .js, .css, ... and all static files have null instead. > > Finaly, I'm begining to think it's simply impossible. To know > really, I > would look at how 404 documents are ahndled by Apache, but > I'm not sure > I will understand anything ... > > Anyway, thanks for you response. > > Mike > > Le 058éme jour de l'an 2004, Dalen-van.Andre à écrit : > > > > Hi, > > > > Have a look at the following attributes in your 404 servlet > > > > private static final String[] ERROR_ATTRIBUTES = { > > "javax.servlet.error.status_code", > > "javax.servlet.error.exception_type", > > "javax.servlet.error.message", > > "javax.servlet.error.exception", > > "javax.servlet.error.request_uri", > > "com.ibm.websphere.request_url" // IBM > > WebSphere 4.x specific... > > }; > > > > you can get the original request from the request_ur[il] attribues. > > > > hope this helps, Andre > > > > > -----Original Message----- > > > From: mbaroukh@xxxxxxxxxxxx [mailto:mbaroukh@xxxxxxxxxxxx] > > > Sent: Thursday, February 26, 2004 17:25 > > > To: resin-interest@xxxxxxxxxx > > > Subject: 404 servlet > > > > > > > > > > > > Hi. > > > > > > I thought about the following but don't see how to do. I know > > > it's not a > > > resin specifc question but if somebody can help ... > > > > > > Suppose I have some static content in database and I wan't to > > > have them > > > served by apache. For this, it would be nice to : > > > - An url like /static/image.gif is called > > > - Apache do not found it, so he call error document. It could be a > > > servlet. > > > - This servlet see if it is something it can generate. If no, > > > it returns > > > a true 404. Else, it generate it and forward the request to > > > the generated content. > > > - Subsequent calls to the content will return the content directly > > > because it exists ... > > > > > > My problem is that the 404 servlet knows nothing about > the initial uri > > > of the object that was requested. At least, I can't see where this > > > information is. > > > > > > Does anybody have any idea ? > > > > > > Thanks in advance. > > > > > > -- > > > > > > Mike Baroukh > > > > > > Cardiweb - 31 Rue de Mogador Paris IXeme > > > 06 63 57 27 22 - 01 53 21 82 63 - ICQ: 105910677 > > > http://www.cardiweb.com > > > -- > > > > > > > -- > > Mike Baroukh > > Cardiweb - 31 Rue de Mogador Paris IXeme > 06 63 57 27 22 - 01 53 21 82 63 - ICQ: 105910677 > http://www.cardiweb.com > -- > Léon, le télémanipulateur, bat ta bru et a lu pi, n'a > mêlé tel Noël. > -- Graner, Nicolas > -- > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: 404 servlet: 00002, mbaroukh |
|---|---|
| Next by Date: | 3.0.7 release: 00002, Douglas Padian |
| Previous by Thread: | Re: 404 servleti: 00002, mbaroukh |
| Next by Thread: | 3.0.7 release: 00002, Douglas Padian |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |