I am currently in the process of integrating views into my JSP files for my Spring MVC application. I have set up a very basic configuration, but I am encountering an issue where the message displayed from the 'msg' attribute in the data object appears as {{ msg }} instead of the intended message.
header.jsp:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8>
<title>Insert title here</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="./css/main.css" rel="stylesheet"/>
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./js/main.js"></script>
</head>
<body>
<div id="app">
<div class="container">
index.jsp:
<%@include file = "header.jsp" %>
<div class="jumbotron">
<h1>This is an example</h1>
{{ msg }}
</div>
<a href="./reviews">reviews</a>
<a href="./hotel_requests">hotel requests</a>
<%@include file = "footer.jsp" %>
footer.jsp:
</div>
</div>
</body>
</html>
main.js:
let app = new Vue({
el:'#app',
data:{
msg:'Hello Vue!'
}
})
I am currently seeking help for this issue with my Spring MVC application. I have been researching online for potential solutions, but have not found any that apply to my specific scenario. I am utilizing Apache Tomcat version 9, in case that information is relevant to the problem at hand.