Hi Ayub,
Can you access the URI:
http://localhost:8080/CustomerDB/resources/hello3
?
I just did a quick check by modifying the SimpleServlet example and
adding a matrix parameter:
public InputStream doGet(@MatrixParam("name") String name) {
System.out.println(name);
return this.getClass().getResourceAsStream("index.html");
}
and it worked fine with or without a matrix parameter present on the URI.
What is the source code for the class whose name is the value of the
servlet init-parameter webresourceclass ?
IIRC Matrix parameters are not supported by the WADL generation.
Paul.
Ayub Khan wrote:
> Hi Paul,
>
> With 0.4ea jersey available in REST modules of NB6.0 trunk.
>
> I was trying MatrixParam annotation.
>
>
> /**
> * Retrieves representation of an instance of hello.HelloWorldResource
> * @return an instance of java.lang.String
> */
> @HttpMethod("GET")
> @ProduceMime("application/xml")
> public String getXml(@MatrixParam("name") String name) {
> return "<?xml version='1.0' encoding='UTF-8'?>\n<b>Hello
> "+name+"</b>";
> }
>
> After deploying the app, if I try the URL
> http://localhost:8080/CustomerDB/resources/hello3;name=test
> I get 404 error on the browser.
>
> Also checked the wadl, it does not have a param element
> (I was expecting this element also to have a style="matrix" attribute)
> for the resource hello3.
>
> application.wadl
> ---------------------
> ...
> <resource path="hello3">
> <method name="GET">
> <request>
> <representation/>
> </request>
> <response>
> <representation mediaType="application/xml"/>
> </response>
> </method>
> ...
> ----------------------
>
>
> Can you please provide a sample and how to test it.
>
> Thanks
> Ayub
>
> ---------------------------------------------------------------------
> 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