zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
125 stars 56 forks source link

Context path /v1/home doesnt deploy the app but the app is deployed with just /v1 #95

Closed BijBal84 closed 2 years ago

BijBal84 commented 2 years ago

I have an app with a context path /v1/home and when i try to deploy with this context path , the server starts up with just saying app is accessible at http://localhost:8080/v1/home but am pretty sure webapp is not deployed as i don't see the logs i expect to see but if i deploy the same app with context path /v1 , webapp is fully deployed and i could see that it says app is accessible at http://localhost:8080/v1 but that doesnt help me , I also tried with context path as /v1%2Fhome and also deploys the app fully but am not able to access the app at http://localhost:8080/v1/home Please assist with this issue and has started when i took the latest version

IDE: Intellij 2021.2.3 Community Edition Tomcat : 8.0.35 JDK : 1.8

yuezk commented 2 years ago

@BijBal84 Are you using SmartTomcat 4.3.6?

BijBal84 commented 2 years ago

Yes that is correct

yuezk commented 2 years ago

@BijBal84 I see. But I couldn't reproduce this problem with 8.0.35. It could be that my test project too simple. Is that possible to provide a minimal project that could reproduce this problem? Or are there any error logs logged in Tomcat Console?

Below are my configurations and it works.

image image image
BijBal84 commented 2 years ago

Ok wow , i should have tried a minimal project before reaching out to y'all , its great to see a working example from your side , let me try to clean my Smart Tomcat directories and try again , I always thought that the issue was with just a single xml file C:/Users/user1/.SmartTomcat/wokspace/module/module.main/conf/Catalina/localhost/v1.xml and i wasnt able to locate the context path anywhere within C:/Users/user1/.SmartTomcat/wokspace as well, but that doesnt seem to be the case. Thank you so much for proving it works with a simple project . There are no errors in the console as such

yuezk commented 2 years ago

The support for context paths like /foo/bar was added in 4.3.6. If you configured the context path as /v1/home, there will be a file named v1#home.xml under the <SmartTomcat>/conf/Catalina/localhost folder.

Another way is to try to use a fresh Tomcat package to test it.

yuezk commented 2 years ago

@BijBal84 I can reproduce it on Windows. I'm checking it.

BijBal84 commented 2 years ago

ok great , yes i missed mentioning that my operating system is Windows 10 and all i can see is C:/Users/user1/.SmartTomcat/wokspace/module/module.main/conf/Catalina/localhost/v1.xml , thanks for verifying and responding on this

yuezk commented 2 years ago

@BijBal84 Fixed in 4.3.7, please upgrade and verify. Thanks.

BijBal84 commented 2 years ago

Worked like a charm !! Thank you