我有两个java webapp,比如MyApp和AuthEngine。 AuthEngine是一个通用的认证应用程序,可供任何其他应用程序使用。 当用户登录到MyApp时,usercredentials被发送到AuthEngine进行验证。我使用球衣客户端来调用AuthEngine的服务(不使用任何REST功能,AuthEngine使用普通的Java Servlets开发)。Http GET请求在默认端口(80)上不能在泽西岛工作
WebResource resource = null;
resource = authClient.resource("http://localhost:8080/authengine/authenticate");
queryParam = new MultivaluedMapImpl();
queryParam.add("username", username);
queryParam.add("password", password);
clientResponse = resource.queryParams(queryParam).get(ClientResponse.class);
response = clientResponse.getEntity(String.class);
一切工作正常。 MyApp从authengine调用身份验证servlet并返回状态。
但是,如果我使用80作为myapp和authengine的端口,则不是使用端口8080,而是使用端口8080来代替。
当我使用端口80时,对authEngine的身份验证请求没有被调用并导致响应中出现空值。
我试着用不同的端口号,它似乎可以在80以外的其他端口上正常工作。 有人能帮我找出这个奇怪问题的原因吗?我不知道该怎么做!!