Scenario: The user selects a Reference no and then clicks button in a
jsp. After that, a new window should open up and a dynamically generated PDF should be displayed there.
Problem: -- When I run this as a
java application, the PDF file is generated fine. But I am new on
Struts. and am not sure of the flow for calling and displaying this
servlet.
What I have tried to do: -- In the jsp after the user clicks on the button, I pass the following URL while opening another window.
eg. var mononeyURL = "http://localhost:9080/pcnavms/monroney.do";
openResourceWindow((mononeyURL) , 600, 800, true, true, true, false);
This opens up the new window fine. And in the monroney jsp, I am trying to intantiate the class
eg. monroney.jsp
<%@ page language="java" contentType="application/pdf fullscreen=yes"%>
<% controller.checkPDF.CreatePOVMonroney al = new controller.checkPDF.CreatePOVMonroney();
al.processRequest(request, response);
%>
and in the struts.config file I have declared the following :
<global-forwards>
<forward name="monroney" path="/WEB-INF/jsp/dlrTnRcv/monroney.jsp" />
</global-forwards>
<action-mappings>
<action path="/monroney"
type="controller.dlrTnRcv.MonroneyAction"
name="commonForm"
scope="request"
input="/WEB-INF/jsp/dlrTnRcv/monroney.jsp"
validate="false">
</action>
</action-mappings>
But this doesn't work. Can anyone please help me with this.
thanks,
Paromita