https://github.com/mitre/HTTP-Proxy-Servlet
we can put the class in servlet and edit web.xml, no source code need to be changed.
using this, we can delegate pdf generation from servlet to node server.
---
Here's an example excerpt of a web.xml file to communicate to a Solr server:
<servlet>
<servlet-name>solr</servlet-name>
<servlet-class>org.mitre.dsmiley.httpproxy.ProxyServlet</servlet-class>
<init-param>
<param-name>targetUri</param-name>
<param-value>http://solrserver:8983/solr</param-value>
</init-param>
<init-param>
<param-name>log</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>solr</servlet-name>
<url-pattern>/solr/*</url-pattern>
</servlet-mapping>
--we may further combin(or replace) this with rust's proxy based on tokio and headless chrome to generate pdf.
No comments:
Post a Comment