自定义struts2 plugin(jasper-plugin扩展)

  因需要实现页面上导出Excel时能够隐藏某些Excel列,(jasperreports6.3.1)尝试修改Jasperreports的jrxml模板文件,比如在jrxml元素table或者文本元素的reportElement标签里添加属性net.sf.jasperreports.export.xls.cell.hidden,结论是无论是xls格式还是xlsx格式都不奏效。

  (但是,net.sf.jasperreports.export.xls.freeze.column.edge这个属性实现冻结行列却能生效,不知为何)

  于是借助第三方API:JXL、POI,在Excel文件生成后解除这些API修改生成的Excel以实现Web页面导出时就隐藏某些列。

  项目基于struts2框架,基于编译好的jasper模板使用struts2-jasperreports-plugin填充数据在web上实现导出Excel文件,

 

  基本流程:

一,使用iReport(5.6)设计基础模板;

    过程略;

二,重写/扩展struts2的类似struts2-jasperreports-plugin的自定义result处理过程;

  1,获取jasper模板(location)、Struts2的dataSource、format、值栈数据、值栈参数

  2,设定HttpServletResponse的response类型(本质上就是对HttpServletResponse对象设置以响应HttpServletRequest)

  3,填充数据生成JasperPrint

  4,JRXlsxExporter/JRXlsExporter导出Excel文件

  5,使用POI/Jxl修改Excel工作簿行列隐藏属性(使用struts值栈传递参数),写入字节流

自定义Result代码:

 

public class JasperReportsResult extends StrutsResultSupport implements JasperReportConstants {

    private static final long serialVersionUID = -2523174799621182907L;

    private final static Logger LOG = LoggerFactory.getLogger(JasperReportsResult.class);

    protected String dataSource;
    protected String format;
    protected String documentName;
    protected String contentDisposition;
    protected String delimiter;
    protected String imageServletUrl = "/images/";
    protected String timeZone;
    
	/**
     * Connection which can be passed to the report
     * instead od dataSource.
     */
    protected String connection;

    /**
     * Names a report parameters map stack value, allowing
     * additional report parameters from the action.
     */
    protected String reportParameters;

    /**
     * Names an exporter parameters map stack value,
     * allowing the use of custom export parameters.
     */
    protected String exportParameters;

    /**
     * Default ctor.
     */
    public JasperReportsResult() {
        super();
    }

    /**
     * Default ctor with location.
     *
     * @param location Result location.
     */
    public JasperReportsResult(String location) {
        super(location);
    }

    public String getImageServletUrl() {
        return imageServletUrl;
    }

    public void setImageServletUrl(final String imageServletUrl) {
        this.imageServletUrl = imageServletUrl;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public void setDocumentName(String documentName) {
        this.documentName = documentName;
    }

    public void setContentDisposition(String contentDisposition) {
        this.contentDisposition = contentDisposition;
    }

    public void setDelimiter(String delimiter) {
        this.delimiter = delimiter;
    }
        

    /**
     * set time zone id
     *
     * @param timeZone
     */
    public void setTimeZone(final String timeZone) {
        this.timeZone = timeZone;
    }

    public String getReportParameters() {
        return reportParameters;
    }

    public void setReportParameters(String reportParameters) {
        this.reportParameters = reportParameters;
    }

    public String getExportParameters() {
        return exportParameters;
    }

    public void setExportParameters(String exportParameters) {
        this.exportParameters = exportParameters;
    }

    public String getConnection() {
        return connection;
    }

    public void setConnection(String connection) {
        this.connection = connection;
    }
        
    private String tmppath;
    
    private String hiddencs;

    protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception {
        // Will throw a runtime exception if no "datasource" property. TODO Best place for that is...?
        initializeProperties(invocation);

        if (LOG.isDebugEnabled()) {
            LOG.debug("Creating JasperReport for dataSource = " + dataSource + ", format = " + format);
        }

        HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(ServletActionContext.HTTP_REQUEST);
        HttpServletResponse response = (HttpServletResponse) invocation.getInvocationContext().get(ServletActionContext.HTTP_RESPONSE);

        // Handle IE special case: it sends a "contype" request first.
        // TODO Set content type to config settings?
        if ("contype".equals(request.getHeader("User-Agent"))) {
            try {
               // response.setContentType("application/pdf");
           	response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");//xlsx
            //	response.setContentType("application/vnd.ms-excel");//xls
                response.setContentLength(0);

                ServletOutputStream outputStream = response.getOutputStream();
                outputStream.close();
            } catch (IOException e) {
                LOG.error("Error writing report output", e);
                throw new ServletException(e.getMessage(), e);
            }
            return;
        }

        // Construct the data source for the report.
        ValueStack stack = invocation.getStack();
        ValueStackDataSource stackDataSource = null;
        
        /**
         * 获取值栈中的值
         * 
         * ****/
        this.hiddencs = (String) stack.findString("xlsxhidecolums");
        LOG.info("value stack, xlsxhidecolums: "+ hiddencs);        
        
        Connection conn = (Connection) stack.findValue(connection);
        if (conn == null)
            stackDataSource = new ValueStackDataSource(stack, dataSource);

        // Determine the directory that the report file is in and set the reportDirectory parameter
        // For WW 2.1.7:
        //  ServletContext servletContext = ((ServletConfig) invocation.getInvocationContext().get(ServletActionContext.SERVLET_CONFIG)).getServletContext();
        ServletContext servletContext = (ServletContext) invocation.getInvocationContext().get(ServletActionContext.SERVLET_CONTEXT);
        String systemId = servletContext.getRealPath(finalLocation);
        
        tmppath  = servletContext.getRealPath("/") + "/" + UUID.randomUUID()+String.valueOf(System.currentTimeMillis()) + ".xlsx";/////
        
        Map parameters = new ValueStackShadowMap(stack);
        File directory = new File(systemId.substring(0, systemId.lastIndexOf(File.separator)));
        parameters.put("reportDirectory", directory);
        parameters.put(JRParameter.REPORT_LOCALE, invocation.getInvocationContext().getLocale());

        // put timezone in jasper report parameter
        if (timeZone != null) {
            timeZone = conditionalParse(timeZone, invocation);
            final TimeZone tz = TimeZone.getTimeZone(timeZone);
            if (tz != null) {
                // put the report time zone
                parameters.put(JRParameter.REPORT_TIME_ZONE, tz);
            }
        }

        // Add any report parameters from action to param map.
        Map reportParams = (Map) stack.findValue(reportParameters);
        if (reportParams != null) {
            if (LOG.isDebugEnabled()) {
        	LOG.debug("Found report parameters; adding to parameters...");
            }
            parameters.putAll(reportParams);
        }
        
     //   String hide =  (String) stack.findValue(hidecolumns);
    //    LOG.info("hide str: "+hide);
        

        byte[] output;
        JasperPrint jasperPrint;

        // Fill the report and produce a print object
        try {
            JasperReport jasperReport = (JasperReport) JRLoader.loadObjectFromFile(systemId);
            if (conn == null)
                jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, stackDataSource);
            else
                jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
        } catch (JRException e) {
            LOG.error("Error building report for uri " + systemId, e);
            throw new ServletException(e.getMessage(), e);
        }

        // Export the print object to the desired output format
        try {
            if (contentDisposition != null || documentName != null) {
                final StringBuffer tmp = new StringBuffer();
                tmp.append((contentDisposition == null) ? "inline" : contentDisposition);

                if (documentName != null) {
                    tmp.append("; filename=");
                    tmp.append(documentName);
                    tmp.append(".");
                    tmp.append(format.toLowerCase());
                }

                response.setHeader("Content-disposition", tmp.toString());
            }

            JRExporter exporter;
            
            if ( format.equals(FORMAT_XLSX)){
            	
           	response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");//xlsx
            //	response.setContentType("application/vnd.ms-excel");//xls
            	exporter = new JRXlsxExporter(); //xlsx
            //	 exporter = new JRXlsExporter();//xls
            	
            }            
            else {
                throw new ServletException("Unknown report format: " + format);
            }

            Map exportParams = (Map) stack.findValue(exportParameters);
            if (exportParams != null) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Found export parameters; adding to exporter parameters...");
                }
                exporter.getParameters().putAll(exportParams);
            }

            output = exportReportToBytes(jasperPrint, exporter);
        } catch (JRException e) {
            String message = "Error producing " + format + " report for uri " + systemId;
            LOG.error(message, e);
            throw new ServletException(e.getMessage(), e);
        }

        response.setContentLength(output.length);

        writeReport(response, output);
    }

    /**
     * Writes report bytes to response output stream.
     *
     * @param response Current response.
     * @param output   Report bytes to write.
     * @throws ServletException on stream IOException.
     */
    private void writeReport(HttpServletResponse response, byte[] output) throws ServletException {
        ServletOutputStream outputStream = null;
        try {
        	
        	
            outputStream = response.getOutputStream();
            outputStream.write(output);
            outputStream.flush();
        } catch (IOException e) {
            LOG.error("Error writing report output", e);
            throw new ServletException(e.getMessage(), e);
        } finally {
            try {
                if (outputStream != null) {
                    outputStream.close();
                }
            } catch (IOException e) {
                LOG.error("Error closing report output stream", e);
                throw new ServletException(e.getMessage(), e);
            }
        }
    }

    /**
     * Sets up result properties, parsing etc.
     *
     * @param invocation Current invocation.
     * @throws Exception on initialization error.
     */
    private void initializeProperties(ActionInvocation invocation) throws Exception {
        if (dataSource == null && connection == null) {
            String message = "No dataSource specified...";
            LOG.error(message);
            throw new RuntimeException(message);
        }
        if (dataSource != null)
            dataSource = conditionalParse(dataSource, invocation);

        format = conditionalParse(format, invocation);
        if (StringUtils.isEmpty(format)) {
            format = FORMAT_XLSX; //XLSX
        }

        if (contentDisposition != null) {
            contentDisposition = conditionalParse(contentDisposition, invocation);
        }

        if (documentName != null) {
            documentName = conditionalParse(documentName, invocation);
        }

        reportParameters = conditionalParse(reportParameters, invocation);
        exportParameters = conditionalParse(exportParameters, invocation);

    }

    /**
     * Run a Jasper report to CSV format and put the results in a byte array
     *
     * @param jasperPrint The Print object to render as CSV
     * @param exporter    The exporter to use to export the report
     * @return A CSV formatted report
     * @throws net.sf.jasperreports.engine.JRException
     *          If there is a problem running the report
     * @throws IOException 
     * @throws BiffException 
     * @throws WriteException 
     */
    private byte[] exportReportToBytes(JasperPrint jasperPrint, JRExporter exporter) throws JRException, IOException, BiffException, WriteException {
    	
    	
    	ByteArrayOutputStream baos = new ByteArrayOutputStream();
    	
    	FileOutputStream tmpos = new FileOutputStream(this.tmppath);//
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
        exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, tmpos);
        exporter.exportReport();        
        boolean ifhide = false;   
                       
        org.apache.poi.ss.usermodel.Workbook wb = //new HSSFWorkbook(new FileInputStream(this.tmppath));//xls
        		new XSSFWorkbook(new FileInputStream(this.tmppath));//XLSX ;
               
        String hidden[] = this.hiddencs.split("\\,", -1);
        for (int i = 0; i < hidden.length; i++) {
        	wb.getSheetAt(0).setColumnHidden(Integer.valueOf(hidden[i]), true);//参数获取
		}
                
        wb.write(baos);
        tmpos.close();     
        wb.close();     	    	
        byte[] output;              
        File f = new File(this.tmppath);
        f.delete();
        if (delimiter != null) {
            exporter.setParameter(JRCsvExporterParameter.FIELD_DELIMITER, delimiter);
        }

        output = baos.toByteArray();

        return output;
    }



}

 

 

三,struts2项目中配置web.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>struts2plugintest1</display-name>
  
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>  

</web-app>

 

 

四,struts2项目配置struts.xml

1,struts2会按顺序加载struts-default.xml/struts-plugin.xml/struts.xml的配置项,struts.xml中配置:

 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
	"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
	<constant name="struts.i18n.encoding" value="UTF-8" />
    <constant name="struts.devMode" value="true" />
    <constant name="struts.configuration.xml.reload" value="true" />    
    
    <package name="default" namespace="/" extends="jasperxlsxhide-default">    	
    	<action name="xlsxhide" class="merrick.action.TesthideAction"  >    	
    		<result type="jasperxlsxhide" name="getxlsx">
   		   			<param name="dataSource">dlst</param>
		   			<param name="location">/reports/report3.jasper</param>
		   			<param name="reportParameters">pmap</param>					
		   			<param name="format">XLSX</param>     		
    		</result>  		
    	</action>    	    
    </package>
</struts>

 

 

2,自定义(扩展/重写)的Reslut类型(jasperxlsxhide),需要配置在插件jar包中的struts-plugin.xml文件中:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
	"http://struts.apache.org/dtds/struts-2.3.dtd">    
<struts>
    <package name="jasperxlsxhide-default" extends="struts-default">
    
    	<result-types>
    		<result-type name="jasperxlsxhide" class="struts2plugin.merrick.xlsxhide.japser.JasperReportsResult"/>
    	</result-types>
    </package>
</struts>

 

五,struts2的Action调用部分

 

	public String execute() throws Exception {// TEST SUCCESSFUL


		Map param = new HashMap<String , Object>();
		param.put("parameterA", "11");
		param.put("paramtitle", "HELLO");//
		param.put("displayCol4", true);//work
		this.setPmap(param);
		ArrayList<DataBean> dataList = new ArrayList<DataBean>();
		setListdata(dataList);
		this.setDlst(dataList);
		//http://localhost:8080/struts2plugintest1/xlsxhide.action		
		
		ctx.getActionInvocation().getStack().set("xlsxhidecolums", "3,4");//
			
		return "getxlsx";
	}

 

 

struts2-jasperreports-plugin-2.0.14.jar struts2-jasperreports-plugin ssh ireport 立即下载

相关推荐

在struts2中使用JasperReports

除了依赖的jar以外的所有文件。jar文件请按图片上的名称自行下载,放入相应的目录,即可。 博文链接:https://liyanboss.iteye.com/blog/180735

struts2+jasperreport集成方案

ireport5.6.0 启动需要1.7jdk,1.8会一闪而过。 jasperreport的依赖,maven &amp;amp;amp;lt;dependency&amp;amp;amp;gt; &amp;amp;amp;lt;groupId&amp;amp;amp;gt;net.sf.jasperreports&amp;amp;amp;lt;/groupId&amp;amp;amp;gt; &amp;amp;amp;lt;artif

在路上的左一 763

innovus 命令每日精要 | 掌控Innovus布线的利器——setNanoRouteMode详解

在数字IC后端设计的复杂世界里,布线优化是至关重要的一步。今天,我来给大家深入讲解Innovus工具中setNanoRouteMode命令的精妙之处,让你轻松驾驭布线策略,提升设计质量。setNanoRouteMode是Innovus中用于配置NanoRoute绕线行为的关键命令。通过其丰富的参数,你可以精细控制布局后阶段的绕线策略、信号完整性优化、工艺适配及设计规则修复等流程。下面,我将按功能分类总结其核心选项,并针对不同场景给出建议。

weixin_50820814的博客 3528

struts2插件:struts2-jasperreports-plugin

JasperReports 是什么 JasperReports是一个面向开发人员设计的开源Java类库, 通过它可以为Java应用程序增加报表功能。由于 JasperReports 不是独立的工具,所以不能对它进行独立安装。而是要通过应用程序的 CLASSPATH 来包含其类库,从而把它嵌入到 Java应用程序中。JasperReports 是一个 Java类库,也就是说它不是为最终用户准备

向北西行的专栏 981

DeepSeek与豆包无缝对接:5分钟搞定智能周报自动化(附完整代码)

本文详细介绍了如何利用DeepSeek与豆包API,快速搭建一个智能周报自动化系统。通过整合豆包平台的工作流数据,并调用DeepSeek大模型进行深度分析与内容生成,该系统能在5分钟内自动抓取、分析多源信息,并生成结构清晰、富有洞察力的团队周报,显著提升工作效率。

weixin_29029995的博客 491

别再折腾老教程了!树莓派4B/5最新系统(Raspberry Pi OS Bookworm)红外遥控配置,用gpio-ir驱动一次成功

本文详细介绍了树莓派4B/5在最新Raspberry Pi OS Bookworm系统下配置红外遥控的完整指南,摒弃过时的lirc-rpi驱动,采用现代gpio-ir驱动方案。从硬件连接到软件配置,提供10分钟快速上手指南,涵盖驱动加载、信号测试、按键映射及高级应用场景,帮助用户高效完成红外遥控配置。

weixin_42520909的博客 442

改造struts2-jasperreport-plugin-2.1.6支持多数据源

#改造struts2-jasperreport-plugin-2.1.6支持多数据源      目前官方发布的struts2-jasperreport-plugin-2.1.6插件仅支持java的数据源类型:Map,Iterable,isArray为true即各种Array、List,Enumeration,Iterator,将其无法识别的类型封装成Object[],最终转化为可迭代的List类型...

zhangfenglin的专栏 276

知识图谱与人工智能本体论:构建机器认知的语义基石

本文探讨了知识图谱与人工智能本体论如何作为机器认知的语义基石,让AI从‘知道数据’迈向‘理解知识’。文章详细拆解了本体论的核心构件与构建方法,并阐述了从本体到知识图谱的实践路径,包括知识获取、融合、存储及推理应用,最终分析了其在智能搜索与专家系统等场景中带来的根本性重塑。

nginx7reverse的博客 909

struts2整合jasper模版生成PDF导出下载<三>

三,编写java程序,生成pdf文件 此处有多钟方式:也可以用poi方式,这里着重介绍两种方式: (一),直接使用struts2-jasperreports-plugin配合struts2查看下载功能 [code="java"] /WEB-INF/pages/memberShop/visaIndex.ftl /j...

iteye_7304的博客 226

麒麟V10 SP1系统下编译linuxdeployqt并打包Qt 5.15.2程序完整指南

麒麟V10 SP1系统下编译linuxdeployqt并打包Qt 5.15.2程序完整指南

ChenJin_2的博客 275

YOLO11 锚框机制全解析:从改进 K-means 聚类到自适应优化,附多场景实战(附代码)

摘要 YOLO11的锚框机制采用"自适应、动态化、场景感知"的设计理念,通过数据驱动的锚框生成、多尺度感知分配和实时优化策略,显著提升目标检测性能。相较于早期YOLO版本,YOLO11的锚框完全基于训练集目标分布自适应生成,并引入智能分配策略,使不同尺寸目标获得最优匹配。技术架构包含自适应锚框生成、多尺度分配器和动态优化模块,通过改进的K-means聚类和交并比计算实现精准匹配。YOLO11锚框机制在检测精度、训练稳定性和场景适应性方面均有显著提升,为复杂场景下的目标检测提供更优解决方案

本博客聚焦 YOLOv11 全流程落地,涵盖架构优化、数据集处理、训练技巧与多场景部署,兼及国产数据库、Java 开发与 AI 模型应用,内容兼顾理论与工程实践,为开发者提供系统干货,助力高效提升技术能力。 1319

struts2和jasper reports

在应用中,我们普遍是先通过iReport等工具生成编译后的*.jasper,然后交Struts2,Struts2的Action负责提供数据源及组装. 本例为了说明更清楚,我们用iReport只生成jasper_templ...

109

华为OD机试 - 整型数组按照个位数排序(Java 双机位C卷 100分)

华为OD机试 双机位C卷题库疯狂收录中,刷题。

学Java,找哪吒 349

[Struts2]JasperReports Plugin设定PDF加密

言:Struts2怎麽整合JasperReports Plugin就不多说了, 有兴趣请参考这篇http://www.javaworld.com.tw/jute/post/view?bid=42&id=186689&sty=2如果要设定PDF加密肯定就要修改JasperRepor

1019

黑猫带你学eMMC协议第12篇:生产状态感知(PSA)

1 概述 1.1 什么是PSA Production State Awareness (PSA) 生产状态感知 e•MMC设备可以利用其是否在生产环境中的信息,从而在现场运作时进行不同的操作。 例如,在设备低温焊接(soldering)前,将数据写入emmc,可能导致数据出错,而正在焊接期间写入数据,出错的概率可能会更大。在低温焊接之前,emmc设备可以使用一种特定的内部操作去加载内容,这样就能减少数据出错的概率,而在低温焊接后进行常规的操作就行了。 1.2 psa如何进行工作? PSA存在于emmc5.0

黑猫奥利奥的博客 4258

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

Myeclise10.0:org.apache.jasper.JasperException

type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException:

Dantechan的专栏 715

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

struts2-jasperreports-plugin导出中文html报表出现乱码

在项目中使用统一编码 UTF-8. 报表使用ireport设计,其编码也是UTF-8. 但在导出struts2-jasperreports-plugin ,html格式的报表中文显示总有乱码.修改各种配置始终解决不了. 最后痛下杀手,修改struts2-jasperreports-plugin的代码. 修改JasperReportConstants.java中的函数 doExecute,将...

Chief007的专栏 282

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

struts2 + jasperReport

出现的错误如下: There is no result type defined for type 'jasper' mapped with name 'success'...   原因: 缺少struts2中的包,请导入:struts2-jasperreports-plugin-2.1.6.jar ,就OK了!   struts2+jasperReport 一般报表常用到的包...

MyBlog 222

jasperreport struts

最近研究jasperreport整合struts2 总结一下以备后用struts2是借助于struts2-jasperreports-plugin-2.0.14.jar整合jasperreport的其中主要的实现在JasperReportsResult.class中的doExecute方法封装了生成报表的实现,是通过valuestatck得到数据源的,他实现了ValueStackDataSou

xLiGan的专栏 1387

struts2+JasperReports -jasperReports学习笔记 -gcode

安装JasperReports插件 其中奇怪的是JasperReports插件中的struts-plugin.xml中居然没有继承struts-default包。 修改,使继承struts-default包。     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"     "http://stru

J-胖子的专栏 856

struts2与jasperreport整合不能显示图片imgags/px

终结解决方案:Struts2整合JasperReport预览HTML格式不显示图片问题解决方案                 也许你不曾遇到如题问题,那恭喜你,但你是否会疑惑为何我没有遇到而你们却遇到这种问题呢,我们可都是应用的struts2框架哦!!!是啊,为什么呢?有兴趣的不妨看看这篇博文http://peterliuye.javaeye.com/blog/418001以及http://ww

435

JasperReport:几个莫名其妙的问题的解决

JasperReport各种莫名奇妙问题的解决 JasperReportC/S报表struts2struts2-jasperreport-plugin 也许你不曾遇到如题问题,那恭喜你,但你是否会疑惑为何我没有遇到而你们却遇到这种问题呢,我们可都是应用的struts2框架哦!!!是啊,为什么呢?有兴趣的不妨看看这篇博文http://peterliuye.javaeye.com...

熊诗言的博客 7578

Jsp引擎源码分析

查找Options类中配置项compilerClassName 使用类org.apache.jasper.compiler.JDTCompiler来创建 使用类org.apache.jasper.compiler.AntCompiler来创建 找到类以后通过反射来创建对象 ...

chuannaoxuan4674的博客 86

No tag "datetimepicker" defined 解决方法

错误提示:org.apache.jasper.JasperException: /struts2/index.jsp(16,3) No tag "datetimepicker" defined in tag library imported with prefix "s"  原因:struts2.1.6 把struts2.0中的和ajax相关的,如datetimepicker,tree,tr

Athenaer的专栏 700

Maven项目改造SpringBoot实战指南

SpringBoot作为Spring框架的再封装,通过约定优于配置的原则极大简化了Java EE开发。其核心价值在于统一的依赖管理(通过starter机制)、集中化的配置管理(application.yml/properties)以及内嵌Servlet容器支持。这些特性特别适合解决传统Maven项目中常见的依赖冲突、配置分散和部署复杂等问题。在实际工程实践中,将现有Maven项目迁移到SpringBoot架构可以显著提升开发效率,特别是在Web应用开发和微服务场景中。本文以真实项目改造为例,详细演示了从项目

weixin_33694172的博客 389
上一篇: jaxws soap webservice 使用apache cxf tool ——wsdl2java
下一篇: SOAP WebService实现WS-Security用户身份认证时间戳验证
johnsearcher
博客等级 码龄17年 12粉丝 55原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值