Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Redirect servlet from struts result tag - Cache issue in Proxy server.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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>
reply
    Bookmark Topic Watch Topic
  • New Topic