Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3065

HomePageMapper ignores request to '/' with query string parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-M2.1
    • 1.5-M3
    • wicket
    • None

    Description

      Issue a request to http://host:port/contextpath/?something
      Wicket will log an error message like:
      ERROR - RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=?something

      I think the reason is in HomePageMapper which maps to the configured home page only if there are no query parameters.

      HomePageMapper.java:

      public IRequestHandler mapRequest(Request request)
      	{
      		if (request.getUrl().getSegments().size() == 0 &&
      			request.getUrl().getQueryParameters().size() == 0)
      		{
      			return new RenderPageRequestHandler(new PageProvider(getContext().getHomePageClass()));
      		}
      		else
      		{
      			return null;
      		}
      	}
      

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: