You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sri Sankaran <Sr...@sas.com> on 2008/02/05 05:53:20 UTC

Why has my page expired?

Wicket Version: 1.3

OK, I'll admit to having a tenuous grasp of Wicket -- but I am trying to
learn.  I am having trouble with a pages having a very short half life!  I
have looked at several prior postings on the topic of page expiry but none
seem fit the bill.

I have boiled my application down to two very simple pages:  Page1.html that
has a link to Page2.  


&lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>

That's it!

Here are the sequence of steps:

I invoke the app, Page1 is displayed
I click on the link on Page1, Wicket correctly leads me to Page2
I use the browser's back button (I can hear you say aha!) -- Page1 is
displayed
I click on the link (to Page2) -- I get the "Page Expired" page


I can see that this has something to do with the version of the page that is
being referenced but beyond that I don't have a rational explanation for
what I am seeing.  Can you please explain -- or point me to the appropriate
docs?

Also, what I have described above is a fairly common usage scenario.  How
can I prevent the user from seeing the "Page expired" page?

FWIW, the link to Page2 has been coded as a PageLink.  For good measure, I
have even tried both PageLink constructor variants.  I see the same behavior
in both cases.

I appreciate any guidance you can provide.

Sri

-- 
View this message in context: http://www.nabble.com/Why-has-my-page-expired--tp15283551p15283551.html
Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Why has my page expired?

Posted by Sri Sankaran <Sr...@sas.com>.
Well, wouldn't you know it -- it doesn't do it anymore!  I don't know if I
should be happy or upset!

Anyway, I had originally encountered the page expiry problem on my actual
application which is  a little more involved than the code snippets we've
been working with.  I am going to go back to the original app and work with
it to see if I can isolate the code base from it.

Thanks for all your attention and help.

Sri


igor.vaynberg wrote:
> 
> tried your code here and it works just fine. not sure where your
> problem is. perhaps you can generate your project using our maven
> archetype and try again there.
> 
> -igor
> 
> 
> On Feb 5, 2008 6:16 AM, Sri Sankaran <Sr...@sas.com> wrote:
>>
>> The behavior is unchanged whether I deploy my app as a WAR or as an
>> exploded
>> archive.  I have tried this in WebLogic 10, Tomcat 5.5 & Tomcat 6.
>>
>> Yes, cookies are enabled.
>>
>> Here is the code:
>> Home.html
>>
>> &lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
>> &nbsp;
>> &lt;a href="#" wicket:id="another_link_to_page_two">Page Two too&lt;/a>
>>
>> Home.java
>> public class Home extends WebPage {
>>   public Home() {
>>     add(new PageLink("link_to_page_two", PageTwo.class));
>>     add(new PageLink("another_link_to_page_two",
>>                               new IPageLink() {
>>                                  public Page getPage() { return new
>> PageTwo(); }
>>                                  public Class getPageIdentity() { return
>> PageTwo.class; }
>>                               }
>>                             )
>>           );
>>
>> Page2.html
>> This is page 2
>>
>> Page2.java
>> public class PageTwo extends WebPage {}
>>
>> web.xml
>>
>> &lt;web-app>
>>     &lt;display-name>Wicket Test&lt;/display-name>
>>     &lt;filter>
>>         &lt;filter-name>wicket_filter&lt;/filter-name>
>>
>> &lt;filter-class>org.apache.wicket.protocol.http.WicketFilter&lt;/filter-class>
>>         &lt;init-param>
>>           &lt;param-name>applicationClassName&lt;/param-name>
>>           &lt;param-value>com.sas.mis.wicketTest&lt;/param-value>
>>         &lt;/init-param>
>>     &lt;/filter>
>>     &lt;filter-mapping>
>>         &lt;filter-name>wicket_filter&lt;/filter-name>
>>         &lt;url-pattern>/*&lt;/url-pattern>
>>     &lt;/filter-mapping>
>> &lt;/web-app>
>>
>> Now, I have
>> http://www.nabble.com/Page-Expired-issue-td13661826.html#a13661826 read
>> the
>> post  about page expiration.  It discusses the merits of servlet vs.
>> filter
>> mapping and mapping /* vs. /app/*.  But I fail to see that having any
>> bearing on my current problem.
>>
>> Sri
>>
>>
>> igor.vaynberg wrote:
>> >
>> > i dont think the page actually expires, i think wicket cant find it
>> > anymore.
>> >
>> > are the cookies enabled in the browser?
>> >
>> > how are you deploying your app?
>> >
>> > show us the code to the link.
>> >
>> > show us your web.xml
>> >
>> > -igor
>> >
>> > On Feb 4, 2008 8:53 PM, Sri Sankaran <Sr...@sas.com> wrote:
>> >>
>> >> Wicket Version: 1.3
>> >>
>> >> OK, I'll admit to having a tenuous grasp of Wicket -- but I am trying
>> to
>> >> learn.  I am having trouble with a pages having a very short half
>> life!
>> >> I
>> >> have looked at several prior postings on the topic of page expiry but
>> >> none
>> >> seem fit the bill.
>> >>
>> >> I have boiled my application down to two very simple pages: 
>> Page1.html
>> >> that
>> >> has a link to Page2.
>> >>
>> >>
>> >> &lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
>> >>
>> >> That's it!
>> >>
>> >> Here are the sequence of steps:
>> >>
>> >> I invoke the app, Page1 is displayed
>> >> I click on the link on Page1, Wicket correctly leads me to Page2
>> >> I use the browser's back button (I can hear you say aha!) -- Page1 is
>> >> displayed
>> >> I click on the link (to Page2) -- I get the "Page Expired" page
>> >>
>> >>
>> >> I can see that this has something to do with the version of the page
>> that
>> >> is
>> >> being referenced but beyond that I don't have a rational explanation
>> for
>> >> what I am seeing.  Can you please explain -- or point me to the
>> >> appropriate
>> >> docs?
>> >>
>> >> Also, what I have described above is a fairly common usage scenario. 
>> How
>> >> can I prevent the user from seeing the "Page expired" page?
>> >>
>> >> FWIW, the link to Page2 has been coded as a PageLink.  For good
>> measure,
>> >> I
>> >> have even tried both PageLink constructor variants.  I see the same
>> >> behavior
>> >> in both cases.
>> >>
>> >> I appreciate any guidance you can provide.
>> >>
>> >> Sri
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Why-has-my-page-expired--tp15283551p15283551.html
>> >> Sent from the Wicket - User 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
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Why-has-my-page-expired--tp15283551p15290962.html
>> Sent from the Wicket - User 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
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-has-my-page-expired--tp15283551p15296618.html
Sent from the Wicket - User 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


Re: Why has my page expired?

Posted by Igor Vaynberg <ig...@gmail.com>.
tried your code here and it works just fine. not sure where your
problem is. perhaps you can generate your project using our maven
archetype and try again there.

-igor


On Feb 5, 2008 6:16 AM, Sri Sankaran <Sr...@sas.com> wrote:
>
> The behavior is unchanged whether I deploy my app as a WAR or as an exploded
> archive.  I have tried this in WebLogic 10, Tomcat 5.5 & Tomcat 6.
>
> Yes, cookies are enabled.
>
> Here is the code:
> Home.html
>
> &lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
> &nbsp;
> &lt;a href="#" wicket:id="another_link_to_page_two">Page Two too&lt;/a>
>
> Home.java
> public class Home extends WebPage {
>   public Home() {
>     add(new PageLink("link_to_page_two", PageTwo.class));
>     add(new PageLink("another_link_to_page_two",
>                               new IPageLink() {
>                                  public Page getPage() { return new
> PageTwo(); }
>                                  public Class getPageIdentity() { return
> PageTwo.class; }
>                               }
>                             )
>           );
>
> Page2.html
> This is page 2
>
> Page2.java
> public class PageTwo extends WebPage {}
>
> web.xml
>
> &lt;web-app>
>     &lt;display-name>Wicket Test&lt;/display-name>
>     &lt;filter>
>         &lt;filter-name>wicket_filter&lt;/filter-name>
>
> &lt;filter-class>org.apache.wicket.protocol.http.WicketFilter&lt;/filter-class>
>         &lt;init-param>
>           &lt;param-name>applicationClassName&lt;/param-name>
>           &lt;param-value>com.sas.mis.wicketTest&lt;/param-value>
>         &lt;/init-param>
>     &lt;/filter>
>     &lt;filter-mapping>
>         &lt;filter-name>wicket_filter&lt;/filter-name>
>         &lt;url-pattern>/*&lt;/url-pattern>
>     &lt;/filter-mapping>
> &lt;/web-app>
>
> Now, I have
> http://www.nabble.com/Page-Expired-issue-td13661826.html#a13661826 read the
> post  about page expiration.  It discusses the merits of servlet vs. filter
> mapping and mapping /* vs. /app/*.  But I fail to see that having any
> bearing on my current problem.
>
> Sri
>
>
> igor.vaynberg wrote:
> >
> > i dont think the page actually expires, i think wicket cant find it
> > anymore.
> >
> > are the cookies enabled in the browser?
> >
> > how are you deploying your app?
> >
> > show us the code to the link.
> >
> > show us your web.xml
> >
> > -igor
> >
> > On Feb 4, 2008 8:53 PM, Sri Sankaran <Sr...@sas.com> wrote:
> >>
> >> Wicket Version: 1.3
> >>
> >> OK, I'll admit to having a tenuous grasp of Wicket -- but I am trying to
> >> learn.  I am having trouble with a pages having a very short half life!
> >> I
> >> have looked at several prior postings on the topic of page expiry but
> >> none
> >> seem fit the bill.
> >>
> >> I have boiled my application down to two very simple pages:  Page1.html
> >> that
> >> has a link to Page2.
> >>
> >>
> >> &lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
> >>
> >> That's it!
> >>
> >> Here are the sequence of steps:
> >>
> >> I invoke the app, Page1 is displayed
> >> I click on the link on Page1, Wicket correctly leads me to Page2
> >> I use the browser's back button (I can hear you say aha!) -- Page1 is
> >> displayed
> >> I click on the link (to Page2) -- I get the "Page Expired" page
> >>
> >>
> >> I can see that this has something to do with the version of the page that
> >> is
> >> being referenced but beyond that I don't have a rational explanation for
> >> what I am seeing.  Can you please explain -- or point me to the
> >> appropriate
> >> docs?
> >>
> >> Also, what I have described above is a fairly common usage scenario.  How
> >> can I prevent the user from seeing the "Page expired" page?
> >>
> >> FWIW, the link to Page2 has been coded as a PageLink.  For good measure,
> >> I
> >> have even tried both PageLink constructor variants.  I see the same
> >> behavior
> >> in both cases.
> >>
> >> I appreciate any guidance you can provide.
> >>
> >> Sri
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Why-has-my-page-expired--tp15283551p15283551.html
> >> Sent from the Wicket - User 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
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Why-has-my-page-expired--tp15283551p15290962.html
> Sent from the Wicket - User 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
>
>

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


Re: Why has my page expired?

Posted by Sri Sankaran <Sr...@sas.com>.
The behavior is unchanged whether I deploy my app as a WAR or as an exploded
archive.  I have tried this in WebLogic 10, Tomcat 5.5 & Tomcat 6.

Yes, cookies are enabled.

Here is the code:
Home.html

&lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
&nbsp;
&lt;a href="#" wicket:id="another_link_to_page_two">Page Two too&lt;/a>

Home.java
public class Home extends WebPage {
  public Home() {
    add(new PageLink("link_to_page_two", PageTwo.class));
    add(new PageLink("another_link_to_page_two", 
                              new IPageLink() {
                                 public Page getPage() { return new
PageTwo(); }
                                 public Class getPageIdentity() { return
PageTwo.class; }
                              }
                            )
          );

Page2.html
This is page 2

Page2.java
public class PageTwo extends WebPage {}

web.xml

&lt;web-app>
    &lt;display-name>Wicket Test&lt;/display-name>
    &lt;filter>
        &lt;filter-name>wicket_filter&lt;/filter-name>
       
&lt;filter-class>org.apache.wicket.protocol.http.WicketFilter&lt;/filter-class>
        &lt;init-param>
          &lt;param-name>applicationClassName&lt;/param-name>
          &lt;param-value>com.sas.mis.wicketTest&lt;/param-value>
        &lt;/init-param>
    &lt;/filter>
    &lt;filter-mapping>
        &lt;filter-name>wicket_filter&lt;/filter-name>
        &lt;url-pattern>/*&lt;/url-pattern>
    &lt;/filter-mapping>
&lt;/web-app>

Now, I have 
http://www.nabble.com/Page-Expired-issue-td13661826.html#a13661826 read the
post  about page expiration.  It discusses the merits of servlet vs. filter
mapping and mapping /* vs. /app/*.  But I fail to see that having any
bearing on my current problem.

Sri

igor.vaynberg wrote:
> 
> i dont think the page actually expires, i think wicket cant find it
> anymore.
> 
> are the cookies enabled in the browser?
> 
> how are you deploying your app?
> 
> show us the code to the link.
> 
> show us your web.xml
> 
> -igor
> 
> On Feb 4, 2008 8:53 PM, Sri Sankaran <Sr...@sas.com> wrote:
>>
>> Wicket Version: 1.3
>>
>> OK, I'll admit to having a tenuous grasp of Wicket -- but I am trying to
>> learn.  I am having trouble with a pages having a very short half life! 
>> I
>> have looked at several prior postings on the topic of page expiry but
>> none
>> seem fit the bill.
>>
>> I have boiled my application down to two very simple pages:  Page1.html
>> that
>> has a link to Page2.
>>
>>
>> &lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
>>
>> That's it!
>>
>> Here are the sequence of steps:
>>
>> I invoke the app, Page1 is displayed
>> I click on the link on Page1, Wicket correctly leads me to Page2
>> I use the browser's back button (I can hear you say aha!) -- Page1 is
>> displayed
>> I click on the link (to Page2) -- I get the "Page Expired" page
>>
>>
>> I can see that this has something to do with the version of the page that
>> is
>> being referenced but beyond that I don't have a rational explanation for
>> what I am seeing.  Can you please explain -- or point me to the
>> appropriate
>> docs?
>>
>> Also, what I have described above is a fairly common usage scenario.  How
>> can I prevent the user from seeing the "Page expired" page?
>>
>> FWIW, the link to Page2 has been coded as a PageLink.  For good measure,
>> I
>> have even tried both PageLink constructor variants.  I see the same
>> behavior
>> in both cases.
>>
>> I appreciate any guidance you can provide.
>>
>> Sri
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Why-has-my-page-expired--tp15283551p15283551.html
>> Sent from the Wicket - User 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-has-my-page-expired--tp15283551p15290962.html
Sent from the Wicket - User 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


Re: Why has my page expired?

Posted by Igor Vaynberg <ig...@gmail.com>.
i dont think the page actually expires, i think wicket cant find it anymore.

are the cookies enabled in the browser?

how are you deploying your app?

show us the code to the link.

show us your web.xml

-igor

On Feb 4, 2008 8:53 PM, Sri Sankaran <Sr...@sas.com> wrote:
>
> Wicket Version: 1.3
>
> OK, I'll admit to having a tenuous grasp of Wicket -- but I am trying to
> learn.  I am having trouble with a pages having a very short half life!  I
> have looked at several prior postings on the topic of page expiry but none
> seem fit the bill.
>
> I have boiled my application down to two very simple pages:  Page1.html that
> has a link to Page2.
>
>
> &lt;a href="#" wicket:id="link_to_page_two">Page Two&lt;/a>
>
> That's it!
>
> Here are the sequence of steps:
>
> I invoke the app, Page1 is displayed
> I click on the link on Page1, Wicket correctly leads me to Page2
> I use the browser's back button (I can hear you say aha!) -- Page1 is
> displayed
> I click on the link (to Page2) -- I get the "Page Expired" page
>
>
> I can see that this has something to do with the version of the page that is
> being referenced but beyond that I don't have a rational explanation for
> what I am seeing.  Can you please explain -- or point me to the appropriate
> docs?
>
> Also, what I have described above is a fairly common usage scenario.  How
> can I prevent the user from seeing the "Page expired" page?
>
> FWIW, the link to Page2 has been coded as a PageLink.  For good measure, I
> have even tried both PageLink constructor variants.  I see the same behavior
> in both cases.
>
> I appreciate any guidance you can provide.
>
> Sri
>
> --
> View this message in context: http://www.nabble.com/Why-has-my-page-expired--tp15283551p15283551.html
> Sent from the Wicket - User 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