Home > Net >  how to get current module path instead of parent module in Java
how to get current module path instead of parent module in Java

Time:02-10

I have a project structure like the below:

enter image description here

I want to get the path of web-servlet-embedded to set tomcat. by when I use new File("src/main/webapp").getAbsolutePath(); I get the path of parent JavaTutorial which result like picture show. How do I get the path of web-servlet-embedded instead of JavaTutorial?

Thanks :)

CodePudding user response:

  •  Tags:  
  • Related