1
votes

I want to echo application-context path after deployment on local tomcat. It might be done using maven or ant. All information I have is CATALINA_HOME variable. I tried using cargo plugin for maven, but it doesnt display context path after deployment, I also tried tomcat deploy plugin, but it requires me to specify tomcat manager path, as well as user and password.

Thank you in advance

1

1 Answers

1
votes

Implement a ServletContextListener and

final String contextPath = servletContextEvent.getServletContext().getContextPath();
System.out.println("context path = " + contextPath);