tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl K." <>
Subject REST issue
Date Tue, 13 Jun 2017 10:18:58 GMT
Some foundation facts:

Development environment using NetBeans 8.0.2, Tomcat 8.0.32, Java
jdk1.8.0_121 and Postman.

The code:

I have a simple hello world servlet for testing (in production, the
service will serve as an endpoint for information from another

package com.tsr.webservices;

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import org.json.JSONObject;

   * @author Carl
@WebService(serviceName = "helloWorld")
public class AnoviaWebService {

       * Retrieves representation of an instance of helloWorld.HelloWorld
       * @return an instance of java.lang.String
      public String getHtml() {
          return "<html><body><h1>Hello, World!!</body></h1></html>";

The web.xml contains these fragments:






Tomcat starts properly with no errors.  Using Postman with either


the first request after a rebuild/redeploy (we use a request filter and
I can see the request hitting the filter) returns a 200 OK but the jsp
that is displayed is the jsp that is displayed when the request failed
to pass the filter requirements.  Subsequent requests return a 404, not
found error and I can see the request never hits the filter after that
first request.

Additional notes.

1.  I am attempting to add this service to an existing application that
is quite large because, at some time in the not too distant future, the
entire application will be changed to run as a sevice so the client and
server sides can be decoupled.

2.  I have successfully created/deployed/run a REST service using the
NetBeans templates but it has no web.xml and uses the
'ApplicationConfig' process to expose the service.

If anyone has any ideas, I would certainly appreciate them.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message