Spring Boot JSP 404.Whitelabel Error Page
Can't load a very simple JSP page with spring-boot, getting 404 Not Found
HmisApplication.class
@SpringBootApplication
public class HmisApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(HmisApplication.class);
}
public static void main(String args) throws Exception {
SpringApplication.run(HmisApplication.class, args);
}
}
MainController.java
@Controller
public class WelcomeController {
@RequestMapping("/")
public String home(Map<String, Object> model) {
model.put("message", "HowToDoInJava Reader !!");
return "index";
}
@RequestMapping("/next")
public String next(Map<String, Object> model) {
model.put("message", "You are in new page !!");
return "next";
}
}
application.properties
spring.profiles.active=dev,build-info
server.contextPath=/hmis
server.port=7070
spring.metrics.export.enabled=true
spring.main.banner-mode=off
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
application.message: Hello Phil
# HTTP encoding (HttpEncodingProperties)
spring.http.encoding.force-request=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
MvcConfiguration.java
@Configuration
@EnableWebMvc
@ComponentScan
public class MvcConfiguration extends WebMvcConfigurerAdapter
{
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
resolver.setViewClass(JstlView.class);
registry.viewResolver(resolver);
}
}
File Structure
├── src
├── main
│ ├── java
│ │ └── com
│ │ └── hmis
│ │ ├── HmisApplication.java
│ │ ├── MvcConfiguration.java
│ │ ├── WelcomeController.java
│ └── resources
│ └── application.properties
│ └── webapp
│ └── WEB-INF
│ └── jsp
│ └── index.jsp
│ └── next.jsp
jsp spring-boot http-status-code-404
add a comment |
Can't load a very simple JSP page with spring-boot, getting 404 Not Found
HmisApplication.class
@SpringBootApplication
public class HmisApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(HmisApplication.class);
}
public static void main(String args) throws Exception {
SpringApplication.run(HmisApplication.class, args);
}
}
MainController.java
@Controller
public class WelcomeController {
@RequestMapping("/")
public String home(Map<String, Object> model) {
model.put("message", "HowToDoInJava Reader !!");
return "index";
}
@RequestMapping("/next")
public String next(Map<String, Object> model) {
model.put("message", "You are in new page !!");
return "next";
}
}
application.properties
spring.profiles.active=dev,build-info
server.contextPath=/hmis
server.port=7070
spring.metrics.export.enabled=true
spring.main.banner-mode=off
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
application.message: Hello Phil
# HTTP encoding (HttpEncodingProperties)
spring.http.encoding.force-request=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
MvcConfiguration.java
@Configuration
@EnableWebMvc
@ComponentScan
public class MvcConfiguration extends WebMvcConfigurerAdapter
{
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
resolver.setViewClass(JstlView.class);
registry.viewResolver(resolver);
}
}
File Structure
├── src
├── main
│ ├── java
│ │ └── com
│ │ └── hmis
│ │ ├── HmisApplication.java
│ │ ├── MvcConfiguration.java
│ │ ├── WelcomeController.java
│ └── resources
│ └── application.properties
│ └── webapp
│ └── WEB-INF
│ └── jsp
│ └── index.jsp
│ └── next.jsp
jsp spring-boot http-status-code-404
spring boot already provides InternalResourceViewResolver resolver. please try removing MvcConfiguration class completely.
– Gurkan Yesilyurt
May 8 '17 at 17:46
I get this error message There was an unexpected error (type=Internal Server Error, status=500). Could not resolve view with name 'next' in servlet with name 'dispatcherServlet'
– Майкл Маммедов
May 9 '17 at 14:32
1
move webapp folder to src/main/webapp, not under resources folder.
– Gurkan Yesilyurt
May 9 '17 at 15:46
It does not help
– Майкл Маммедов
May 10 '17 at 12:16
add a comment |
Can't load a very simple JSP page with spring-boot, getting 404 Not Found
HmisApplication.class
@SpringBootApplication
public class HmisApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(HmisApplication.class);
}
public static void main(String args) throws Exception {
SpringApplication.run(HmisApplication.class, args);
}
}
MainController.java
@Controller
public class WelcomeController {
@RequestMapping("/")
public String home(Map<String, Object> model) {
model.put("message", "HowToDoInJava Reader !!");
return "index";
}
@RequestMapping("/next")
public String next(Map<String, Object> model) {
model.put("message", "You are in new page !!");
return "next";
}
}
application.properties
spring.profiles.active=dev,build-info
server.contextPath=/hmis
server.port=7070
spring.metrics.export.enabled=true
spring.main.banner-mode=off
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
application.message: Hello Phil
# HTTP encoding (HttpEncodingProperties)
spring.http.encoding.force-request=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
MvcConfiguration.java
@Configuration
@EnableWebMvc
@ComponentScan
public class MvcConfiguration extends WebMvcConfigurerAdapter
{
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
resolver.setViewClass(JstlView.class);
registry.viewResolver(resolver);
}
}
File Structure
├── src
├── main
│ ├── java
│ │ └── com
│ │ └── hmis
│ │ ├── HmisApplication.java
│ │ ├── MvcConfiguration.java
│ │ ├── WelcomeController.java
│ └── resources
│ └── application.properties
│ └── webapp
│ └── WEB-INF
│ └── jsp
│ └── index.jsp
│ └── next.jsp
jsp spring-boot http-status-code-404
Can't load a very simple JSP page with spring-boot, getting 404 Not Found
HmisApplication.class
@SpringBootApplication
public class HmisApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(HmisApplication.class);
}
public static void main(String args) throws Exception {
SpringApplication.run(HmisApplication.class, args);
}
}
MainController.java
@Controller
public class WelcomeController {
@RequestMapping("/")
public String home(Map<String, Object> model) {
model.put("message", "HowToDoInJava Reader !!");
return "index";
}
@RequestMapping("/next")
public String next(Map<String, Object> model) {
model.put("message", "You are in new page !!");
return "next";
}
}
application.properties
spring.profiles.active=dev,build-info
server.contextPath=/hmis
server.port=7070
spring.metrics.export.enabled=true
spring.main.banner-mode=off
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
application.message: Hello Phil
# HTTP encoding (HttpEncodingProperties)
spring.http.encoding.force-request=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
MvcConfiguration.java
@Configuration
@EnableWebMvc
@ComponentScan
public class MvcConfiguration extends WebMvcConfigurerAdapter
{
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
resolver.setViewClass(JstlView.class);
registry.viewResolver(resolver);
}
}
File Structure
├── src
├── main
│ ├── java
│ │ └── com
│ │ └── hmis
│ │ ├── HmisApplication.java
│ │ ├── MvcConfiguration.java
│ │ ├── WelcomeController.java
│ └── resources
│ └── application.properties
│ └── webapp
│ └── WEB-INF
│ └── jsp
│ └── index.jsp
│ └── next.jsp
jsp spring-boot http-status-code-404
jsp spring-boot http-status-code-404
asked May 8 '17 at 12:39
Майкл МаммедовМайкл Маммедов
3114
3114
spring boot already provides InternalResourceViewResolver resolver. please try removing MvcConfiguration class completely.
– Gurkan Yesilyurt
May 8 '17 at 17:46
I get this error message There was an unexpected error (type=Internal Server Error, status=500). Could not resolve view with name 'next' in servlet with name 'dispatcherServlet'
– Майкл Маммедов
May 9 '17 at 14:32
1
move webapp folder to src/main/webapp, not under resources folder.
– Gurkan Yesilyurt
May 9 '17 at 15:46
It does not help
– Майкл Маммедов
May 10 '17 at 12:16
add a comment |
spring boot already provides InternalResourceViewResolver resolver. please try removing MvcConfiguration class completely.
– Gurkan Yesilyurt
May 8 '17 at 17:46
I get this error message There was an unexpected error (type=Internal Server Error, status=500). Could not resolve view with name 'next' in servlet with name 'dispatcherServlet'
– Майкл Маммедов
May 9 '17 at 14:32
1
move webapp folder to src/main/webapp, not under resources folder.
– Gurkan Yesilyurt
May 9 '17 at 15:46
It does not help
– Майкл Маммедов
May 10 '17 at 12:16
spring boot already provides InternalResourceViewResolver resolver. please try removing MvcConfiguration class completely.
– Gurkan Yesilyurt
May 8 '17 at 17:46
spring boot already provides InternalResourceViewResolver resolver. please try removing MvcConfiguration class completely.
– Gurkan Yesilyurt
May 8 '17 at 17:46
I get this error message There was an unexpected error (type=Internal Server Error, status=500). Could not resolve view with name 'next' in servlet with name 'dispatcherServlet'
– Майкл Маммедов
May 9 '17 at 14:32
I get this error message There was an unexpected error (type=Internal Server Error, status=500). Could not resolve view with name 'next' in servlet with name 'dispatcherServlet'
– Майкл Маммедов
May 9 '17 at 14:32
1
1
move webapp folder to src/main/webapp, not under resources folder.
– Gurkan Yesilyurt
May 9 '17 at 15:46
move webapp folder to src/main/webapp, not under resources folder.
– Gurkan Yesilyurt
May 9 '17 at 15:46
It does not help
– Майкл Маммедов
May 10 '17 at 12:16
It does not help
– Майкл Маммедов
May 10 '17 at 12:16
add a comment |
1 Answer
1
active
oldest
votes
I solved problem after some changing pom.xml
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
1
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43847924%2fspring-boot-jsp-404-whitelabel-error-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I solved problem after some changing pom.xml
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
1
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
add a comment |
I solved problem after some changing pom.xml
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
1
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
add a comment |
I solved problem after some changing pom.xml
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
I solved problem after some changing pom.xml
<groupId>com.hmis</groupId>
<artifactId>hmis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hmis</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Tomcat Embed -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- To compile JSP files -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
answered May 18 '17 at 12:59
Майкл МаммедовМайкл Маммедов
3114
3114
1
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
add a comment |
1
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
1
1
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
Thanks, dude! Saved my day. For others: here <scope>provided</scope> for "tomcat-embed-jasper" is commented.
– nikiforovpizza
Jun 22 '18 at 0:07
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43847924%2fspring-boot-jsp-404-whitelabel-error-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
spring boot already provides InternalResourceViewResolver resolver. please try removing MvcConfiguration class completely.
– Gurkan Yesilyurt
May 8 '17 at 17:46
I get this error message There was an unexpected error (type=Internal Server Error, status=500). Could not resolve view with name 'next' in servlet with name 'dispatcherServlet'
– Майкл Маммедов
May 9 '17 at 14:32
1
move webapp folder to src/main/webapp, not under resources folder.
– Gurkan Yesilyurt
May 9 '17 at 15:46
It does not help
– Майкл Маммедов
May 10 '17 at 12:16