Barracuda: extension of ApplicationGateway
"Thorsten M?ller" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Is it possible to extend the Application Gateway to send an 404 error in
situations when the gateway can't map the request to an event. At the moment
an HttpRequestEvent is dispatched by default. Maybe it is useful to specify
this in event-gateway.xml or web.xml by additional parameter(s).
code snip from ApplicationGateway, to demonstrate what I mean:
...
} catch (Exception e) {
//if we can't map the request to an event, we will just
//send a 404 error or dispatch a generic HttpRequestEvent according to
configuration
boolean send404 = getItFromSomewhere();
if (send404)
{
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
}
else
{
logger.error("Class "+eventName+" not found...Creating a generic
HttpRequestEvent");
event = new HttpRequestEvent();
}
}
---
Thorsten
_______________________________________________
Barracuda mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/barracuda
FAQ - http://www.jguru.com/faq/Barracuda