# Issue when deploying weweb app with a context path

**URL:** <https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902>\
**Category:** How do I?\
**Created:** [December 12, 2023, 4:35pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902 "2023-12-12T16:35:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerome1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jerome1/32/6398_2.png) [@Jerome1](https://community.weweb.io/u/Jerome1)\
**Post date:** [December 12, 2023, 4:35pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/1 "2023-12-12T16:35:23Z")

</div>

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](http://localhost:8080/404).  
Here is the dev tools associated network log:

 ![Screenshot 2023-12-12 at 17.33.38](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/dddd91d243776c22e5b9da18adba387d142655cd.png)

 ![Screenshot 2023-12-12 at 17.33.47](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/2811d9b209238ccfcca86960a59107cbdbeeaa1d.jpeg)

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [December 13, 2023, 3:46pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/2 "2023-12-13T15:46:57Z")

</div>

Hi @Jerome1 👋

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

---

<div class="post-metadata">

**Author:** ![Marc](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/marc/32/30_2.png) [@Marc](https://community.weweb.io/u/Marc)\
**Post date:** [December 13, 2023, 4:32pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/3 "2023-12-13T16:32:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jerome1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jerome1/32/6398_2.png) [@Jerome1](https://community.weweb.io/u/Jerome1)\
**Post date:** [December 14, 2023, 9:39am UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/4 "2023-12-14T09:39:55Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Jerome1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jerome1/32/6398_2.png) [@Jerome1](https://community.weweb.io/u/Jerome1)\
**Post date:** [December 14, 2023, 2:30pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/5 "2023-12-14T14:30:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [December 14, 2023, 3:24pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/6 "2023-12-14T15:24:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jerome1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jerome1/32/6398_2.png) [@Jerome1](https://community.weweb.io/u/Jerome1)\
**Post date:** [December 14, 2023, 3:56pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/7 "2023-12-14T15:56:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jerome1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jerome1/32/6398_2.png) [@Jerome1](https://community.weweb.io/u/Jerome1)\
**Post date:** [December 14, 2023, 3:59pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/8 "2023-12-14T15:59:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Marc](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/marc/32/30_2.png) [@Marc](https://community.weweb.io/u/Marc)\
**Post date:** [December 18, 2023, 10:06am UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/9 "2023-12-18T10:06:10Z")

</div>

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 “/” ?

---

<div class="post-metadata">

**Author:** ![Jerome1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jerome1/32/6398_2.png) [@Jerome1](https://community.weweb.io/u/Jerome1)\
**Post date:** [December 18, 2023, 10:34am UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/10 "2023-12-18T10:34:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Marc](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/marc/32/30_2.png) [@Marc](https://community.weweb.io/u/Marc)\
**Post date:** [December 19, 2023, 4:04pm UTC](https://community.weweb.io/t/issue-when-deploying-weweb-app-with-a-context-path/5902/11 "2023-12-19T16:04:46Z")

</div>

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.
