code: @RequestMapping
      public ModelAndView showSearchForm(RenderRequest request, RenderResponse response) {
          final Map<String, Object> model = new HashMap<>();
  
          String viewName;
          // Determine if the new REST search should be used
          if (isRestSearch(request)) {
              viewName = "/jsp/Search/searchRest";
          } else {
              // Determine if this portlet displays the search launch view or regular search view.
              final boolean isMobile = isMobile(request);
              viewName = isMobile ? "/jsp/Search/mobileSearch" : "/jsp/Search/search";
          }
  
          // If this search portlet is configured to be the searchLauncher, calculate the URLs to the
          // indicated
          // search portlet.
          PortletPreferences prefs = request.getPreferences();
          final String searchLaunchFname = prefs.getValue(SEARCH_LAUNCH_FNAME, null);
          if (searchLaunchFname != null) {
              model.put("searchLaunchUrl", calculateSearchLaunchUrl(request, response));
              model.put("autocompleteUrl", calculateAutocompleteResourceUrl(request, response));
              viewName = "/jsp/Search/searchLauncher";
          }
          return new ModelAndView(viewName, model);
      }
docs: Display a search form