I tried to do the same and had the same question, although I wanted my url to use the trailing slash http://mydomain.com/myapp/calculator/
The answer is to use @UrlBinding and DynamicMappingFilter
I modified the example to:
@UrlBinding("/calculator/") public class CalculatorActionBean implements ActionBean { . . . return new ForwardResolution("/WEB-INF/view/calculator.jsp");
Then I added DMF to web.xml:
<filter> <display-name>Stripes Dynamic Mapping Filter</display-name> <filter-name>DynamicMappingFilter</filter-name> <filter-class>net.sourceforge.stripes.controller.DynamicMappingFilter</filter-class> <init-param> <param-name>ActionResolver.Packages</param-name> <param-value>com.example.stripes</param-value> </init-param> </filter> <filter-mapping> <filter-name>DynamicMappingFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping>
Now the clean URL works as expected and I never get redirected to the * .action URL after interacting with the form.
source share