Is it possible to deploy Angular app on IBM Websphere Application Server?

狂风中的少年 提交于 2019-12-08 10:05:06

问题


We're using IBM RAD for development and IBM Websphere Application Server as our web app server here at work. Give these constraints, would it still be possible to develop and deploy Angular SPAs? Like install a Typescript plugin for RAD probably, but how will you deploy it to WAS if there are no EAR files generated?


回答1:


You'll need to create a web module (if you haven't already) and package the result of the Angular build (the contents of the dist/ directory, by default in Angular 2) into the root of your web module, so that it can be served as static content. In Eclipse, the contents of the WebContent folder are placed in the root of the war. Then let RAD package up your web module into a war and possibly ear and deploy it.

That web module should have the following in web.xml in your web module, in order to allow deep links to be redirected back to the SPA so the router can route them properly:

<error-page>
    <error-code>404</error-code>
    <location>/</location>
</error-page>


来源:https://stackoverflow.com/questions/49201009/is-it-possible-to-deploy-angular-app-on-ibm-websphere-application-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!