0
votes

Requirement is to deploy application at tomcat root using maven plugin.

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
    <url>http://www.myhost.com:8080/manager</url>
    <server>tomcat6</server>
    <path>/</path>
    <contextFile>src/main/tomcatconf/context.xml</contextFile>
    <mode>context</mode>        
</configuration>

Above is deploying application at root but the problem is application using images, javascript and other pdf files (of large size) from a folder "static" which is stored outside application. c:\static\

Please suggest for configuration required in pom.xml to access images like below. http://www.myhost.com:8080/static/image.js http://www.myhost.com:8080/static/about.pdf

1

1 Answers

1
votes

You can get embedded tomcat7 plugin like this:

  <plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0</version>
  </plugin>