Is there a way to retrieve the absolute path of url (http://localhost:8080/myApp) in java. The scenario is, i need to connect to csv file located in tomcat server. The statement works well if I enter the absolute path, but is there a solution to retrieve url's path using getAbsolutePath().Sorry if I'm wrong.
Connection conn = DriverManager(getConnection("jdbc:relique:csv:/home/apache-tomcat-6.0.26/webapps/myApp/"))
Thanks in advance.
以上就是Get Absolute path of a url in java的详细内容，更多请关注web前端其它相关文章！