Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:55:05+00:00 2026-06-01T05:55:05+00:00

I developed a shopsystem. there is a product page, which lists the available items

  • 0

I developed a shopsystem. there is a product page, which lists the available items filtered by some select menus. there is also one item detail page to view some content about each product. the content of that page will be loaded out of an xml property file. if one would click the link in the listview of an item, to view some details, an item specific GET parameter is set. with the parameters value, i can dynamically load the content for that specific item from my properties, by altering the loaded keys name.

so far so good, but not really good. so much to the backgroud. lets get to some details.

most of all, this is some SEO motivated stuff. so far there is also a problem with the pageinstance Id in the url for statefull pages, not only because of the nonstable url, also because wicket is doing 302 redirects to manipulate the url. maybe I will remove the statefull components of the item detailpage to solve that problem.

so now there are some QR-code on the products being sold, that contain a link to my detail page. these links are not designed by myself and as you can imagine, they look a whole lot of different like the actual url. lets say the QR-code url path would be “/shop/item1” where item1 would be the product name. my page class would be ItemDetailPage .
I wrote an IRequestMapper that I am mounting in my WebApplication#init() that is resolving the incoming requests URL and checks wether it needs to be resolved by this IRequestMapper. If so, I build my page with PageProvider and return a requesthandler for it.

public IRequestHandler mapRequest(Request request) {
                if(compatibilityScore>0) {
                    PageProvider provider = new PageProvider(ItemDetailPage.class, new ItemIDUrlParam(request.getUrl().getPath().split("/")[1]));
                    provider.setPageSource(Application.get().getMapperContext());
                    return new RenderPageRequestHandler(provider);
                }
                return null;
            }

So as you can see, I build up a parameter that my detailpage can handle. But the resulting URL is not very nice. I’d like to keep the original url by mapping the bookmarkable content to it, without any redirect.
My first thought was to implement an URLCodingStrategy to rebuild the URL with its parameters in the form of a path. I think the HybridUrlCodingStrategy is doing something like that.
After resolving the URL path “/shop/item1/” with the IRequestMapper it would look like “/shop/item?1?id=item1” where the first parameter off course is the wicket pageinstance Id, which will most likely be removed as I will rebuild the detail page to be stateless 🙁
after applying an HybridURLCodingStrategy it might look like “/shop/item/1/id/item1” or “/shop/item/id/item1” without pageinstance Id. another Idea would be to remove the second path part and the parameter name and only use the parameters value so the url would look like “/shop/item1” which is then the same url as it was in the request.

Do you guys have any experience with that or any smart ideas?
The rewuirements are

  1. Having one fix URL for each product the SE bot can index
  2. no parameters
  3. stateless and bookmarkable
  4. no 302 redirects in any way.
  5. the identity of the requested item must be available for the detailpage

with kind regards from germany
Marcel

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:55:06+00:00Added an answer on June 1, 2026 at 5:55 am

    As Bert stated, your use case should be covered with normal page mounting, see also the MountedMapper wiki page, for your case a concrete example:

    mountPage("/shop/${id}", ShopDetailPage.class);
    

    Given that “item1” is the ID of the item (which is not very clear to me), you can retrieve it now as the named page parameter id in Wicket. Another example often seen in SEO links, containing both the unique ID and the (non-unique, changing) title:

    mountPage("/shop/${id}/${title}", ShopDetailPage.class);
    

    Regarding the page instance ID, there are some ways to get rid of it, perhaps the best way is to make the page stateless as you said, another easy way is to configure IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER as the render strategy (see API doc for consequences).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I developed a background service for android, which works by providing some interface through
We developed an asp.net website for one of our customer. We followed our rules
I developed a Java application, which through a 3G modem I get the SMS's
I developed an application which uses we can login to facebook and the logged
I developed a form for Blackberry that keeps me some information, but I need
I developed a web page for PC and I wanted it to be compatible
I developed one android application.Its working fine for our device and and most of
I Developed a Bluetooth app that we now offer but a customer requested some
We developed an Eclipse plugin and tested & delivered on Win 32bit os. One
I developed one application with Pinax http://pinaxproject.com/ . I created project by pinax-admin setup_project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.