Forward web request for directory index ('/') to an index.htm page in JBoss 4.0.5
- by The Pretender
I am using JBoss 4.0.5.GA to run a set of java applications. One of them is a web frontend, using Spring 1.4. URL mappings are configured in a way that 'fake' pages from request URLs are mapped to controllers. That means that when someone requests /index.htm, there's no actual 'index.htm' on disk, and that request maps to a specific conroller which then renders a jsp view.
So the problem is as follows: I need to tell JBoss to somehow forward all requests for directory indices to corresponding 'index.htm' URLs like so: / ? /index.htm; /news/ ? /news/index.htm; /foo/bar/baz/ ? /foo/bar/baz/index.htm and so on.
I can't use Tomcat's welcome-file-list feature because it looks for those files on disk, while all 'index.htm's are fake and don't actually exist on disk.