You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by shwetanaik <sh...@persistent.co.in> on 2009/02/03 05:26:44 UTC

Re: problem while runnning jsp/html page on the server

hi all,


I have created dynamic web poject in which i have cxf/jaxrs api to generate
rest json output.
I am able to generate rest json output. by address
http://localhost:8080/myservice/json

In the same project under webapp i have created one simple html page, but
when i am trying to run it on server (tomcat)
http://localhost:8080/test.html, page not able to execute, it give me error
"SEVERE: .No root resource matching request path /test.html is found". I am
not able to understand why its happen to this project only where i used
above mentioned lib.
while other dynamic project working properly.
cant i run jsp/html page whitin same project where i implemeted rest
service?
plese let me know.

-- 
View this message in context: http://www.nabble.com/Altering-JSON-Output-in-a-REST-service-tp20478852p21803771.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: problem while runnning jsp/html page on the server

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi

Can you please update your CXFServlet mapping from /* to a more specific one ?
For ex :

CXFServlet : /myservice/*
jaxrs:endpoint : /*
resource class : / & method : /json
 or
resource class : /json & method : /

So the servlet container will serve the text.html itself. In meantime, we'll need to think a bit of how to redirect
if users prefer to do http://localhost:8080/myservice/text.html which will be captured by CXFServlet. We do have QueryHandlers, so I 
hope we'll be able to rely on them...

Cheers, Sergey

>
> hi all,
>
>
> I have created dynamic web poject in which i have cxf/jaxrs api to generate
> rest json output.
> I am able to generate rest json output. by address
> http://localhost:8080/myservice/json
>
> In the same project under webapp i have created one simple html page, but
> when i am trying to run it on server (tomcat)
> http://localhost:8080/test.html, page not able to execute, it give me error
> "SEVERE: .No root resource matching request path /test.html is found". I am
> not able to understand why its happen to this project only where i used
> above mentioned lib.
> while other dynamic project working properly.
> cant i run jsp/html page whitin same project where i implemeted rest
> service?
> plese let me know.
>
> -- 
> View this message in context: http://www.nabble.com/Altering-JSON-Output-in-a-REST-service-tp20478852p21803771.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>