I have bashed my head against this for almost two weeks now. I am
trying to do something really simple - proxy a request from a stand-
alone Jetty 6.1.22 instance to localhost to connect to my Bugzilla
installation.

My app is developed using GWT2.2.0.

My Bugzilla runs just fine at http://localhost/bugzilla.

The folder containing my webapp is to be found at jetty-6.1.22/webapps/
proxytest.

I have read about proxies and GWT extensively, the most useful thing I
found are the tales of woe (and advice) at
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c25
. Based on comment 46 on this page, I chose to use Jetty 6.1.22.

My client code looks like this:

        public void onModuleLoad() {

                Frame frame = new Frame("/bugzilla/");
                frame.setHeight("100%");
                frame.setWidth("100%");
                RootPanel.get().add(frame);
        }

My web.xml looks like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd";>

<web-app>

     <servlet>
      <servlet-name>JettyProxy</servlet-name>
      <servlet-class>org.mortbay.servlet.ProxyServlet$Transparent</
servlet-class>
    <init-param>
      <!-- This points to the actual server where requests are proxied
to -->
      <param-name>ProxyTo</param-name>
      <param-value>http://localhost/</param-value>
    </init-param>
    <init-param>
      <!-- This will be stripped off the client request URL -->
      <param-name>Prefix</param-name>
      <param-value>/</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>com.searchsystem.gwt.server.GreetingServiceImpl</
servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/test/greet</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>JettyProxy</servlet-name>
    <url-pattern>/bugzilla/*</url-pattern>
  </servlet-mapping>

  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>Test.html</welcome-file>
  </welcome-file-list>

</web-app>

In WEB-INF/lib I have jetty-util-6.1.22.jar and gwt-servlet.jar. When
I run the app by hitting http://localhost:8080/proxytest, this is the
output I get. Please please please can anyone help me get past this
404 error? I see there is no value in the output for
javax.servlet.forward.context_path - is this fatal? Thanks in
advance ...

WebApp JSP Snoop page

Request information

Requested URL:  http://localhost:8080/jspsnoop/ERROR/404
Request method: GET
Request URI:    /jspsnoop/ERROR/404
Request protocol:       HTTP/1.1
Servlet path:   /jspsnoop
Path info:      /ERROR/404
Path translated:        /usr/share/java/jetty-6.1.22/webapps/test/ERROR/404
Query string:
Content length: -1
Content type:   null
Server name:    localhost
Server port:    8080
Remote user:    null
Remote address: 127.0.0.1
Remote host:    127.0.0.1
Authorization scheme:   null
Request headers

Header: Value:
Host    localhost:8080
Connection      keep-alive
Referer http://localhost:8080/proxytest/
Accept  application/xml,application/xhtml+xml,text/html;q=0.9,text/
plain;q=0.8,image/png,*/*;q=0.5
User-Agent      Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3
(KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
Accept-Encoding gzip,deflate,sdch
Accept-Language en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie  LASTORDER=bug_status%2Cpriority%2Cassigned_to%2Cbug_id;
JSESSIONID=igusquo0nqig
Request Attributes

Attribute:      Value:
javax.servlet.forward.request_uri       /bugzilla/
org.mortbay.jetty.error_page    /jspsnoop/ERROR/404
javax.servlet.forward.servlet_path      /bugzilla/
testFilter      2
javax.servlet.error.message     NOT_FOUND
requestInitialized      ''
javax.servlet.forward.context_path
javax.servlet.error.status_code 404
javax.servlet.error.servlet_name        default
org.mortbay.jetty.newSessionId  ed9z6uthzmor
javax.servlet.error.request_uri /bugzilla/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to