I am using struts2.
In my
jsp page I have a link to render PDF report. I use following entries in the struts.xml file.
<!-- PDF Report -->
<action name="openPDFReport"
class="com.cognizant.gto.jcoe.cap.web.action.PDFConvertionAction">
<result>/PDFDashBoardReportServlet</result>
</action>
When I am deploying in the local
tomcat server the PDFDashBoardReportServlet will open a PDF report properly in the web page.
But when i put a proxy server infront of the actual Tomcat server, PDFDashBoardReportServlet will give me back the report from the proxy cache.
It does not give me back the report for interest.
Logic of fetching a specific report based on the some parameter is written inside the
servlet.
How to resolve this cache issue .. Please provide some pointer.
My understanding is that, if I am able to append some system date as a parameter to the requesting servlet url, then probably the proxy server will identify each the as a new request and fectch the report from the original backend server.
Eg.
http://10.227.88.62:8089/JCAPWeb/PDFDashBoardReportServlet?date=..........
If this is the correct approach, then how can I incorporate this.
Entries in the web.xml file is
<filter>
<filter-name>struts-prepare</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
<filter>
<filter-name>struts-execute</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-prepare</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts-execute</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<description>
</description>
<display-name>PDFDashBoardReportServlet</display-name>
<servlet-name>PDFDashBoardReportServlet</servlet-name>
<servlet-class> com.tango.gto.jcoe.cap.web.processor.PDFDashBoardReportServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PDFDashBoardReportServlet</servlet-name>
<url-pattern>/PDFDashBoardReportServlet</url-pattern>
</servlet-mapping>