Closed cheng6563 closed 2 years ago
@cheng6563 Thanks for your feedback. Currently, it works well for me with Tomcat 9. I'm going to check it with Tomcat 7.
@cheng6563 Still couldn't reproduce it with Tomcat 7.0.85. Can you try the following steps to see if it is still reproducible with 4.3.5?
.SmartTomcat
folder. For Windows: C:\Users\<user>\.SmartTomcat
, and for macOS/Linux: ~/.SmartTomcat
If possible, please provide a demo project. Thanks.
@yuezk Thanks for your feedback. In fact, 4.3.4 also has this problem. I don't know why the project started successfully when switching to 4.3.4 during the test. :(
The problem seems to be that the Context path cannot be set to /
, as long as it is not set to /
it starts successfully.
When I debug, I found the following code in tomcat, contextPath
will be spliced with /
to become //
, causing problems
//org.apache.naming.resources.DirContextURLConnection
if (contextPath != null) {
if (!this.path.startsWith(contextPath + "/")) {
return;
}
this.path = this.path.substring(contextPath.length());
}
Can Context path be set to empty?
@cheng6563 There is a workaround for this. Setting the context path to /ROOT
. Then after Tomcat starts, you can visit it at http://localhost:8080/
I will add support for the empty context path later.
Fixed in 4.3.6
Describe the bug 4.3.5 open any jsp page error.
error stack:
I am downgurade to 4.3.4 no this error.
Screenshots If applicable, add screenshots to help explain your problem.
Intellij & SmartTomcat Version (Help -> About copy & paste below) IntelliJ IDEA 2022.2.2 (Community Edition) #IC-222.4167.29
SmartTomcat 4.3.5 apache-tomcat-7.0.85