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 3362494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:16:52+00:00 2026-05-18T03:16:52+00:00

Consider a Wicket WebPage that redirects to another page (based on some logic omitted

  • 0

Consider a Wicket WebPage that redirects to another page (based on some logic omitted from here):

public class SomePage extends WebPage {
    public SomePage(PageParameters parameters) {
        setResponsePage(AnotherPage.class);
        setRedirect(true);
    }
}

I need to pass on the PageParameters to that other page, and this seems to be the way to do that:

setResponsePage(new AnotherPage(parameters));

However, when creating a new Page object like this, I end up at an URL such as /?wicket:interface=:1:::: instead of the clean /another. AnotherPage is defined as:

@MountPath(path = "another")
public class AnotherPage extends WebPage {
    // ...
}

(Where MountPath is from org.wicketstuff.annotation.mount package.)

So, my questions are:

  • Some other way to pass on the params?
  • Some way to keep the URL pretty? Is the above a Wicket Stuff specific limitation instead of core Wicket?

Update

Heh, turns out any of the suggested approaches work, and also what I originally tried — setResponsePage(new AnotherPage(parameters)) — as long as I remove setRedirect(true). The URL does stay the same (path to SomePage) in that case, and I just realised I really should have mentioned right from the start that it’s okay if it does (as long as it’s "pretty" and the parameters are passed)!

The page ("SomePage") dispatches requests, based on query params, to a couple of possible result pages that look different but that are accessed through the same url. I tried to formulate the question as generic and minimalist as possible, but that went awry as I left out relevant info. :-/

Sorry if this ended up weird, unclear or useless for others. If you have a suggestion about renaming it, feel free to comment.

  • 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-05-18T03:16:52+00:00Added an answer on May 18, 2026 at 3:16 am

    Maybe the other setResponsePage method in Component is closer to what you want:

    /**
     * Sets the page class and its parameters that will respond to this request
     * 
     * @param <C>
     * 
     * @param cls
     *            The response page class
     * @param parameters
     *            The parameters for this bookmarkable page.
     * @see RequestCycle#setResponsePage(Class, PageParameters)
     */
    public final <C extends Page> void setResponsePage(final Class<C> cls, PageParameters parameters)
    {
        getRequestCycle().setResponsePage(cls, parameters);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everyone who's done any web application development in Scala knows that you can use
Consider the following setup: A windows PC with a LAN interface and a WiFi
Consider the need to develop a lightweight desktop DB application on the Microsoft platforms.
Consider: List<String> someList = new ArrayList<>(); // add "monkey", "donkey", "skeleton key" to someList
Consider this problem: I have a program which should fetch (let's say) 100 records
Consider these two function definitions: void foo() { } void foo(void) { } Is
Consider the Oracle emp table. I'd like to get the employees with the top
Please allow me to preface this by saying I'm pretty much brand new to
I'm going to start a new project - rewriting an existing system (PHP +
In order to satisfy customer requirements, we will need to let users exchange information

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.