Websphere服务器中的静态网站托管

时间:2020-04-10 15:07:39

标签: java reactjs websphere hosting url-routing

我是Websphere的新手,他试图在Web sphere中托管一个静态网站,并寻求将URL重定向到index.html以使客户端路由工作正常。

我创建了WEB-INF和web.xml来实现路由,但是它似乎不起作用。

MyApp
---- WEB-INF
-------- web.xml
---- index.html

如下创建web.xml

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
    <error-page>
          <error-code>404</error-code>
          <location>/index.html</location>
     </error-page>
</web-app>

我错过了任何东西吗,当我直接浏览url时我仍然得到404,这意味着路由没有选择。

Eg: domain/example/1

解决此问题的任何想法/建议。

谢谢

0 个答案:

没有答案
相关问题