I forgot you said you had some static content; in that case, but only if you
choose, to have a "/*" servlet pattern, you should configure a static
content redirection for the default servlet (the one which usually serves
the static content) to handle it, see

http://cxf.apache.org/docs/servlet-transport.html

use redirects-list (space separated list of regexps, ex, */(\w)+.html*) and
redirect-servlet-name (should be 'default')
Cheers, Sergey
On Mon, Apr 18, 2011 at 4:01 PM, Benson Margulies <[email protected]>wrote:

> Sergey,
>
> I'm not a great web.xml expert. Will my static pages still work?
>
> On Mon, Apr 18, 2011 at 3:15 AM, Sergey Beryozkin <[email protected]>
> wrote:
> > Hi Benson, Dennis
> >
> > On Sun, Apr 17, 2011 at 12:41 PM, Benson Margulies <
> [email protected]>wrote:
> >
> >> Dennis,
> >>
> >> As I tried to explain, the whole business works fine if I use URLs of
> the
> >> form:
> >>
> >> http://thehost/theservlet/services/services/theservice/themethod
> >>
> >
> > There's no need to have "/services/services" in URIs, just have a "/*"
> > servlet pattern and a jaxrs:server "/services" or
> > "/services" and "/" - but in this latter case CXFServlet needs to be
> > configured with the "service-list-path" parameter such as "/theservices",
> > etc, so
> >
> > http://thehost/theservlet/theservices
> >
> > will give you the list of services.
> >
> > Cheers, Sergey
> >
> >>
> >> I just found it esthetically annoying :-)
> >>
> >> --benson
> >>
> >>
> >> On Sat, Apr 16, 2011 at 8:58 PM, Dennis Sosnoski <[email protected]>
> wrote:
> >> > If you have static content I'd think you'd need a real path for the
> >> > servlet, not just /*. But using your servlet mapping /services/* did
> you
> >> > try browsing to http://localhost/webapp/services/services? My point
> was
> >> > that I'd found I needed the extra "/services" in the URL to get the
> >> > service config page, and I thought it might be the same in your setup.
> >> >
> >> >  - Dennis
> >> >
> >> >
> >> > On 04/17/2011 11:15 AM, Benson Margulies wrote:
> >> >> Dennis,
> >> >>
> >> >> All works fine if I configure address="/services" and go there.
> >> >>
> >> >> Since I have some static content, I'm a bit leary of /*, but should I
> >> be?
> >> >>
> >> >>
> >> >>
> >> >> On Sat, Apr 16, 2011 at 5:46 PM, Dennis Sosnoski <[email protected]>
> >> wrote:
> >> >>> Try browsing to /services/services. I use
> <url-pattern>/*<url-pattern>
> >> >>> with 2.3.3 to have the REST service accessed at
> >> >>> http://host:port/war-name and find the services page shows up at
> >> >>> http://host:port/war-name/services
> >> >>>
> >> >>>  - Dennis
> >> >>>
> >> >>> Dennis M. Sosnoski
> >> >>> Java SOA and Web Services Consulting <
> >> http://www.sosnoski.com/consult.html>
> >> >>> Axis2/CXF/Metro SOA and Web Services Training
> >> >>> <http://www.sosnoski.com/training.html>
> >> >>> Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>
> >> >>>
> >> >>>
> >> >>> On 04/17/2011 09:02 AM, Benson Margulies wrote:
> >> >>>> I configure my servlet mapping for '/services/*'.
> >> >>>>
> >> >>>> I then give a jaxrs:server an address='/'.
> >> >>>>
> >> >>>> So, I figure, since each of my service classes has an @Path, I'll
> >> >>>> still get the CXF service listing at
> http://localhost/webapp/services
> >> .
> >> >>>> No Such Luck. Services work, but no service config page.
> >> >>>>
> >> >>>> Is this a reasonable thing to expect, or have I shaded it out?
> >> >>>>
> >> >
> >>
> >
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com/>
http://sberyozkin.blogspot.com

Reply via email to