Answer the question
In order to leave comments, you need to log in
JavaServlets how best to return an HTML page?
Good time of the day.
There is a service (at 127.0.0.1:8080/test).
I have several resources that process requests at different addresses (127.0.0.1:8080/test/page1, 127.0.0.1:8080/test/page2 ...).
I want each resource to return HTML (the skeleton for HTML is stored in a file, the script skeleton from another file and the script depending on the user's status are appended to it).
What is the best way to organize such a structure?
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then you have JavaServlets - one with the address 127.0.0.1:8080/test/page1 and the other 127.0.0.1:8080/test/page2 , you want to return an HTML page on request. The servlet has standard request and response.
By request, you define parameters from the client, and in response, write a response to the client, including HTML. A simple example is here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question