Salut,
which version are you using? This is clearly an issue. Can you file a
bug here:
https://glassfish.dev.java.net/servlets/ProjectIssues
Do you think you can create a test case?
Thanks!!
-- Jeanfrancois
glassfish_at_javadesktop.org wrote:
> Hi,
>
> We are seeing an issue where an error is sometimes thrown when calling sendRedirect, but not always. When it does, we see the following the stack trace:
>
> java.lang.NullPointerException
> at org.apache.coyote.tomcat5.CoyoteResponse.toAbsolute(CoyoteResponse.java:1610)
> at org.apache.coyote.tomcat5.CoyoteResponse.sendRedirect(CoyoteResponse.java:1359)
> at org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:468)
> ...
>
> Now we are not doing anything fancy here, just calling a sendRedirect on the response, passing a (relative) location.
>
> I looked into the glassfish source a little and it seems the problem is here:
>
> protected String toAbsolute(String location) {
> ...
> String scheme = request.getScheme();
> ...
> try {
> redirectURLCC.append(scheme, 0, scheme.length());
>
> So for some reason request.getScheme returns null. Does any one have an ideas why this might be? Could it be something we're doing incorrectly, or is this a glassfish issue?
>
> Thanks,
> Gustavo
> [Message sent by forum member 'scolapasta' (scolapasta)]
>
> http://forums.java.net/jive/thread.jspa?messageID=334667
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>