You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Miroslav F." <mi...@seznam.cz> on 2011/10/11 20:38:49 UTC

missing page

Hi guys,

I need a help - have my custom class PageNotFound based on this help:
https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html

In my PageNotFound class I have:
this.add(new Label("missingPage", _put_pagename_which_was_not_found));
but I have no idea how to find-out pagename. I just know that somehow
system must know this pagename.

Any ideas please?

Miro


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


Re: missing page

Posted by Martin Grigorov <mg...@apache.org>.
Wicket 1.5: org.apache.wicket.session.ISessionStore.getAttribute(Request,
String)

On Wed, Oct 12, 2011 at 8:51 PM, Miroslav F. <mi...@seznam.cz> wrote:
> Thanks Martin, finaly my java code is:
> public PageNotFound(PageParameters params)
> {
>        ServletWebRequest servletWebRequest = (ServletWebRequest)
> this.getRequest();
>        HttpServletRequest request =
> servletWebRequest.getHttpServletRequest();
>        this.add(new Label("missingPage", (String)
> request.getAttribute("javax.servlet.error.request_uri")));
> }
> and corresponding markup:
> Page <span wicket:id="missingPage">[missing page name]</span> which you were
> looking for is not here.
>
> Works.
>
> Supplement question is: do I need raw servlet request to make lookup for
> atributes or there is more
> wicket way to do it?
>
>
>
>> -----Original Message-----
>> From: Martin Grigorov [mailto:mgrigorov@apache.org]
>> Sent: 12. October 2011 10:55
>> To: users@wicket.apache.org
>> Subject: Re: missing page
>>
>> javax.servlet.error.request_uri
>> google this for more information
>>
>> On Wed, Oct 12, 2011 at 11:18 AM, Martin Funk
>> <ma...@googlemail.com> wrote:
>> > is
>> >
>> > RequestCycle.get().getRequest().getUrl()
>> >
>> > what you are looking for?
>> >
>> > mf
>> >
>> > 2011/10/11 Miroslav F. <mi...@seznam.cz>
>> >
>> >> Hi guys,
>> >>
>> >> I need a help - have my custom class PageNotFound based on
>> this help:
>> >>
>> https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.htm
>> >> l
>> >>
>> >> In my PageNotFound class I have:
>> >> this.add(new Label("missingPage",
>> >> _put_pagename_which_was_not_found));
>> >> but I have no idea how to find-out pagename. I just know
>> that somehow
>> >> system must know this pagename.
>> >>
>> >> Any ideas please?
>> >>
>> >> Miro
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: missing page

Posted by "Miroslav F." <mi...@seznam.cz>.
Thanks Martin, finaly my java code is:
public PageNotFound(PageParameters params)
{
	ServletWebRequest servletWebRequest = (ServletWebRequest)
this.getRequest();
	HttpServletRequest request =
servletWebRequest.getHttpServletRequest();
	this.add(new Label("missingPage", (String)
request.getAttribute("javax.servlet.error.request_uri")));
} 
and corresponding markup:
Page <span wicket:id="missingPage">[missing page name]</span> which you were
looking for is not here.

Works.

Supplement question is: do I need raw servlet request to make lookup for
atributes or there is more
wicket way to do it?



> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org] 
> Sent: 12. October 2011 10:55
> To: users@wicket.apache.org
> Subject: Re: missing page
> 
> javax.servlet.error.request_uri
> google this for more information
> 
> On Wed, Oct 12, 2011 at 11:18 AM, Martin Funk 
> <ma...@googlemail.com> wrote:
> > is
> >
> > RequestCycle.get().getRequest().getUrl()
> >
> > what you are looking for?
> >
> > mf
> >
> > 2011/10/11 Miroslav F. <mi...@seznam.cz>
> >
> >> Hi guys,
> >>
> >> I need a help - have my custom class PageNotFound based on 
> this help:
> >> 
> https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.htm
> >> l
> >>
> >> In my PageNotFound class I have:
> >> this.add(new Label("missingPage", 
> >> _put_pagename_which_was_not_found));
> >> but I have no idea how to find-out pagename. I just know 
> that somehow 
> >> system must know this pagename.
> >>
> >> Any ideas please?
> >>
> >> Miro
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> 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
> 
> 


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


Re: missing page

Posted by Martin Grigorov <mg...@apache.org>.
javax.servlet.error.request_uri
google this for more information

On Wed, Oct 12, 2011 at 11:18 AM, Martin Funk <ma...@googlemail.com> wrote:
> is
>
> RequestCycle.get().getRequest().getUrl()
>
> what you are looking for?
>
> mf
>
> 2011/10/11 Miroslav F. <mi...@seznam.cz>
>
>> Hi guys,
>>
>> I need a help - have my custom class PageNotFound based on this help:
>> https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html
>>
>> In my PageNotFound class I have:
>> this.add(new Label("missingPage", _put_pagename_which_was_not_found));
>> but I have no idea how to find-out pagename. I just know that somehow
>> system must know this pagename.
>>
>> Any ideas please?
>>
>> Miro
>>
>>
>> ---------------------------------------------------------------------
>> 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: missing page

Posted by Martin Funk <ma...@googlemail.com>.
is

RequestCycle.get().getRequest().getUrl()

what you are looking for?

mf

2011/10/11 Miroslav F. <mi...@seznam.cz>

> Hi guys,
>
> I need a help - have my custom class PageNotFound based on this help:
> https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html
>
> In my PageNotFound class I have:
> this.add(new Label("missingPage", _put_pagename_which_was_not_found));
> but I have no idea how to find-out pagename. I just know that somehow
> system must know this pagename.
>
> Any ideas please?
>
> Miro
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>