I have been using this "ServletContext.getRealPath("")" till Tomcat8 and I got the return string path ending with a slash.
For Example ServletContext.getRealPath("")+"resources" will return /home/company/eclipse_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Project_Title/resources
But when I tried with Tomcat 9.0 I got path without a slash
For Example ServletContext.getRealPath("")+"resources" will return /home/company/eclipse_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Project_Titleresources
Slash after 'Project_Title' is missing. This exception only occurs after deployment(.WAR). There is no issue in local.
Hope somebody can help me.
Thank you.