maven - Apache Tiles with Gradle not working in spring boot -


i have been trying create sample application having apache tiles gradle in spring boot. getting below error @ runtime

2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.w.s.h.beannameurlhandlermapping - no handler mapping found [/web-inf/view/layout/main.jsp] 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.web.servlet.dispatcherservlet - testing handler map [org.springframework.web.servlet.handler.simpleurlhandlermapping@5f84d53b] in dispatcherservlet name 'dispatcherservlet' 2017-08-29 22:58:08 [http-nio-8080-exec-3] debug o.s.w.s.h.simpleurlhandlermapping - matching patterns request [/web-inf/view/layout/main.jsp] [/**] 2017-08-29 22:58:08 [http-nio-8080-exec-3] debug o.s.w.s.h.simpleurlhandlermapping - uri template variables request [/web-inf/view/layout/main.jsp] {} 2017-08-29 22:58:08 [http-nio-8080-exec-3] debug o.s.w.s.h.simpleurlhandlermapping - mapping [/web-inf/view/layout/main.jsp] handlerexecutionchain handler [resourcehttprequesthandler [locations=[servletcontext resource [/], class path resource [meta-inf/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.pathresourceresolver@51abf713]]] , 1 interceptor 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.web.servlet.dispatcherservlet - testing handler adapter [org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter@5c48030d] 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.web.servlet.dispatcherservlet - testing handler adapter [org.springframework.web.servlet.mvc.httprequesthandleradapter@47949c09] 2017-08-29 22:58:08 [http-nio-8080-exec-3] debug o.s.web.servlet.dispatcherservlet - last-modified value [/web-inf/view/layout/main.jsp] is: -1 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.w.s.r.resourcehttprequesthandler - applying "invalid path" checks path: web-inf/view/layout/main.jsp 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.w.s.r.resourcehttprequesthandler - path contains "web-inf" or "meta-inf". 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.w.s.r.resourcehttprequesthandler - ignoring invalid resource path [web-inf/view/layout/main.jsp] 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.w.s.r.resourcehttprequesthandler - no matching resource found - returning 404 2017-08-29 22:58:08 [http-nio-8080-exec-3] debug o.s.web.servlet.dispatcherservlet - null modelandview returned dispatcherservlet name 'dispatcherservlet': assuming handleradapter completed request handling 2017-08-29 22:58:08 [http-nio-8080-exec-3] trace o.s.web.servlet.dispatcherservlet - cleared thread-bound request context: org.apache.catalina.core.applicationhttprequest@6a0b5a41 2017-08-29 22:58:08 [http-nio-8080-exec-3] debug o.s.web.servlet.dispatcherservlet - completed request 

it has been working fine if replace gradle project maven. have created both gradle & maven build scripts. may find sample project @ this location. think issue gradle's provided scope.

build.gradle file, not working somehow

// apply java-library plugin add support java library apply plugin: 'java' apply plugin: 'war' apply plugin: 'eclipse'   configurations {     provided }    // in section declare find dependencies of project repositories {     // use jcenter resolving dependencies.     // can declare maven/ivy/file repository here.     mavencentral() }     dependencies {     // dependency exported consumers, found on compile classpath.      compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '1.5.2.release'     compile group: 'org.apache.tiles', name: 'tiles-jsp', version: '3.0.7'     provided group: 'javax.servlet', name: 'jstl', version: '1.2'     //compile group: 'org.apache.tiles', name: 'tiles-jsp', version: '3.0.7'     provided 'org.springframework.boot:spring-boot-starter-tomcat:1.5.2.release'     provided 'org.apache.tomcat.embed:tomcat-embed-jasper'    }  sourcesets {     main.compileclasspath += configurations.provided     //test.compileclasspath += configurations.provided     //test.runtimeclasspath += configurations.provided }  eclipse.classpath.plusconfigurations += [configurations.provided]   

working pom.xml

<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelversion>4.0.0</modelversion>      <parent>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-parent</artifactid>         <version>1.5.2.release</version>     </parent>      <version>1.0</version>     <packaging>war</packaging>      <name>spring-boot-web-mvc</name>     <description>         configure spring boot starter project web mvc war file, still self executing.     </description>      <properties>         <project.build.sourceencoding>utf-8</project.build.sourceencoding>         <start-class>com.mvmlabs.springboot.application</start-class>         <java.version>1.7</java.version>         <main.basedir>${basedir}/../..</main.basedir>         <m2eclipse.wtp.contextroot>/</m2eclipse.wtp.contextroot>     </properties>      <dependencies>         <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-web</artifactid>         </dependency>         <dependency>             <groupid>javax.servlet</groupid>             <artifactid>jstl</artifactid>         </dependency>          <!-- added allow configuration web mvc, built war file (still              executable) -->         <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-tomcat</artifactid>             <scope>provided</scope>         </dependency>         <dependency>             <groupid>org.apache.tomcat.embed</groupid>             <artifactid>tomcat-embed-jasper</artifactid>             <scope>provided</scope>         </dependency>          <!-- add apache tiles mix -->         <dependency>             <groupid>org.apache.tiles</groupid>             <artifactid>tiles-jsp</artifactid>             <version>3.0.4</version>         </dependency>           <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-test</artifactid>             <scope>test</scope>         </dependency>      </dependencies>      <build>         <plugins>             <plugin>                 <groupid>org.springframework.boot</groupid>                 <artifactid>spring-boot-maven-plugin</artifactid>             </plugin>         </plugins>     </build>      <groupid>idp</groupid>     <artifactid>com.proginators.idp</artifactid> </project> 

any or suggesting highly appreciated.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -