You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by sunnydyal <su...@gmail.com> on 2012/07/12 13:30:25 UTC

Available RESTful services --> UI

Is there any way to customize UI of "Available RESTful services" page?
I am sorry if this is repeated question. Have a look at attached file.
 
http://cxf.547215.n5.nabble.com/file/n5710956/46.png 

--
View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Available RESTful services --> UI

Posted by sunnydyal <su...@gmail.com>.
Thank you very much Sergey. Its working. 

--
View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711063.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Available RESTful services --> UI

Posted by Sergey Beryozkin <sb...@gmail.com>.
Redirecting the users list,

On 13/07/12 16:15, sunnydyal wrote:
> OK. style-sheet exists in my root directory. Still not picking up stylesheet.
>
> Servlet controller produce a warning.
>
> Here Html Source:
> <HEAD>
> <LINK type="text/css" rel="stylesheet" href="/myapp/servicelist.css">
> <meta http-equiv=content-type content="text/html; charset=UTF-8">
> <title>CXF - Service list</title>
> </head>
>
> WARN : org.apache.cxf.transport.servlet.ServletController - Can't find the
> the request for http://localhost:8080/myapp/servicelist.css's Observer
>

This is because your CXFServlet is most likely listening on "/*" so it 
is asked to handle this URI. Can you restrict it to say "/services/*" or 
similar, this would let a default servlet to read this file ? If you 
prefer "/*" then consider configuring a "static-resources-list" CXF 
parameter, see DefaultCXFServlet:

http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_dispatch/WEB-INF/web.xml

Sergey



>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711058.html
> Sent from the cxf-dev mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: Available RESTful services --> UI

Posted by Sergey Beryozkin <sb...@gmail.com>.
Redirecting the users list,

On 13/07/12 16:15, sunnydyal wrote:
> OK. style-sheet exists in my root directory. Still not picking up stylesheet.
>
> Servlet controller produce a warning.
>
> Here Html Source:
> <HEAD>
> <LINK type="text/css" rel="stylesheet" href="/myapp/servicelist.css">
> <meta http-equiv=content-type content="text/html; charset=UTF-8">
> <title>CXF - Service list</title>
> </head>
>
> WARN : org.apache.cxf.transport.servlet.ServletController - Can't find the
> the request for http://localhost:8080/myapp/servicelist.css's Observer
>

This is because your CXFServlet is most likely listening on "/*" so it 
is asked to handle this URI. Can you restrict it to say "/services/*" or 
similar, this would let a default servlet to read this file ? If you 
prefer "/*" then consider configuring a "static-resources-list" CXF 
parameter, see DefaultCXFServlet:

http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_dispatch/WEB-INF/web.xml

Sergey



>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711058.html
> Sent from the cxf-dev mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: Available RESTful services --> UI

Posted by sunnydyal <su...@gmail.com>.
OK. style-sheet exists in my root directory. Still not picking up stylesheet.

Servlet controller produce a warning.

Here Html Source:
<HEAD>
<LINK type="text/css" rel="stylesheet" href="/myapp/servicelist.css">
<meta http-equiv=content-type content="text/html; charset=UTF-8">
<title>CXF - Service list</title>
</head>

WARN : org.apache.cxf.transport.servlet.ServletController - Can't find the
the request for http://localhost:8080/myapp/servicelist.css's Observer



--
View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711058.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Available RESTful services --> UI

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 13/07/12 07:06, sunnydyal wrote:
> Thanks Daniel. I have used required parameter but It is not picking style
> sheet. Where do I have to put .css file?
>
> <init-param>
> 	<param-name>service-list-stylesheet</param-name>
> 	<param-value>servicelist.css</param-value>
> </init-param>
>

it has to be available in the root of the web application, or in some 
subdirectory, example,
<param-value>css/servicelist.css</param-value>

where 'css' is a directory within a given web application.

Can you view the source of the returned HTML page in the browser and 
check what the processing instruction links too ?

Sergey

> --
> View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711037.html
> Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Available RESTful services --> UI

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 13/07/12 07:06, sunnydyal wrote:
> Thanks Daniel. I have used required parameter but It is not picking style
> sheet. Where do I have to put .css file?
>
> <init-param>
> 	<param-name>service-list-stylesheet</param-name>
> 	<param-value>servicelist.css</param-value>
> </init-param>
>

it has to be available in the root of the web application, or in some 
subdirectory, example,
<param-value>css/servicelist.css</param-value>

where 'css' is a directory within a given web application.

Can you view the source of the returned HTML page in the browser and 
check what the processing instruction links too ?

Sergey

> --
> View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711037.html
> Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Available RESTful services --> UI

Posted by sunnydyal <su...@gmail.com>.
Thanks Daniel. I have used required parameter but It is not picking style
sheet. Where do I have to put .css file?

<init-param>
	<param-name>service-list-stylesheet</param-name>
	<param-value>servicelist.css</param-value>
</init-param>

--
View this message in context: http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956p5711037.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Available RESTful services --> UI

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday, July 12, 2012 04:30:25 AM sunnydyal wrote:
> Is there any way to customize UI of "Available RESTful services" page?
> I am sorry if this is repeated question. Have a look at attached file.

I think that on the CXF servlet, you can configure a param of:

service-list-stylesheet

to the location of a stylesheet that is used.

Dan




> 
> http://cxf.547215.n5.nabble.com/file/n5710956/46.png
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Available-RESTful-services-UI-tp5710956.h
> tml Sent from the cxf-dev mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com