0

I try to develop a maven project with Angular 2 with Spring security. The structure of the project is similar on this guide: http://csetutorials.com/deploy-angular-2-maven-webapp-on-tomcat.html

But i am having a problem when building angular 2 using webpack. Because when i change a html to jsp in my angular 2. I get an error for (maven or npm) like this

From that error, i try to find an appropriate loader to compile jsp file or some tweak for webpack to recognize .jsp file but i cant find any of those solutions. So is it webpack can't compile jsp files?

mR.Angular
  • 65
  • 2
  • 12

1 Answers1

0

There is not a lot of folks using webpack and JSP together. This SO question got no answers and ended up refactoring their code to solve the problem. I would suggest to re-factor your JSPs away from your Angular2 (split it up), or replace the remaining JSPs with Angular2 code.

In this page the extract-text-webpack-plugin plugin is used with JSP, but I'm not at all certain it will achieve what you want.

Community
  • 1
  • 1
hack_on
  • 2,532
  • 4
  • 26
  • 30