Issue when deploying weweb app with a context path

Hello,
I created in the weweb editor a very simple page with a single text inside.
I published and downloaded the weweb Vuejs app.
Using a freshly installed Tomcat 9 with default config, when I deploy it on / , I see my page perfectly.
But when I use a context path (e.g. /weweb), I get a 404 and I’m redirected on http://localhost:8080/404.
Here is the dev tools associated network log:

Hi @Jerome1 :wave:

I haven’t tried or encountered this before. Let me ask the tech team and get back to you on this one.

Hi @Jerome1 , can you send me the link of your project in DM so I can check what is going on ?

IT is not related to a specific project, you should be able to reproduce with:

  • create a project
  • drop a Text, and change its text size
  • Publish and download the Vuejs app, unzip it
  • Install a Tomcat server (and enable admin user in conf/tomcat-users.xml)
  • Deploy from the Tomcat admin portal the Vuejs app, using a context path (e.g. /weweb)
    → 404 error
    If you deploy on /, no issue

Thanks!

One thing I didn’t mention: the ‘Base tag’ has been set to ‘./’ to avoid file loading issue.

Hi, did you already successfully deployed a Vue application on a Tomcat server ?

Trying to figure out if we should check if its related to a specific configuration required server side or front end side.

Yes, I managed to deploy a Vue app (not generated by weweb) on a context path other than /.
And as mentioned, I also managed to deploy a Vue app generated by weweb on /.
I guess this is related to PWA / base tag setting.

BTW, did you manage to deploy a weweb app on a path other than / ?

Hi @Jerome1,

We have a client that correctly configured the base url for his self hosting.
I don’t know the exact details but his server does intelligent stuff and redirect some paths to ensure that the files are loaded.
I’m sorry but I cannot give you more details about this because I don’t have them.

Also I am not sure that “./” is a correct base url, why not set it to “/” ?

Hello @Marc,
Thank you for your response.
My question is as simple as: how do I deploy a weweb application in a specific context path? (e.g. /weweb)
It is very simple to do this with a simple Vue app not generated by weweb.

I used “./” for the base tag in weweb setting to avoid having an absolute path, and be able to have a app deployed on a context path other than “/”. If this is not the right setting, please tell me.

Hi @Jerome1,

Unfortunatly as I said, I don’t have the details of how the other user managed to make it work.
This is still an experimental feature in WeWeb and we should improve it during next here but for now you will have to find a way to make it work using the configuration of your server.