Am working on spring boot applicaiton. I want to write a jsp files dynamically into the web content. So i took the real path from the ServletContext and write into it. It is working fine in eclipse.
@autowired
ServletContext context
or
ServletContext context = request.getSession().getServletContext();
String targetPath = context.getRealPath("/default/pages");
But I try to deploy a war file on linux machine, the path is empty. Please help me to fix this or let me know if it possible to do ?
spring boot embedded tomcat