You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Karl-Heinz Golz <ka...@t-online.de> on 2015/02/17 13:07:02 UTC
MarkupException after session time out
hello,
I'm faced with an error in following situation:
User opens a webpage (e.g. Page1), do some other things, comes back
after session time out and click some link (onClick-event) on the page.
Then following exception is thrown:
at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
. . .
I try to avoid that like this:
public class Page1 extends WebPage {
public Page1() {
if (!UserSession.get().isUserSignedOn()) {
setResponsePage(new StartPage());
return;
} else
normalHandling();
}
. . .
}
I can see in log file that the if/else works as expected: the StartPage
is handled (but not shown).
But after that it tries to render Page1 again which throws the exception.
What I finally want is: users should be led to the StartPage after
session time out in any case.
Any recommendations how I should handle this are very welcome.
Many thanks in advance
Karl-Heinz
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: MarkupException after session time out
Posted by Karl-Heinz Golz <ka...@t-online.de>.
Hi Martin,
"throw RestartResponseException()" solves my problem.
Thank you.
Am 17.02.2015 um 14:50 schrieb Martin Grigorov:
> Hi,
>
> On Tue, Feb 17, 2015 at 2:07 PM, Karl-Heinz Golz <
> karl-heinz.golz@t-online.de> wrote:
>
>> hello,
>>
>> I'm faced with an error in following situation:
>> User opens a webpage (e.g. Page1), do some other things, comes back
>> after session time out and click some link (onClick-event) on the page.
>>
>> Then following exception is thrown:
>>
>> at
>>
>> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
>> at
>> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
>> at
>> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
>> at
>>
>> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
>> at
>>
>> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
>> at
>>
>> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
>> . . .
>>
>> I try to avoid that like this:
>>
>> public class Page1 extends WebPage {
>>
>> public Page1() {
>> if (!UserSession.get().isUserSignedOn()) {
>> setResponsePage(new StartPage());
>>
> If you need to cancel the processing of the Page in its constructor you
> should use "throw RestartResponseException()".
>
>
>> return;
>> } else
>> normalHandling();
>> }
>> . . .
>> }
>>
>> I can see in log file that the if/else works as expected: the StartPage
>> is handled (but not shown).
>> But after that it tries to render Page1 again which throws the exception.
>>
>> What I finally want is: users should be led to the StartPage after
>> session time out in any case.
>>
>> Any recommendations how I should handle this are very welcome.
>>
>> Many thanks in advance
>> Karl-Heinz
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: MarkupException after session time out
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Tue, Feb 17, 2015 at 2:07 PM, Karl-Heinz Golz <
karl-heinz.golz@t-online.de> wrote:
> hello,
>
> I'm faced with an error in following situation:
> User opens a webpage (e.g. Page1), do some other things, comes back
> after session time out and click some link (onClick-event) on the page.
>
> Then following exception is thrown:
>
> at
>
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
> at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
> at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
> at
>
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
> at
>
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
> at
>
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
> . . .
>
> I try to avoid that like this:
>
> public class Page1 extends WebPage {
>
> public Page1() {
> if (!UserSession.get().isUserSignedOn()) {
> setResponsePage(new StartPage());
>
If you need to cancel the processing of the Page in its constructor you
should use "throw RestartResponseException()".
> return;
> } else
> normalHandling();
> }
> . . .
> }
>
> I can see in log file that the if/else works as expected: the StartPage
> is handled (but not shown).
> But after that it tries to render Page1 again which throws the exception.
>
> What I finally want is: users should be led to the StartPage after
> session time out in any case.
>
> Any recommendations how I should handle this are very welcome.
>
> Many thanks in advance
> Karl-Heinz
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: MarkupException after session time out
Posted by Sven Meier <sv...@meiers.net>.
Hi,
can you provide a quickstart please?
Regards
Sven
On 17.02.2015 13:07, Karl-Heinz Golz wrote:
> hello,
>
> I'm faced with an error in following situation:
> User opens a webpage (e.g. Page1), do some other things, comes back
> after session time out and click some link (onClick-event) on the page.
>
> Then following exception is thrown:
>
> at
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
> at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
> at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
> at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
> at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
> at
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
> . . .
>
> I try to avoid that like this:
>
> public class Page1 extends WebPage {
>
> public Page1() {
> if (!UserSession.get().isUserSignedOn()) {
> setResponsePage(new StartPage());
> return;
> } else
> normalHandling();
> }
> . . .
> }
>
> I can see in log file that the if/else works as expected: the StartPage
> is handled (but not shown).
> But after that it tries to render Page1 again which throws the exception.
>
> What I finally want is: users should be led to the StartPage after
> session time out in any case.
>
> Any recommendations how I should handle this are very welcome.
>
> Many thanks in advance
> Karl-Heinz
>
>
>
> ---------------------------------------------------------------------
> 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: MarkupException after session time out
Posted by Karl-Heinz Golz <ka...@t-online.de>.
I forgot to mention: I'm using Wicket 6.17
Am 17.02.2015 um 13:07 schrieb Karl-Heinz Golz:
> hello,
>
> I'm faced with an error in following situation:
> User opens a webpage (e.g. Page1), do some other things, comes back
> after session time out and click some link (onClick-event) on the page.
>
> Then following exception is thrown:
>
> at
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
> at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
> at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
> at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
> at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
> at
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
> . . .
>
> I try to avoid that like this:
>
> public class Page1 extends WebPage {
>
> public Page1() {
> if (!UserSession.get().isUserSignedOn()) {
> setResponsePage(new StartPage());
> return;
> } else
> normalHandling();
> }
> . . .
> }
>
> I can see in log file that the if/else works as expected: the StartPage
> is handled (but not shown).
> But after that it tries to render Page1 again which throws the exception.
>
> What I finally want is: users should be led to the StartPage after
> session time out in any case.
>
> Any recommendations how I should handle this are very welcome.
>
> Many thanks in advance
> Karl-Heinz
>
>
>
> ---------------------------------------------------------------------
> 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