xaepe
xaepe

Reputation: 91

Redirect to index.html in Wildfly

I have an application written in Java EE, it's working on WildFly Application Server. My application path is set:

@ApplicationPath("api")
public class ApplicationConfig extends Application{}

So, if I want to see index.html of my app, I type http://localhost:8080/my_app_name. Is there any way to redirect all requests e.g. localhost:8080/my_app_name/something_different_than_api to index.html file?

Upvotes: 1

Views: 1913

Answers (1)

xaepe
xaepe

Reputation: 91

Solution is adding to file web.xml error page tag:

<error-page>
     <error-code>404</error-code>
     <location>/index.html</location>
</error-page>

Upvotes: 2

Related Questions