I am still a beginner developer, so I have a lot of concepts that I do not know.
I am currently developing the web using the Spring project.
I want to separate the web and was in a project.
The user information entered in the current html is received from js and passed to a controller via ajax.
The controller then handles the logic, passes the return value, and displays it in html.
The order is the same as the processing logic, but I want to share web and was.
I want to make html, css, js file into one project, and jsp, contorller etc into another project.
The current html is in / WEB-INF / views / .. and css, js is in / WEB-INF / resources / ..
I want to make these files into another project, and pass only the results from the current project (the main logic).
But I do not know how to exchange values in different projects.
For example, when I use ajax in js, what url should I pass it to? For example, if the name of the html projecrt is test1 and the name of the other project is test2, would it be url: localhost: port / test2 / functionname?
Also, how do I return the result from test2 to test1?
Does the project need to run test1 and test2 respectively?
I do not know how to set up the project. If you know well, please help me....
Aucun commentaire:
Enregistrer un commentaire