PDA

View Full Version : HTTP Proxy Servlet for dev



gaboo
21 Dec 2009, 5:13 AM
Hi there!

I wrote a HTTP proxy servlet for GWT / GXT developing.
It can be useful if the data backend and the GWT WebApp are on different domain.
It handles GET / POST methods (multipart too).
Just copy the jar file into the project's root /war/WEB-INF/lib directory and add the servlet to the web.xml. For example:


<servlet>
<servlet-name>HttpProxy</servlet-name>
<servlet-class>hu.co.netsoft.gwt.ProxyServlet</servlet-class>
<init-param>
<param-name>host</param-name>
<param-value>http://localhost</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>HttpProxy</servlet-name>
<url-pattern>/adm.xml</url-pattern>
</servlet-mapping>


Source and bin in the zip.