Available Pages:

This sample shows the ability of Jaxcent to maintain FORM data automatically.

The form data is stored in the "session" object. Please note that for this demo-server, the session timeout is set to 2 minutes. If you do not take any action for 2 minutes, the session data will be dropped.

Normally, session timeout is of the order of 10 minutes (or can be set.)

You can start from the Shopping Cart page and go sequentially, or visit pages randomly. The shopping cart has code behind it -- any other form data (name, address, etc) you enter will be automatically saved, and when you revisit the page, will be restored. This requires no additional coding.

For the purpose of this demonstration, normal data checking (e.g. prompting the user if fields are empty) has not been added to the pages. Data checking is only done at the summary page.

Note that the navigation mostly uses normal A HREF links. Buttons are not required, though still can be used as on the summary page.

The Shopping Cart, Shipping Address, Summary and Results page haves Java code associated with them. The other two pages list jaxcent.JaxcentPage directly as the page handler. All pages have AutoSessionData set to true, which enables the automatic data handling. An extract from the config file is shown below.

 <Page>
    <PagePath>/form/ShoppingCart.html</PagePath>
    <PageClass>sample.form.ShoppingCart</PageClass>
    <AutoSessionData>true</AutoSessionData>
 </Page>
 <Page>
    <PagePath>/form/NameAddress.html</PagePath>
    <PageClass>jaxcent.JaxcentPage</PageClass>
    <AutoSessionData>true</AutoSessionData>
 </Page>
 <Page>
    <PagePath>/form/ShippingAddress.html</PagePath>
    <PageClass>sample.form.ShippingAddress</PageClass>
    <AutoSessionData>true</AutoSessionData>
 </Page>
 <Page>
    <PagePath>/form/Payment.html</PagePath>
    <PageClass>jaxcent.JaxcentPage</PageClass>
    <AutoSessionData>true</AutoSessionData>
 </Page>
 <Page>
    <PagePath>/form/Summary.html</PagePath>
    <PageClass>sample.form.Summary</PageClass>
    <AutoSessionData>true</AutoSessionData>
 </Page>
 <Page>
    <PagePath>/form/Results.html</PagePath>
    <PageClass>sample.form.Results</PageClass>
    <AutoSessionData>true</AutoSessionData>
 </Page>

Start at shopping cart