Fix broken login flow in shiro-basic example (#545) The example was unusable: every request redirected to Shiro's default loginUrl of /login.jsp, which does not exist here, producing an infinite redirect loop. shiro.ini defined only [users] and [roles], so no filter chain was configured and Shiro protected every path including the login page and the form it posts to. Because shiroFilter is mapped for FORWARD as well as REQUEST, the JSPs the Struts actions forward to were caught too, so listing only the actions would not have been enough. Adds a [main] section pointing authc at the login action, and a [urls] chain leaving the login path anonymous while protecting the rest. Separately, the container rewrote redirect URLs as ...;jsessionid=... on a visitor's first request, and Jetty 11 rejects its own rewritten URI with HTTP 400 Invalid request. Restricting session tracking to cookies stops the rewriting. Verified in a browser and over HTTP: login as lonestarr renders the welcome page with roles and permissions resolved, logout returns to the login page, and welcome.action is no longer reachable afterwards. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This Maven multi-module project contains all the Apache Struts example applications that are part of the Apache Struts Getting Started tutorials at https://struts.apache.org.
To build all the example applications run the Maven command:
mvn -e clean package
In the project's root folder, Maven will build each module and create a .war file in the target sub-folder of each module.
You can then copy the .war files to your Servlet container (e.g. Tomcat, Jetty, GlassFish, etc).
Some modules have a README file with instructions and the URL to view that application.
The examples use the latest Struts version. For older versions, see the Releases page.