You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by travers <tr...@gmail.com> on 2007/07/19 10:42:08 UTC

how to return to originating jsp when rendering jasperreport from struts2

I am rendering a jasper report (pdf format) from within a jsp (button). The
report gets created, but the action is a new html (the action url) page and
I need to use the browsers back to return to the original page. Is there a
way to generate the pdf, without navigating to the new html. Below is the
call from the jsp and the action mapping in struts.xml. I use struts 2.0.8

jsp
   <input type="button" style="margin-right: 5px" class="button"
        onclick="location.href='<c:url value="/jasper/reportPdf.html"/>'"
        value="<fmt:message key="button.pdfreport"/>"/>

struts.xml
    <include file="jasperreports-default.xml"/>
 
  <package name="jasper" extends="jasperreports-default"
namespace="/jasper">
    <action name="reportPdf" class="reportTestAction" method="reportPdf">
             <result name="success" type="jasper">
             	/jasper/reportTest.jasper
             	reportTests
             	PDF
     </result>
  </package>

Travers
-- 
View this message in context: http://www.nabble.com/how-to-return-to-originating-jsp-when-rendering-jasperreport-from-struts2-tf4108965.html#a11684645
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to return to originating jsp when rendering jasperreport from struts2

Posted by bhanupratap <pr...@rediffmail.com>.
Hai,
      Can u please send me your complete code regarding this.
-- 
View this message in context: http://www.nabble.com/how-to-return-to-originating-jsp-when-rendering-jasperreport-from-struts2-tf4108965.html#a12976873
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org