Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C4E091861C for ; Wed, 29 Apr 2015 11:27:56 +0000 (UTC) Received: (qmail 9167 invoked by uid 500); 29 Apr 2015 11:27:56 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 9095 invoked by uid 500); 29 Apr 2015 11:27:56 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 9083 invoked by uid 99); 29 Apr 2015 11:27:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2015 11:27:55 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for users@cxf.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2015 11:27:50 +0000 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 1F78C2840B for ; Wed, 29 Apr 2015 11:22:04 +0000 (UTC) Received: by wicmx19 with SMTP id mx19so128686123wic.1 for ; Wed, 29 Apr 2015 04:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yTPV3yE+k43TUFK8ZetvDKiQGsJRGX2ggjNmwOD4G+k=; b=sFzIDmyMZnEkRlzUWIt7/QrPjCOowbJbTdjYXHrsV1pPDelfyZD1PKgpr0LTuvlDIr V0Xlxv5JZgUp/KbAMrIlu9M5EW2OjaTGE2MF2hRmvXRgAfoD8Pt1d4dvuwjK6x0xIrQR mv4+2y45H47vUP4c3ptgZG8BHh92xnHLaknVpJoQGhszOQ4CYvpe/6gQc/zrhOUhFZSs 6d/pnl6VeZHZ1lZ32kei61uUuixjVNLDC7mbkRIEtWSEh8DiWXL1cVdOqeJfjLfbui9s ajbjKBGGlxebSr75X9zAJ674HRvoZNRPvbZZk+BuVHO9fRuj8A8YBL9Mtx2jwC5CNv9S duYQ== X-Received: by 10.194.192.104 with SMTP id hf8mr41530679wjc.44.1430306522851; Wed, 29 Apr 2015 04:22:02 -0700 (PDT) Received: from [10.36.226.2] ([80.169.137.63]) by mx.google.com with ESMTPSA id q4sm38550665wja.24.2015.04.29.04.22.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 04:22:02 -0700 (PDT) Message-ID: <5540BED9.1060602@gmail.com> Date: Wed, 29 Apr 2015 12:22:01 +0100 From: Sergey Beryozkin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: users@cxf.apache.org Subject: Re: AW: AW: AW: AW: AW: How to forward requests to a JSP page when using CXFNonSpringJaxrsServlet References: <49DA2242DB0DB54FB443256F6246239D46BA59CD@ADEERL01SMS001.cznet.zeiss.org> <552519CC.70508@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BA5CFF@ADEERL01SMS001.cznet.zeiss.org> <55251F90.3020903@gmail.com> <55255E43.9000100@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BA5D71@ADEERL01SMS001.cznet.zeiss.org> <552648FC.7060102@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BA5E2A@ADEERL01SMS001.cznet.zeiss.org> <55267A03.1020304@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BA5E48@ADEERL01SMS001.cznet.zeiss.org> <55268426.6040409@gmail.com> <55279F54.1050303@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BAED5B@ADEERL01SMS001.cznet.zeiss.org> <5534F2AB.1080700@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BAEF4C@ADEERL01SMS001.cznet.zeiss.org> <5538DD86.1090500@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BAFAC2@ADEERL01SMS001.cznet.zeiss.org> <5540B224.3070603@gmail.com> <49DA2242DB0DB54FB443256F6246239D46BAFAE2@ADEERL01SMS001.cznet.zeiss.org> <5540BE1A.7030808@gmail.com> In-Reply-To: <5540BE1A.7030808@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org LOL, it has 3 such servlet declarations, not 2. I'm confused :-) Still the examples are straightforward IMHO. Check the example showing a redirect for all the html pages... Sergey On 29/04/15 12:18, Sergey Beryozkin wrote: > Well, I've mentioned which servlet parameters need to be checked. The > web.xml has 4 servlet declarations, only 2 of them have these > parameters. What exactly is confusing ? > > > On 29/04/15 12:06, Voss, Marko wrote: >> Hi Sergey, >> >> to be honest, those are multiple examples at once, aren't they? This >> is confusing for me... >> >> >> -----Urspr�ngliche Nachricht----- >> Von: Sergey Beryozkin [mailto:sberyozkin@gmail.com] >> Gesendet: Mittwoch, 29. April 2015 12:28 >> An: users@cxf.apache.org >> Betreff: Re: AW: AW: AW: AW: How to forward requests to a JSP page >> when using CXFNonSpringJaxrsServlet >> >> Hi Marko >> On 29/04/15 10:44, Voss, Marko wrote: >>> Hi Sergey, >>> >>>> You can control by configuring CXFServlet with init parameters that >>>> would let it know that a default servlet needs to take care of all >>>> of .css files, set a redirect init parameter there Does it help ? >>> >>> Well, I do not know, how to set this up for the >>> CXFNonSpringJaxrsServlet. I can see a parameter named >>> 'jaxrs.static.subresources' in that class, but I highly doubt, that >>> this is the same. Can you show me an example, of how to do this, please? >>> >> See for example >> >> https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=systests/jaxrs/src/test/resources/jaxrs_dispatch/WEB-INF/web.xml;h=a2212337bd6a9ed7a212b21a6826850581601121;hb=HEAD >> >> >> (redirect-list, redirect-servlet-name parameters) - redirect to a >> 'default' or other servlet name representing a default servlet. >> >> It is only needed if you have a wildcard URL pattern for CXFServlet >> because it obviously catches all the requests... >> >> Cheers, Sergey >> >> >> >> >> >>> Thank you very much. >>> >>> Best regards, >>> Marko >>> >>> -----Urspr�ngliche Nachricht----- >>> Von: Sergey Beryozkin [mailto:sberyozkin@gmail.com] >>> Gesendet: Donnerstag, 23. April 2015 13:55 >>> An: users@cxf.apache.org >>> Betreff: Re: AW: AW: AW: How to forward requests to a JSP page when >>> using CXFNonSpringJaxrsServlet >>> >>> Hi Marko >>> >>> On 23/04/15 07:48, Voss, Marko wrote: >>>> Hi Sergey, >>>> >>>> I am running into a different issue with this. The forwarding calls >>>> a JSP, which requires a stylesheet. >>>> >>>> The JAXRS service, which is performing the forwarding is located at: >>>> >>>> /appcontext/rest/service >>>> >>>> The JSP is located at: >>>> >>>> /appcontext/foo.jsp >>>> >>>> The stylesheet will be loaded from: >>>> >>>> /appcontext/rest/css/stylesheet.css >>>> >>>> Instead of: >>>> >>>> /appcontext/css/stylesheet.css >>> >>> What entity loads this stylesheet, JSP ? Using a "/css/stylesheet.css" >>> relative to a base HTTP address ? >>> So CXF endpoint is at "/appcontext/rest" base address and I think >>> this base address is used when forwarding. CXF does not know that >>> given a JSP reference such as "/appcontext/css/stylesheet.css" it >>> needs to use "/appcontext" only as a base address. >>> Well, JSP can just use a context value only, instead of the base HTTP >>> address that CXF sets up. I.e, use Servlet API in JSP to get the >>> context and + "css/stylesheet.css" to it. >>> >>>> >>>> Even if I put the stylesheet into a rest folder, it does not work, >>>> because the JAXRS servlet, "thinks" it has to handle a rest service >>>> request. >>> >>> You can control by configuring CXFServlet with init parameters that >>> would let it know that a default servlet needs to take care of all of >>> .css files, set a redirect init parameter there >>> >>> >>> Does it help ? >>> >>> Cheers, Sergey >>>> >>>> Why is the stylesheet loaded like this? How can I avoid this behavior? >>>> >>>> >>>> Thank you in advance and best regards, >>>> >>>> Marko >>>> >> > -- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com