Jump to content
We've recently updated our Privacy Statement, available here ×

how to pass parameters in struts2?


venu08

Recommended Posts

 Hi 

I am createing a .jrxml file in ireport .

How can pass the parameter in struts2

In action class we write the code in this way

 

HashMap parameters= new HashMap();

parameters.put("name", "welcome");

 

In Struts2

<package name="default" extends="jasperreports-default,struts-default">

<action name="myJasperTest" class="action.JasperAction">

        <result name="success" type="jasper">
<param name="location">/jasper/contacts.jasper</param>
<param name="dataSource">beanCollection</param>

<param name="parameter">parameters</param>


<param name="format">PDF</param>
</result>

<result name="error" type="jasper">/Error.jsp</result>

</action>

</package>

I thing it is not correct way.But how can pass the parameters in struts2

 

 

Thanks

gvr

 



Post Edited by venu08 at 06/25/2011 14:56
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...