cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wilton" <>
Subject RE: another question on RequestDispatcherProvider
Date Wed, 06 Jan 2010 10:01:58 GMT
Hi Sergey

Option 1 works : )






From: Sergey Beryozkin [] 
Sent: 05 January 2010 17:45
To: Paul Wilton;
Subject: RE: another question on RequestDispatcherProvider



Hi Paul

I have tried to modify CXFServlet listening on '/' to block if it is a
/WEB-INF/* pathImfo which is being processed now, but I've observed what
you did. Basically, when a RequestDispatcherProvider forwards, the first
servlet which gets this forward request is the same CXFServlet so
blocking it just results in the original forward request being blocked
and thus an empty response is returned.

So here is what can be done here :

1. add

<property name="dispatcherName" value="jsp"/>


<bean id="dispatchProvider1"

        <property name="resourcePath" value="/WEB-INF/jsp/test.jsp"/>

        <property name="scope" value="request"/>


it will restrict the space a bit and will exclude CXFServlet from a list
of candidates, as far as RequestDispatcher.forward(...) is concerned.

I have tried it from Eclipse, though I will need to update it to ensure
JDK but not JRE is used by default for JSP pages be compiled...But
CXFServlet is definitely bypassed.

2. If it is feasible to make your jsp pages public by moving them one
level higher from /WEB-INF, say to /jsp/..., then configuring CXFServlet
to redirect to /jsp/test.jsp will do the trick. What will happen is that
RequestDispatcherProvider will forward and CXFServlet will forward it
further... I think the reason it could not forward to /WEB-INF was that
private resources under /WEB-INF are not visible at the CXFServlet

hope it helps, can you please try one of the above options ?

thanks, Sergey

-----Original Message-----
From: Paul Wilton []
Sent: Tue 1/5/2010 10:01 AM
To: Sergey Beryozkin
Subject: RE: another question on RequestDispatcherProvider

Hi Sergey

I have tried extending the CXFServlet and overriding the redirect method
as you suggest. But the response is empty by that time -

By the time redirect method is invoked has the CXFServlet already
intercepted the  .jsp request and created a new Response (discarding the
one generated when the JSP was initially processed by the servlet
container) ?

This e-mail (and any attachments) is confidential and may contain personal views which are
not the views of the BBC unless specifically stated. If you have received it in error, please
delete it from your system. Do not use, copy or disclose the information in any way nor act
in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received. Further communication will signify
your consent to this

This e-mail has been sent by one of the following wholly-owned subsidiaries of the BBC:
BBC Worldwide Limited, Registration Number: 1420028 England, Registered Address: BBC Media
Centre, 201 Wood Lane, London, W12 7TQ
BBC World News Limited, Registration Number: 04514407 England, Registered Address: BBC Media
Centre, 201 Wood Lane, London, W12 7TQ
BBC World Distribution Limited, Registration Number: 04514408, Registered Address: BBC Media
Centre, 201 Wood Lane, London, W12 7TQ


  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message