Java End :

public String report() {
return "/credit/report/report";

public void reportOut(@RequestParam(value = "fileName") String fileName,@RequestParam(value = "jasperPath") String jasperPath,@RequestParam(value = "docType") String docType,HttpServletRequest request,HttpServletResponse response) throws JRException, IOException, ServletException, SQLException {
SimpleDateFormat sd = new SimpleDateFormat("yyyyMMddhhmmss");
Map<String, Object> searchmap = getParametersStartingWith(request, "search_");
jasperPath = report_url + jasperPath;
ReportUtils reportUtils = new ReportUtils(request, response);
reportUtils.servletExportDocument(ReportUtils.DocType.valueOf(docType), jasperPath, searchmap,jdbcTemplate.getDataSource().getConnection(),fileName+sd.format(new Date()));

JSP Page side :

<div style="padding: 10px 30px 10px 30px">
<form id="creditInfoForm" method="post" action="reportOut">
<td> Report name :</td>
<input name="fileName" value=" test ">
<td> Report path name :</td>
<input name="jasperPath" value="statementReport.jasper">
<td> Export type :</td>
<select name="docType" >
</select> element
<td> Parameters :</td>
<input name="search_name" value="CaoZ">
<input type="submit">

ireport Developing reports ,Java and JSP More related articles on how to integrate the end

  1. Unity The road of mobile travel &lt; Two &gt;Java Version server use protostuff simplify protobuf Development Develop an online game , The first thing to consider is what kind of coding format is used for communication between client and server . We introduced Unit ...

  2. java The development of college community management system JSP

    Running environment JDK1.7 To write Eclipse( Neon.3 Release (4.6.3)) windows Next Tomcat v8.5Mysql 5.5 Using technology Java servlet & jspM ...

  3. Java Open source JSP Tag library

    01displytag And Struts Use one of the most famous tag The main reason is that the table data is very beautiful . perfect . 02cewolf tag Used in web Display a complex graphical report on jsp tag. 03Loading T ...

  4. jasperreports+iReport Make report notes

    One .  preparation 1. Download related tools : Click here to download related tools , There's something you need in jar package . Two . install ant 1. decompression apache-ant-1.9 ...

  5. Java in jsp and Servlet The difference between

    1 Servlet Servlet It's a kind of server-side Java Applications , Platform - and protocol-independent , Can generate dynamic Web page . It acts as a customer request (Web Browser or something HTTP Client procedure ) Respond with the server (HTTP service ...

  6. The first part : Use iReport The detailed process of making report (Windows In the environment )

    Tips : In some sectors , I can't see the pictures in the article , Suggest to me blog Browse the article : The article will cover 3 All aspects : The first part : Use iReport The details of making reports ...

  7. Java Basics ——JSP( One )

    One .JSP The origin of In many dynamic web pages , Most of the content is unchanged , Only local content needs to be generated and changed dynamically . for example , The number of times a news is viewed , Only this number changes dynamically , and Servlet The code that the program returns to the client is java Program action ...

  8. Java EE JSP Built in object and expression language

    One .JSP Built-in objects JSP according to Servlet API The specification provides some built-in objects , Developers can use standard variables to access these objects without prior declaration . JSP Provides 9 Built in objects : ( One ).request sketch : JSP Programming ...

  9. miscellaneous -Java:JSP

    ylbtech- miscellaneous -Java:JSP 1. Return to the top 1. JSP Full name Java Server Pages, Chinese name java Server page , It's basically a simplified Servlet Design , It is from Sun Micros ...

Random recommendation

  1. elasticsearch snapshot

    One .Repositories stay elasticsearch.yml Add to file path.repo Path configuration : $ vim /etc/elasticsearch/elasticsearch.yml path ...

  2. Those who are not capable of Control their moods are not supposed to be ready for their baby.

    I hate these Stupid Selfish People. We need Children Caring Organization.

  3. Interview iOS Pen test

    1. The difference between shallow replication and deep replication ? 2. The role of categories (category)? What's the difference between inheritance and class in implementation ? 3. Category (category) And class extensions (extension) The difference between . 4.obc Agreements and policies in java Interface concept in ...

  4. rsync File verification and synchronization principle and rsync server To configure

    Reference resources : We focus on the algorithm of sending and receiving check files , Here's the original text and my wife (^_^) Translation : The Sender Th ...

  5. Android: Delete useless applications in the emulator

    Enter the simulator ,Setting->apps -> Find the appropriate app, choice uninstall that will do !

  6. ArrayList() Output

    import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Li ...

  7. Binomial Showdown

    Binomial Showdown TimeLimit: 1 Second   MemoryLimit: 32 Megabyte Totalsubmit: 2323   Accepted: 572 D ...

  8. FileShare File read and write lock solution “ file XXX Is being used by another process , As a result, the process cannot access this file ”( turn )

    Development process , We often need a lot of interaction with files , Reading documents , It's common practice to write documents , The local operation is perfect , But when it comes to the production environment , There are a lot of unexpected things , Or trouble in development , therefore , I'm interested in ordinary C# A summary of file operations , Most of the problems ...

  9. mysql Frequently used commands

    How to log in to the database     The plane landed     mysql -u <username> -p     Access the local database     mysql -u <username> -D <d ...

  10. the apple tree

    the apple tree A long time ago, there was a huge apple tree. A little boy loved to come and lay arou ...