Hello all,
I have bashed my head against this for almost two weeks now. I'm trying to do something simple: proxy a request from a stand-alone Jetty instance to localhost to connect to my Bugzilla installation. I cannot get past a 404 error. I have researched Jetty, proxies and GWT extensively and posted on the GWT group (twice) and on stackoverflow without any response, hence my post here; and the most useful thing I found are the tales of woe (and advice) at
My web application is developed using GWT2.2.0.
The folder containing my webapp is to be found at jetty-6.1.22/webapps/proxytest.
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"
<web-app>
<servlet>
<servlet-name>JettyProxy</servlet-name>
<servlet-class>org.mortbay.servlet.ProxyServlet$Transparent</servlet-class>
<init-param>
<param-name>ProxyTo</param-name>
</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>
<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, I get the output below. 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? If so, how do I fix it? Thanks in advance ... my head will recover in a couple of months ;)
WebApp JSP Snoop page
Request information
===================
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: 0:0:0:0:0:0:0:1
Remote host: 0:0:0:0:0:0:0:1
Authorization scheme: null
Request headers
===============
Header: Value:
Host localhost:8080
Connection keep-alive
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.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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 TUI=expert_fields=0&history_query=0&people_query=1&information_query=0&custom_search_query=0; BUGLIST=1-3; VERSION-
SearchSystem=alpha; DEFAULTFORMAT=specific; LASTORDER=bug_status%2Cpriority%2Cassigned_to%2Cbug_id
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 1qjf8rbkdykm5
javax.servlet.error.request_uri /bugzilla/