I want when my page such as index.jsp
loading(calling get method) send data for index.jsp
page such as title. I checked this question but this question solution(How to call servlet on jsp page load) has error in my web application.
This my index.jsp
page code(I want send title from changeTitle.java
class):
<title><c:import url="/sysAdmin/changeTitle.java" />
<c:out value="${message }"></c:out></title>
This my changeTitle.java
class get method:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setAttribute("message", "hello");
}
And I don't know how addressing to class in index.jsp
of my project and bellow is my project directories: