users@glassfish.java.net

Re: Disappeared specialAttributes in Servlet API 3.0

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Mon, 01 Feb 2010 09:51:09 -0800

Peter,

On 02/ 1/10 07:49 AM, Major Péter wrote:
> Could somebody help me with this? Or is there a separate mailing list
> for servlet api problems?
>

If your Servlet is the target of an error dispatch, it will have
access to the following request attributes, as per SRV 10.9.1
("Request Attributes") of SRV 10.9 ("Error Handling"):

  javax.servlet.error.status_code
  javax.servlet.error.exception_type
  javax.servlet.error.message
  javax.servlet.error.exception
  javax.servlet.error.request_uri
  javax.servlet.error.servlet_name

I just confirmed that this is working as expected.


Jan

> Thanks,
> Peter
>
> 2010-01-31 17:53 keltezéssel, Major Péter írta:
>
>> Hi,
>>
>> I don't know if this is the right place to ask, but maybe you can route
>> me to there.
>> In details:
>> I'm trying to create a not found servlet, which is showing upon every
>> 404 error codes, that's why I've added in web.xml the followings:
>> <error-page>
>> <error-code>404</error-code>
>> <location>/error/NotFound</location>
>> </error-page>
>>
>> The NotFoundServlet is url-mapped to the /error/NotFound place too.
>> Now if I try the app with GFv2 then in the NotFoundServlet's
>> HttpServletRequest object in the specialAttributes variable, there are
>> some properties:
>> javax.servlet.forward.query_string
>> javax.servlet.forward.request_uri
>> javax.servlet.forward.servlet_path
>> javax.servlet.forward.path_info
>> javax.servlet.forward.context_path
>>
>> but when I try the whole thing with GFv3, there is nothing, the whole
>> specialAttributes are null.
>> The problem is that the Wicket framework is depending on the forward
>> attributes, to create correct relative url's on the page, but because
>> they are not there, the urls are calculated wrong, which why they points
>> to wrong places.
>> Now the question is, is this behaviour intentional, and if it so, then
>> how could this problem being solved maintaining backward-compatibility?
>> Thanks
>>
>> Best Regards,
>> Peter Major
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>