1

I have a vue.js application and want to deploy it with my JAX-RS backend. The wildfly server is up and running and web.xml is configured as:

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

But after running i got a 404 error that the static folder (and app.js) cannot be found. How can I enable access to the static folder?

mbakirci
  • 33
  • 1
  • 7
  • Possible duplicate of [How to configure Wildfly to serve static content (like images)?](http://stackoverflow.com/questions/22684037/how-to-configure-wildfly-to-serve-static-content-like-images) – Lukasz Wiktor Apr 18 '17 at 11:51
  • So I need to hack around my standalone.xml? – mbakirci Apr 18 '17 at 15:32
  • What is your structure? Where is your app.js and where is your index.html and what is getting 404? Also, what are you using to build the war? I generally never have to mess with standalone.xml – Lev Kuznetsov Apr 18 '17 at 20:59
  • I have a simple vue-cli webapp and a java ee web project. I put all of my files in the web directory of my java project after I run npm run build on the vue-cli. The 404 error is getting on all files in the static folder – mbakirci Apr 19 '17 at 04:43

1 Answers1

1

I use this stack. Wildfly + Spring Rest api + Vuejs app embbeded in .war

It works. You must put all your .js .css .png ... inside WebContent Be sure the dist folder from npm run build go all inside WebContent Example:

  • WebContent
    • index.html
    • app.js
    • statics
      • img
        • photo1.png
    • assets
      • work.svg

Your welcome file is correct.