Tagged: angular-ide, angular2, javaee, JBoss, tomcat
- This topic has 5 replies, 4 voices, and was last updated 7 years, 7 months ago by support-swapna.
-
AuthorPosts
-
cnikhParticipantI want to make a war file to deploy the Angular2 project which is developed using Angular IDE by Webclipse.
How to figure this out?
support-piotrParticipantHi Cnikh!
Thanks for giving a try to Angular IDE! Good news is that we do have integrated support for JavaEE on our roadmap. However, even now, it’s just few steps to get your project deployable to Tomcat.
First install required facets to the project:
- Right click on the project in Project Explorer+ and choose “Properties” and than choose “Project Facets”
- From the facet list choose Java and Dynamic Web Module (any 3.x)
- Click “Further configuration available…” link below the list of facets
- On the “Java” page, select “src” folder and remove it (unless you want to make a hybrid project, though in this case setup is slightly more complicated) and click Next
- On the “Web Module”, change “Content directory:” to
dist
(dist
is the default output folder forng build
. If you changed the default setting, enter appropriate name here) and press OK. - Press OK to install facets.
Now, build the project and deploy to your server:
- Open Terminal+ View and select your project from the combo list of from Project Explorer+
- Type command
ng build --watch
to build the project. This should populatedist
folder with contents.--watch
flag will keep the command running and rebuildingdist
contents always when a change is made to the source code. You should always ensure this command is running in the terminal before starting the server. - You can now deploy your project to Tomcat or other JavaEE servers.
Let me know if this works for you!
P.S. If you have troubles running
ng build
, please run commandnpm install --save-dev [email protected]
.- This reply was modified 8 years ago by support-piotr.
- This reply was modified 8 years ago by support-piotr.
- This reply was modified 8 years ago by support-piotr.
- This reply was modified 8 years ago by support-octavio.
cnikhParticipantThanks for your prompt response. Its working.
support-piotrParticipantHi Cnikh!
I am glad it works for you! Please let us know if you have any problems or suggestions for Angular IDE!
Best regards,
Piotr Tomiak
Yang FanParticipantHi,Piotr Tomiak,
I did exactly as you said above,but after deployed to tomcat ,I’m not sure how to access my app.
After I entered my url in browser “http://localhost:8080/MyProjectName”,it brougnt me to my index.html, but the error were “Failed to load http://localhost:8080/vendor.bundle.js” and all the other js, Could you help me find the problems? Thanks!Yangfan
——————————————————
Sorry to bother you ,I have solved this problem by changing the <base href=”<%=basePath%>”>, then it can find my js!
- This reply was modified 7 years, 7 months ago by Yang Fan.
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorYangfan,
Glad that you figured it out.
Please let us know if you see any other issues.–Swapna
MyEclipse Support -
AuthorPosts