Hi Bengt,

might very well be not possible ...
... we never had a request for this :-)

regards, Achim


2016-11-09 12:21 GMT+01:00 Bengt Rodehav <[email protected]>:

> I'm using Pax-Web in Karaf 4.0.7.
>
> To uphold url's from the previous system provider, I need to do some
> redirection of old url's to the new url's.
>
> I tried to put the following in my jetty.xml:
>
>     <Call name="addRule">
>>       <Arg>
>>         <New class="org.eclipse.jetty.rewrite.handler.
>> RedirectPatternRule">
>>           <Set name="pattern">/hp/admin/index.php</Set>
>>           <Set name="location">/hp/admin/index.html</Set>
>>         </New>
>>       </Arg>
>>     </Call>
>
>
> But I get:
>
> Caused by: java.lang.IllegalStateException: No Method: <Call
>> name="addRule"><Arg>
>>         <New 
>> class="org.eclipse.jetty.rewrite.handler.RedirectPatternRule"><Set
>> name="pattern">/hp/admin/index.php</Set><Set name="location">/hp/admin/
>> index.html</Set></New>
>>       </Arg></Call> on class org.ops4j.pax.web.service.jetty.internal.
>> JettyServerHandlerCollection
>>         at org.eclipse.jetty.xml.XmlConfiguration$
>> JettyXmlConfiguration.call(XmlConfiguration.java:738)
>>         at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.
>> configure(XmlConfiguration.java:417)
>>         at org.eclipse.jetty.xml.XmlConfiguration$
>> JettyXmlConfiguration.get(XmlConfiguration.java:662)
>>         at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.
>> configure(XmlConfiguration.java:420)
>>         at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.
>> configure(XmlConfiguration.java:298)
>>         at org.eclipse.jetty.xml.XmlConfiguration.configure(
>> XmlConfiguration.java:248)
>>         ... 16 more
>> Caused by: java.lang.NoSuchMethodException: addRule
>>         at org.eclipse.jetty.util.TypeUtil.call(TypeUtil.java:537)
>>         at org.eclipse.jetty.xml.XmlConfiguration$
>> JettyXmlConfiguration.call(XmlConfiguration.java:730)
>>         ... 21 more
>
>
> Is it not possible to add Jetty redirection rules when using Pax-Web?
>
> /Bengt
>
> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to