Hi,

You can have a look at
http://github.com/robink/wooki/tree/master/src/main/java/com/wooki/services/
We have implemented a solution based on a ComponentEventResultProcessor.

Regards,
Christophe Cordenier.

Developer of wooki @wookicentral.com

2010/2/11 xfile80303 <l...@grokers.net>

>
> Hi all,
>
> I'm trying to understand how to send a specific HTTP error code to the
> client in the response, and I'm running into a bit of a snag.
>
> I thought it would be as simple as:
>
> @Inject RequestGlobals requestGlobals;
> HttpServletResponse httpResponse = requestGlobals.getHTTPServletResponse();
> httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Forbidden");
>
> But when I do this, I get a NullPointerException from the Tapestry
> Internals:
>
> java.lang.NullPointerException
>        at
>
> org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl.isCompressable(ResponseCompressionAnalyzerImpl.java:65)
>        at
>
> $ResponseCompressionAnalyzer_126be2d6156.isCompressable($ResponseCompressionAnalyzer_126be2d6156.java)
>        at
>
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.openResponseOutputStream(BufferedGZipOutputStream.java:77)
>        at
>
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.checkForCutover(BufferedGZipOutputStream.java:70)
>        at
>
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.write(BufferedGZipOutputStream.java:116)
>
> Am I doing this incorrectly?  I'd appreciate your suggestions and insight.
>
> Thanks,
>
> Levi
> --
> View this message in context:
> http://n2.nabble.com/T5-1-How-To-Send-HTTP-Error-as-Response-tp4556292p4556292.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Regards,
Christophe Cordenier.

Developer of wooki @wookicentral.com

Reply via email to