A demonstration WebApp plugin for Fess, showing how to create custom JSP design templates and extend the search engine's web interface functionality.
This plugin demonstrates how to extend Fess's web application layer by providing custom JSP templates for various UI components. It serves as a practical example for developers who want to create their own custom web interfaces for Fess search applications.
- Custom JSP Templates: Provides custom design templates for search pages, navigation, and error handling
- System Helper Extension: Extends Fess's
SystemHelper
class with enhanced error handling and logging - Component Registration: Demonstrates dependency injection configuration using LastaDi framework
- Comprehensive UI Coverage: Includes templates for search interface, user management, and error pages
The plugin registers custom JSP templates for the following components:
index.jsp
- Main search pagesearch.jsp
- Search interfacesearchResults.jsp
- Search results displaysearchNoResult.jsp
- No results found pagesearchOptions.jsp
- Search optionsadvance.jsp
- Advanced searchhelp.jsp
- Help page
header.jsp
- Page headerfooter.jsp
- Page footer
error/error.jsp
- General error pageerror/notFound.jsp
- 404 Not Founderror/system.jsp
- System errorerror/redirect.jsp
- Redirect errorerror/badRequest.jsp
- 400 Bad Request
login/index.jsp
- Login pageprofile/index.jsp
- User profile page
cache.hbs
- Cache display template (Handlebars)
- Java 21 or later
- Maven 3.6 or later
- Fess 15.0 or later
The plugin is available on Maven Central:
<dependency>
<groupId>org.codelibs.fess</groupId>
<artifactId>fess-webapp-example</artifactId>
<version>15.0.0</version>
</dependency>
- Download the plugin JAR from Maven Repository
- Follow the Plugin Installation Guide in the Fess documentation
git clone https://github.com/codelibs/fess-webapp-example.git
cd fess-webapp-example
mvn clean package
The compiled JAR will be available in the target/
directory.
src/
├── main/
│ ├── java/
│ │ └── org/codelibs/fess/plugin/webapp/helper/
│ │ └── CustomSystemHelper.java
│ └── resources/
│ └── fess+systemHelper.xml
└── test/
├── java/
│ └── org/codelibs/fess/plugin/webapp/helper/
│ └── CustomSystemHelperTest.java
└── resources/
└── test_app.xml
The main plugin class that extends Fess's SystemHelper
:
- Location:
src/main/java/org/codelibs/fess/plugin/webapp/helper/CustomSystemHelper.java
- Function: Overrides
parseProjectProperties()
with enhanced error handling - System Property: Sets
fess.webapp.plugin=true
during initialization
- DI Configuration:
src/main/resources/fess+systemHelper.xml
- Component Registration: Maps UI component names to JSP template files
- Test Configuration:
src/test/resources/test_app.xml
# Compile the project
mvn clean compile
# Run tests
mvn test
# Create package
mvn clean package
# Format code
mvn formatter:format
# Check license headers
mvn license:check
# Generate documentation
mvn javadoc:javadoc
- Extend the
CustomSystemHelper
class or create your own helper - Register your JSP templates in the DI configuration file
- Ensure your plugin JAR includes the manifest entry:
Fess-WebAppJar=true
The plugin uses LastaDi dependency injection framework. Template mappings are configured in fess+systemHelper.xml
:
<component name="systemHelper" class="org.codelibs.fess.plugin.webapp.helper.CustomSystemHelper">
<postConstruct name="addDesignJspFileName">
<arg>"index"</arg>
<arg>"index.jsp"</arg>
</postConstruct>
<!-- Additional template mappings... -->
</component>
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature
) - Create a Pull Request
- Follow the existing code style and conventions
- Add appropriate test cases for new functionality
- Ensure all tests pass before submitting
- Update documentation as needed
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Documentation: Fess Documentation
- Plugin Guide: Plugin Installation Guide
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Fess - The main Fess search server
- LastaFlute - Web framework used by Fess
- DBFlute - Database access framework
CodeLibs Project - https://www.codelibs.org/