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.