You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2011/09/08 11:35:56 UTC

Re: how to get HttpServletRequest in wicket 1.5

HttpServletRequest servletReq = (HttpServletRequest)
getRequest().getContainerRequest();

On Thu, Sep 8, 2011 at 12:26 PM, nhsoft.yhw <nh...@gmail.com> wrote:
> in wicket 1.4.x, the code like :
>
> HttpServletRequest request =
> getWebRequestCycle().getWebRequest().getHttpServletRequest();
>
> but i don't know how to get HttpServletRequest  in wicket 1.5
>
>
> -----
> http://www.517wm.com
> 外卖订餐分享工具
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletRequest-in-wicket-1-5-tp3798272p3798272.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: how to get HttpServletRequest in wicket 1.5

Posted by Hielke Hoeve <Hi...@topicus.nl>.
Roger, thanks for the clarification.

Hielke

-----Original Message-----
From: Martin Grigorov [mailto:mgrigorov@apache.org] 
Sent: woensdag 14 september 2011 9:54
To: users@wicket.apache.org
Subject: Re: how to get HttpServletRequest in wicket 1.5

java.lang.Object org.apache.wicket.request.Response.getContainerResponse()
javax.servlet.http.HttpServletResponse
org.apache.wicket.protocol.http.servlet.ServletWebResponse.getContainerResponse()

JDK1.5+ covariant return type

On Wed, Sep 14, 2011 at 10:24 AM, Hielke Hoeve <Hi...@topicus.nl> wrote:
> Why was the return type of getContainerRequest() altered to Object? 
> Everyone is now casting the result to HttpServletRequest anyway. So 
> changing the api kind of defeats the purpose :)
>
> Hielke
>
> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: donderdag 8 september 2011 11:36
> To: users@wicket.apache.org
> Subject: Re: how to get HttpServletRequest in wicket 1.5
>
> HttpServletRequest servletReq = (HttpServletRequest) 
> getRequest().getContainerRequest();
>
> On Thu, Sep 8, 2011 at 12:26 PM, nhsoft.yhw <nh...@gmail.com> wrote:
>> in wicket 1.4.x, the code like :
>>
>> HttpServletRequest request =
>> getWebRequestCycle().getWebRequest().getHttpServletRequest();
>>
>> but i don't know how to get HttpServletRequest  in wicket 1.5
>>
>>
>> -----
>> http://www.517wm.com
>> 外卖订餐分享工具
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletRequ
>> e st-in-wicket-1-5-tp3798272p3798272.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to get HttpServletRequest in wicket 1.5

Posted by Martin Grigorov <mg...@apache.org>.
java.lang.Object org.apache.wicket.request.Response.getContainerResponse()
javax.servlet.http.HttpServletResponse
org.apache.wicket.protocol.http.servlet.ServletWebResponse.getContainerResponse()

JDK1.5+ covariant return type

On Wed, Sep 14, 2011 at 10:24 AM, Hielke Hoeve <Hi...@topicus.nl> wrote:
> Why was the return type of getContainerRequest() altered to Object? Everyone is now casting the result to HttpServletRequest anyway. So changing the api kind of defeats the purpose :)
>
> Hielke
>
> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: donderdag 8 september 2011 11:36
> To: users@wicket.apache.org
> Subject: Re: how to get HttpServletRequest in wicket 1.5
>
> HttpServletRequest servletReq = (HttpServletRequest) getRequest().getContainerRequest();
>
> On Thu, Sep 8, 2011 at 12:26 PM, nhsoft.yhw <nh...@gmail.com> wrote:
>> in wicket 1.4.x, the code like :
>>
>> HttpServletRequest request =
>> getWebRequestCycle().getWebRequest().getHttpServletRequest();
>>
>> but i don't know how to get HttpServletRequest  in wicket 1.5
>>
>>
>> -----
>> http://www.517wm.com
>> 外卖订餐分享工具
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletReque
>> st-in-wicket-1-5-tp3798272p3798272.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: how to get HttpServletRequest in wicket 1.5

Posted by Hielke Hoeve <Hi...@topicus.nl>.
Why was the return type of getContainerRequest() altered to Object? Everyone is now casting the result to HttpServletRequest anyway. So changing the api kind of defeats the purpose :)

Hielke

-----Original Message-----
From: Martin Grigorov [mailto:mgrigorov@apache.org] 
Sent: donderdag 8 september 2011 11:36
To: users@wicket.apache.org
Subject: Re: how to get HttpServletRequest in wicket 1.5

HttpServletRequest servletReq = (HttpServletRequest) getRequest().getContainerRequest();

On Thu, Sep 8, 2011 at 12:26 PM, nhsoft.yhw <nh...@gmail.com> wrote:
> in wicket 1.4.x, the code like :
>
> HttpServletRequest request =
> getWebRequestCycle().getWebRequest().getHttpServletRequest();
>
> but i don't know how to get HttpServletRequest  in wicket 1.5
>
>
> -----
> http://www.517wm.com
> 外卖订餐分享工具
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletReque
> st-in-wicket-1-5-tp3798272p3798272.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org