Repository navigation
feat(theme)!: remove the JSP search UI and the JSP theme plugin type - #3497
Merged
Merged
Conversation
The login and new-password pages already use the admin UI's assets, and they are the only non-admin JSPs left once the search screens go. Move them to WEB-INF/view/admin/login/; the URL stays /login/. LoginAction and FessLoginAction no longer pick a per-virtual-host copy of these pages. Every virtual host renders the same login page. FessHtmlPath is edited by hand (freegen does not run on JDK 21), so add a test that every constant names an existing JSP.
Three places sent the user to an action that serves a JSP search page. The static theme answers those URLs now, so redirect to paths instead: - A user denied an admin page is redirected to the root. UserRoleLoginException no longer carries a target action, and FessBaseAction gains redirectToRoot(), still routed through SystemHelper.getRedirectResponseToRoot(). - After the forced password change, the user lands where a login lands (admin dashboard, the admin page their role allows, or the root) instead of the JSP profile page. - After an SSO login, the stored search is restored at /search/?name=value&..., the same URL the search action produced.
The static theme has served the search UI by default since the previous change, so these actions and pages are no longer reachable: - RootAction, SearchAction, HelpAction, ChatAction, ProfileAction, CacheAction and the five Error*Action classes, with ChatForm, ProfileForm, CacheForm, ErrorForm and the shared SearchForm. - The search, advanced search, help, chat, profile and error JSPs and their FessHtmlPath entries. - ViewHelper.getCachedFacetResponse(), which only the JSP pages used. GET requests to these URLs are answered by the static theme, and the old paging URLs are still redirected by StaticThemeFilter. A POST to one of them now gets 404. The cached-page template (cache.hbs) stays: the v2 cache API renders it.
These were the originals the page design editor restored from. The editor is gone and nothing else reads them, so remove the tree and the unused ResourceUtil.getOrigPath(). WEB-INF/orig/open-search/osdd.xml stays: it is the OpenSearch description template.
Saving the General settings copied 19 search and login JSPs into WEB-INF/view/<virtual host key>/ so that each virtual host could edit its own copy. Those pages are gone or moved, and a virtual host gets its own look from the static theme named after its key. Remove SystemHelper's design JSP list and refreshDesignJspFiles(), the 19 addDesignJspFileName entries in fess.xml, the call from the General settings, VirtualHostHelper.getVirtualHostPath()/getVirtualHostPaths() and FessSearchAction.virtualHost(). getVirtualHostKey() stays; theme selection, error pages and search filtering use it. A plugin that redefines systemHelper and still calls addDesignJspFileName fails to initialize that component definition with a BeanMethodNotFoundException, as the plugin's own container tests show; remove those calls. A real server boot was verified to still come up.
A fess-theme-* jar carried JSP pages that ThemeHelper extracted into WEB-INF/view/<name>/, and a virtual host picked them up through the per-host JSP lookup that is now gone. Remove ThemeHelper, the THEME artifact type and its install/uninstall branches, and stop fess-setup from listing or installing fess-theme-* jars. Static themes are not affected: they are published under org/codelibs/fess/themes/ without this prefix and installed as ZIP archives by the theme screen and fess-setup. A fess-theme-*.jar left in the plugin directory by an older release shows up as a plain jar on the plugin screen, where it can be deleted; "fess-setup remove plugin <name>" also removes it.
FessSearchAction registered data for the JSP search pages on every request (labels, languages, popular words, feature flags, the user name) and showed the permission-state notice through <la:errors>. The actions that still extend it (login, logout, SSO, go, thumbnail, OSDD) use none of that; the static theme gets the permission state from the v2 search API. Keep only the login requirement, the redirect to login, the thumbnail flag and the helpers those actions use. Remove what only the JSP pages called from SystemHelper (language items, search HTML data) and ViewHelper (localized page paths, the session flag, initial facet and geo parameters). ViewHelper.setUseSession(), addInitFacetParam() and addInitGeoParam() go with them; an app.xml override that still calls them fails to initialize that component definition with a BeanMethodNotFoundException; remove those calls.
fe.tld now declares the eight functions the admin and login JSPs call: html, date, formatDate, base64, fileExists, url, replace and permission. Remove the other 21 declarations (including mltQuery and mltForm, which pointed at methods that did not exist), the FessFunctions methods only they reached, and the request-attribute constants those methods read. parseDate(String, String) and escapeJs stay because Java code calls them. Add a test that fe.tld declares exactly the functions the JSPs call and that every declaration resolves to a method, since JSPs are not compiled by the build.
…used Remove 134 labels and 6 messages from all 17 bundles, with their FessLabels and FessMessages entries and tests. Each was referenced only by the removed JSPs, actions, forms (field labels such as labels.hq) or helper methods, or only by the static themes' own JavaScript naming the key; a script checked the Fess repositories, plugins, themes, tools and docs for any other reference. The static themes look these names up in their own copies in themes/*/i18n/messages.*.json, never in fess_label/fess_message, so removing the bundle entries does not change theme behavior.
Remove the search screens' stylesheets, scripts and images (css/style.css, css/chat.css, js/search.js, js/suggestor.js, the bundled jQuery, clipboard, marked and DOMPurify copies, and unused images). Kept: the files the bundled static theme and the fess-themes themes load from the webapp root (css/bootstrap.min.css, css/font-awesome.min.css, js/popper.min.js, js/bootstrap.min.js, favicon.ico), css/fonts (also used by the admin UI's Font Awesome), and what the admin and login pages use (js/login.js, images/logo-top.png, images/logo-head.png).
This was referenced Sep 27, 2026
marevol
added a commit
to codelibs/fess-docs
that referenced
this pull request
Sep 27, 2026
… type (#559) Fess 15.9 removed the JSP search screens and the fess-theme plugin type (codelibs/fess#3497). Saving the General settings no longer copies JSP files per virtual host, the login page is served from WEB-INF/view/admin/login/ for every virtual host, and a fess-theme-*.jar is only kept as a plain jar that changes nothing. Update the 15.9 pages in all seven languages that still described the old behavior: the virtual host note, the JAR theme section of the theme development guide (now a short "removed in 15.9, move to a static theme" section), the plugin type tables, the plugin API type list, the theme guide note, the webapp plugin guide's addDesignJspFileName advice, the busy.jsp error page of load control, and the password change flow of the role search page. The upgrade notes now say that per-virtual-host login pages and JAR themes are gone, and that custom fields shown in the JSP results must also be added to query.additional.api.response.fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the JSP search UI and the JSP theme plugin type. Since #3460 the static theme serves the search pages by default, so the JSP search actions, pages and the code only they used are unreachable. The login pages stay JSP and move under the admin view tree.
Changes
WEB-INF/view/admin/login/; the URL stays/login/, and the forms post to/login/explicitly. Every virtual host renders the same login page./; an admin lands on the dashboard. After an SSO login the stored search is restored at/search/?…, as before.RootAction,SearchAction,HelpAction,ChatAction,ProfileAction,CacheAction, the fiveError*Actionclasses,ChatForm,ProfileForm,CacheForm,ErrorFormandSearchForm. GET requests to their URLs are served by the static theme (old paging URLs are still redirected); a POST now gets 404.WEB-INF/orig/view.cache.hbs(used by the v2 cache API) andWEB-INF/orig/open-search/osdd.xmlstay.WEB-INF/view/<key>/;SystemHelper.addDesignJspFileName()and the 19fess.xmlentries are gone.ThemeHelperand thefess-themeplugin type are removed, in the admin plugin screen and infess-setup. Static themes are unaffected.FessSearchAction,SystemHelper,ViewHelper,FessFunctions,fe.tld(29 → 8 functions) andConstantskeep only what the remaining actions and JSPs use.FessHtmlPathconstant names an existing JSP;fe.tlddeclares exactly the functions the JSPs call; everyla:link/la:formtarget in the JSPs, including the target a barela:formderives from its location, resolves to an existing action.Upgrade notes
WEB-INF/view/<key>/) are no longer used. Customize a static theme instead; a virtual host picks the theme named after its key.fess-theme-*plugins no longer work. A leftover jar is shown as a plain jar on the plugin screen and can be deleted there or withfess-setup remove plugin <name>.app.xmloverride that callsSystemHelper.addDesignJspFileName(),ViewHelper.setUseSession(),addInitFacetParam(),addInitGeoParam()orsetFacetCacheDuration()names a method that no longer exists; initializing that component fails withBeanMethodNotFoundException. Remove those calls.FessFunctionsmethods (for exampleformatFileSize,formatNumber,join) need to be updated.Verification
mvn test: 7689 tests, 0 failures, 0 errors. Every commit compiles on its own.WEB-INF/view/admin/**,WEB-INF/view/common/admin/**): 0 errors; a deliberately brokenfe:call makes it fail.fe:functions in this repository or in the other Fess repositories (plugins, themes, tools), apart from fess-webapp-example, updated in chore: drop the design-JSP mappings from the systemHelper override fess-webapp-example#18.mvn antrun:run,mvn package) on OpenSearch 3.8:/login/renders; theadmin/adminforced password change lands on the dashboard, a non-admin user's login on/; a non-admin user opening an admin page is redirected to/and the denial is audit-logged; POST/search/returns 404; GET/search/next?pn=3&num=20redirects withstart=60;/serves the static theme; saving the General settings with a virtual host creates no JSP copy; a leftoverfess-theme-simplejar is listed as a plain jar and removable. The DI container also starts standalone.