Home:ALL Converter>Jetty Proxy Servlet returns a 403 error

Jetty Proxy Servlet returns a 403 error

Ask Time:2013-08-19T15:51:40         Author:user962206

Json Formatter

I have setup my application like this using jetty

Web.xml

<servlet>
    <servlet-name>GoogleProxy</servlet-name>
    <servlet-class>org.mortbay.proxy.AsyncProxyServlet$Transparent</servlet-class>
    <load-on-startup>1</load-on-startup>
    <init-param>
      <param-name>ProxyTo</param-name><param-value>http://www.google.com</param-value>
    </init-param>
    <init-param>
      <param-name>Prefix</param-name><param-value>/google</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>GoogleProxy</servlet-name>
    <url-pattern>/google/*</url-pattern>
  </servlet-mapping>

However when I access my app (The url is like this localhost:8080/myapp/google/images) it returns an error 403. I am using jetty 6.1.13

Author:user962206,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/18308830/jetty-proxy-servlet-returns-a-403-error
yy