Hi Alberto,
While we do not formally test releases with Tomcat it should work (and i
often play around with Tomcat). I did a quick test with Tomcat v. 6.0.14
(as shipped with NB 6.0) and Jersey 0.6 with the class you provided and
it worked fine. The log output you sent looks fine, the UserResource is
found (and you are correct to ignore the warnings).
What version of Tomcat are you using? Can you send the complete web.xml?
What happens if you use 'curl' instead of the browser:
curl -v
http://localhost:8080/jersey/resources/user
what is the output form the curl command?
Paul.
alberto wrote:
> I am trying a very simple example under Tomca6:
>
> @Path("/user")
> public class UserResource {
> public UserResource() {
>
> }
> @GET
> @ProduceMime("text/plain")
> public String getUser() {
> String id = "3";
> return "<html><body>User: alberto with id " + id + "</body></html>";
> }
>
> }
>
> When I hit http://localhost:8080/jersey/resources/user I get a blank
> page. Tomcat logger is only warning about some missing providers (that I
> am not using anyway).
> Jersey logger is looks ok:
>
> 30-mar-2008 17.50.47 com.sun.ws.rest.api.core.ClasspathResourceConfig init
> INFO: Scanning for root resource and provider classes in the paths:
> /usr/local/tomcat/webapps/prova-jsersey/WEB-INF/lib
> /usr/local/tomcat/webapps/prova-jsersey/WEB-INF/classes
> 30-mar-2008 17.50.47 com.sun.ws.rest.api.core.ClasspathResourceConfig init
> INFO: Root resource classes found:
> class jserseyprova.UserResource
> 30-mar-2008 17.50.47 com.sun.ws.rest.api.core.ClasspathResourceConfig init
> INFO: Provider classes found:
> class com.sun.ws.rest.impl.container.servlet.JSPTemplateProcessor
>
>
> The jersey servlet is poiting to /resources/*.
>
> Maybe Tomcat is not supported by Jersey 0.6?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109