Java servlet Proxy Server
1. Using Maven dependencies
<dependency><groupId>org.mitre.dsmiley.httpproxy</groupId><artifactId> Smiley-http-proxy-servlet</artifactid><version>1.7</version></dependency>
2. Configure Web. xml
<servlet> <servlet-name>XXXXXX</servlet-name> <servlet-class> org.mitre.dsmiley.httpproxy.proxyservlet</servlet-class> <init-param> <param-name> targeturi</param-name> <param-value>http://XXXXXX:8983/XXXXXX</param-value> </ init-param> <init-param> <param-name>log</param-name> <param-value>true </param-value> </init-param></servlet><servlet-mapping> <servlet-name> Xxxxxxx</servlet-name> <url-pattern>/XXXXXXX/*</url-pattern></servlet-mapping>
3. Maven compile plug-in configuration
<plugin><artifactid>maven-compiler-plugin</artifactid><configuration><source>1.6 </source><target>1.6</target><encoding>UTF-8</encoding></configuration> </plugin>
4. War Pack Tomcat release
5. Function can operate similar nginx functions, and if there is a need to cross-domain, or API gateway processing can be used,
is still more convenient.
The HTTP proxy Servlet Proxy service uses