How to deploy IonicAPP on Tomcat server?

I am new to Ionic so please guide me the steps to follow to deploy it on tomcat server.

This does not make sense unless you build a web app rather than a mobile app.

Do u mean to say that we cannot use Tomcat server for IONIC APPS

No, I mean that when you build an ionic mobile app, the app is not deployed into Tomcat, it is packaged and uploaded to the AppStore or Google Play.
You can use Tomcat to deploy a java webapp to expose a JSON REST API that will be consumed by your Ionic app but this webapp has no dependency on Ionic.

1 Like

Thank you soo much :slight_smile:

As ionic supports even browser rendering, one may need to deploy the ionic app as normal webapp or any html web server such as iis, httpd or ngnix etc in such case these are the steps required.

In ionic 5, you can build for any web server using the command

npm run build --prod


ionic build --prod -generateSourceMap false

and copy the generated www folder as ROOT (removed existing ROOT folder) in folder E:\apache-tomcat-10.0.10\webapps

then visit