How can i get tomcat base folder path programmatically ?

I need to get the tomcat base path to access my compiled JSP files. Is there any way get the path programmatically ?

Thanks,

-mify

0
正式评论

Hello, 

I am not sure what exactly are you trying to achieve, but the standard way to find the base folders seems to be by using `System.getProperty("catalina.base")` or `System.getProperty("catalina.home")`. 

AFAIU, neither of them will help in accessing compiled JSP files. 

If you want to compile the JSP in advance or tweak the compilation process, you may find useful the documentation for JspC maven plugin 

Hope it helps, 

Regards, 

Michael 

请先登录再写评论。