Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8755399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:51:00+00:00 2026-06-13T13:51:00+00:00

I am trying to use the transparent proxy provided by jetty. This is my

  • 0

I am trying to use the transparent proxy provided by jetty.

This is my web.xml

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="WebApp_9"
     version="2.4"
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>Archetype Created Web Application</display-name>

<servlet>
    <servlet-name>googleProxy</servlet-name>
    <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
    <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>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>googleProxy</servlet-name>
    <url-pattern>/google/*</url-pattern>
</servlet-mapping>

and this is the pom.xml (I am using maven):

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>JettyProxySample</groupId>
<artifactId>JettyProxySample</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>JettyProxySample Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlets</artifactId>
        <version>7.0.0.M4</version>
    </dependency>
</dependencies>
<build>
    <finalName>JettyProxySample</finalName>
    <plugins>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.10</version>
            <configuration>
                <scanIntervalSeconds>10</scanIntervalSeconds>
                <stopKey>foo</stopKey>
                <stopPort>9999</stopPort>
            </configuration>
            <executions>
                <execution>
                    <id>start-jetty</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <scanIntervalSeconds>0</scanIntervalSeconds>
                        <daemon>true</daemon>
                    </configuration>
                </execution>
                <execution>
                    <id>stop-jetty</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

I expect the proxy to forward a request like this:

http://localhost:8080/JettyProxySample/google/search?q=hello

to this:

http://www.google.com/search?q=hello

But when I try that url in browser, I always get this:

HTTP ERROR: 403

FORBIDDEN
RequestURI=/JettyProxySample/google/search

Powered by Jetty://

Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:51:01+00:00Added an answer on June 13, 2026 at 1:51 pm

    Just to toss an answer onto here, do not use a milestone release that is years old.

    • 7.6.7.v20120910 for jetty7
    • 8.1.7.v20120910 for jetty8

    I know lots of folks using the proxy servlet in both versions successfully, just not something that was from the initial migrations from codehaus to eclipse…there was a serious amount of code churn back then so I would not be surprised if this isn’t working correctly for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I am trying use a Java Uploader in a ROR app (for its ease
trying to use hibernate with my web app and getting following exception: Initial SessionFactory
I'm trying to use a transparent background for my android app as stated here:
I am trying to set transparent panel using this tutorial in my app but
Using this article from sun. I am trying to create a transparent window. I
I am need paint my image. I'm trying use JQuery in here this link:
I'm trying to use SCSS to fake a white transparent color overlaying another solid
Trying to use the http://www.dinnermint.org/css/creating-triangles-in-css/ method to create an arrow _________________ \ \ \
I'm trying to use Assembly.Load(Byte[]) in a Silverlight 4 app and i'm getting MethodAccessException.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.