Search code examples
jspvue.jswebpackstruts

Struts application with Vue.js Webpack bundle together


We have a Struts 1.2 application with classical Jsp, StrutsActions and ActionForms etc. But we want to migrate our app to Rest based, Vue.js used application. Our main concern is to keep both application live together till all struts actions are gone.

We are now using VUE without webpack without any issue, but couldnt figure out a soft way to use webpack with our current struts implementation.

One thing that came into our mind is we are currently serving our some js,css,png files on a server and dynamically loading them to our jsp's at runtime with distinct adress.

Is it possible to make webpack bundle work by serving bundled package on that server and pointing bundled files in our index.jsp.And for development purpose I will point my npm dev server as file server and direct my jsp to read those files.

I'm fairly new at webpack tech so I might be missing something tough.

Thanks for your help.


Solution

  • I ended up creating new app for front end, and enabled CORS with a Filter for back-end api connection. By this way I can implement front end without any build issue and I will publish front independent from my back end.