Tomcat 8 is not scanning apache tiles TLD file inside the jar

503 views Asked by At

I'm setting up the spring webmvc project using spring boot 2.0.0 version. If i run the application inside the embedded tomcat, it runs fine. I tried deploying it in external standalone tomcat-8 server, it is working fine over there too. But i if package the war and deploy it in the tomcat-8 server configured within eclipse, then it throws below exception.

The absolute uri: http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml

I included the dependency in the pom file as below.

<dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-jsp</artifactId>
            <version>3.0.4</version>
</dependency>

I ensured that the tiles-jsp jar is present inside the WEB-INF/lib folder. But still its failing as it is not able to scan the jar for TLD. I tried changing the catalina.properties to include tiles-jsp*.jar. But it is still failing.

Please help me to fix this error.

2

There are 2 answers

1
desoss On

Does your IDE automatically import dependencies?

Try cleaning your maven dependencies. Maven clean.

Or try the more brutal command dependency:purge-local-repository.

By the way notice that there's a newer version of your dependency 3.0.8 of 2017. The one that you are trying to use, the 3.0.4, is of 2014.

0
Full stack Dev On

For me, war file when deployed works perfect. Had an issue where, when I run it under tomcat from inside IDE(Eclipse/STS), it threw error. Maven clean really helped, no other change needed. MAven clean-->build--> restart eclipse/sts tomcat. it works like a charm. Answer by desoss prompted me to perform maven clean. Thanks @desoss.