Forward web request for directory index ('/') to an index.htm page in JBoss 4.0.5

Posted by The Pretender on Stack Overflow See other posts from Stack Overflow or by The Pretender
Published on 2010-05-04T06:46:07Z Indexed on 2010/05/04 7:18 UTC
Read the original article Hit count: 234

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about jboss