Reputation: 11
I am trying to make some changes on a Spring project with JBoss EAP 7.3 server runtime. I got this project from a workmate's git repository, including the JBoss directory with its particular configuration, and he hasn't had any trouble with it when running or modifying it.
Inside the jboss-eap-7.3/standalone/deployments directory, I have the following files:
The content of ProjectQA.war directory is the exact same at the project's WebContent directory.
NOTE: if I erase the content of this directory and rely on the auto deploy, it instead creates two directories named Project.war and ProjectQA_V2, with their respective .dodeploy files, but when running the server it is unable to deploy them
So, if I make some changes in the front end, only after manually copying the respective .jsp to the corresponding location inside the jboss directory, the change is reflected when accessing the web page, but this does not happen when making changes to my backend Java code, although it still comunicates with a previous version of the backend code (I asume). Here goes an example:
Controller.java before edited:
@RequestMapping("/myEndpoint")
public ModelAndView endpoint(HttpServletRequest request, HttpServletResponse response) {
request.setAttribute("testData1", "hello");
return new ModelAndView("myView");
}
myView.jsp before edited:
DATA 1: <input type="text" value="${testData1}">
http://localhost:8080/ProjectQA/myEndpoint when the server is up:
DATA 1: <input type="text" value="hello">
So far so good, but when adding new lines to my code is when errors come in. Controller.java after edited:
@RequestMapping("/myEndpoint")
public ModelAndView endpoint(HttpServletRequest request, HttpServletResponse response) {
request.setAttribute("testData1", "hello");
request.setAttribute("testData2", "goodbye");
return new ModelAndView("myView");
}
myView.jsp before edited:
DATA 1: <input type="text" value="${testData1}">
DATA 2: <input type="text" value="${testData2}">
http://localhost:8080/ProjectQA/myEndpoint when the server is up (after edited):
DATA 1: <input type="text" value="hello">
DATA 2: <input type="text" value>
As you can see I am new to JBoss and don't know quite well how it works, and I haven't found precise and detailed information on its documentation or the internet. I would appreciate if someone could help me solving this issue and explaining the work schema of JBoss. I know the web content is read from ProjectQA.war, but where is the backend read from? And how to modify it? Thank you.
Upvotes: 0
Views: 233
Reputation: 3547
You need to redeploy your application for the new Java code to be taken into account. Either rely on your IDE, maven plugin or jboss-cli to do that.
Upvotes: 1