N
N
Nikolay Baranenko2017-08-18 12:28:22
Java
Nikolay Baranenko, 2017-08-18 12:28:22

Why, when translated into production, the call to the servlet began to return Status Code: 404 OK?

Hello.

In my web application for Apache Tomcat, the interaction between frontend and backend traditionally goes through the get web service.

while testing on Localhost everything was OK:

Request URL:http://localhost:8000/GetINFO?get_info=NAME
Request Method:GET
Status Code:200 OK


, when I transferred it to the product, an HTTP error - 404 began to return.

Request URL:http://server01/example/GetINFO?get_info=NAME
Request Method:GET
Status Code:404 OK


servlet

@WebServlet(name = "GetINFO", description = "GetINFO", urlPatterns = "/GetINFO")

public class GetHPBSMEvents extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
...
}
}

I'm addressing you like this

$.getJSON('../GetINFO?get_info=NAME', function (jsondata) {
..
        });


What is the problem and how to solve it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Baranenko, 2017-08-21
@drno-reg

after reloading Intellige IDEA and cleaning out all Java processes, the web service started working...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question