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

  • Home
  • SEARCH
  • 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 6834721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:08:49+00:00 2026-05-26T23:08:49+00:00

I am trying to sign into my application. First I throw the RestartResponseAtInterceptPageException (this

  • 0

I am trying to sign into my application. First I throw the RestartResponseAtInterceptPageException (this is in a WicketPanel on my BasePage):

add(new Link<String>("signin") {
   @Override
   public void onClick() {
       throw new RestartResponseAtInterceptPageException(SignIn.class);
   }
});

The SignIn Page class contains a form (an inner private class) for the sign in, with the following submit button:

add(new Button("signinButton") {

    @Override
    public void onSubmit() {
        final User user = model.getObject();
        final boolean result = MySession.get().authenticate(user);
        if (result) {
            if (!continueToOriginalDestination()) {
                setResponsePage(MySession.get().getApplication().getHomePage());
            }
         } else {
            error("Authentication failed");
         }
    }
 });

When this button is clicked and the user is successfully authenticated, I am not redirected to the page where I clicked on the signIn link but instead I stay on the SignIn page? I’ve tried debugging this, but haven’t been able to find out where things go wrong.

I am glad for any hints that lead to my finding the error of my ways.

This is wicket 1.5.1 by the way.

Small Update because I got the hint I needed from the answer, there is still a bit of explaining to do. The solution looks like this:

add(new Link<String>("signin") {
    @Override
    public void onClick() {
         setResponsePage(new SignIn(getPage()));
    }
});

The SignIn class gets a constructor that takes a page obviously and I simply set that page as with setResponsePage to return to where I started without all the continueToOriginalDestination and exception throwing.

  • 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-26T23:08:49+00:00Added an answer on May 26, 2026 at 11:08 pm

    RestartResponseAtInterceptPageException is meant to be used to redirect to an interception page while rendering a page. For example, in the constructor of a Page class ProtectedPage, if there is no user signed in, you throw new RestartResponseAtInterceptPageException(SignIn.class). When the SignIn page calls continueToOriginalDestination(), the user is taken back to the original ProtectedPage destination.

    Your use is not a typical use of RestartResponseAtInterceptPageException since you throw it in a link handler. Why don’t you do a setResponsePage(SignIn.class) directly instead? If you really want to return to the exact page you were on when the “signin” link is clicked, you could also try changing it to:

    add(new Link<String>("signin") {
       @Override
       public void onClick() {
           setResponsePage(getPage());
           throw new RestartResponseAtInterceptPageException(SignIn.class);
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add an actual percent sign into a printf statement in Java
I'm trying to pass in a Base64 string into a C#.Net web application via
I'm trying to implement a login system to sign into a website using public
I'm trying to digitally sign a PDF file using THIS project as an example.
I am trying to create a page for new user sign where i am
I am trying to filter out all characters before the first / sign. I
What I'm trying to do is add a [+] or [-] sign to an
I've been trying to implement the Facebook SDK into my application in order to
i am trying to sign an apk by following this guide. I created a
First of all i'm new to signing assemblies with SNKs, so this might be

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.