`
reymont
  • 浏览: 525888 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
严重: Cannot find any registered HttpDestinationFactory from the Bus. Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350) at org.apache.cxf.jaxws.End ...
在部署项目时,经常碰到Tomcat无法启动和关闭的现象。碰到这些情况时,一般是端口被占用。那么就需要了解启动和关闭的端口设置了。       Tomcat 修改关闭端口 一个server.xml中只能有一个Server节点,因为它代表着Tomcat自身。如果你需要两个server,就必须运行两个Tomcat实例。     <Server port="8005" shutdown="SHUTDOWN" debug="0">     Shutdown属性可以是任意字符串。当你调用带有stop指令的catal ...
Maven Archetype plugin是Maven用来创建新工程的工具。Archetypes给开源项目很大的帮助,像Apache Wicket、 Apache Cocoon等。这些项目使用Archetypes提供很多新项目的模板。Archetypes也可以帮助公司推行项目标准化。如果你是公司里的一个大团队中的成员,需要依照现有的项目创建新的项目,那么你可以利用团队中使用的archetype来创建新的项目。     有两种方式创建新工程   第一种直接创建   mvn archetype:generate \ -DgroupId=org.sonatype.mavenbook ...
mvn jetty:run有几个扩展命令   mvn jetty:run-war 先打包,让后再部署指定的war。如果不指定webApp,默认为${project.build.directory}/${project.build.finalName}.war   <project
  如果这个工程是标准的maven-webapp那么基本上不用修改,直接运行jetty:run就可以执行。   但是有时候会报错说   [ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Documents and Settings\reymont.li\.m2\repository ...
刚使用jetty时,完全不懂怎么配置。老是出现各种错误。就像下面这种     [ERROR] Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.19:run (default-cli) on project orderapp: Webapp source directory D:\resource\ApacheCXFBook\Chapter2\orderapp\src\main\webapp does not exist -> [Help 1]     一看,是工程不符MAVEN的标准。但是现在又不想 ...
apache cxf 2.4.6 samples\wsdl_first   输入命令mvn install -Pserver -X   检查报错   Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.apache.cxf.samples:wsdl_first:war:2.4.6: Could not find artifact org.apache.cxf:cxf-rt-transports-http-jet ...
apache cxf 2.4.6 samples\wsdl_first   输入命令mvn install -Pserver -X   检查报错   Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.apache.cxf.samples:wsdl_first:war:2.4.6: Could not find artifact org.apache.cxf:cxf-rt-transports-http-jet ...
  在国内, IT 项目团队的成员一般来自于各个部门。这些成员受到部门经理和项目经理的双重管理。因为项目本身的特性,临时性、唯一性和渐进明细性等,因此项目管理中的人力资源管理和传统的人力资源管理有所不同。   项目有明确的结束时间,项目经理需要在最短的时间内将项目团队整合成一个整体,按照项目计划中的要求完成项目。由于项目成员本身属于各个职能部门,各个职能部门的具体工作会影响项目成员进入项目的时间。这些工作需要项目经理快速的了解岗位状态, RACI 模型可以帮助项目经理。   RACI 是一个用以明确项目中的各个角色及其相关责任的相对直观的模型。有如下四种角色: ...
概述 Document是itext的基础,你可以添加文档数据(用户阅读的信息)和元数据(pdf内部使用的信息)。在创建document对象时,你可以定义page size,page color and page margins。   构造函数     查看一下API,Document的构造函数有三个。   其中第一个Document给size,color,margins都设置了默认值。查看源代码,默认为Document(PageSize.A4, 36, 36, 36, 36);   第二个构造函数就可以自定义页面的大小了,例如: Rectangle rect = new ...
起因:   在生成word文档时,一般都要求生成固定的页眉。页眉,即可以是文字也可以图片。对于程序员来说,图片可以简化开发的复杂度,对于用户来说可以丰富页眉的样式。于是我尝试使用itext生成rtf格式来获得包含图片页眉的word文档。   尝试1: 直接使用document.add(Image),可以看到图片在文本内,就算使用Image.setAbsolutePosition(),图片的位置仍然没有变化。     尝试2: 使用new HeaderFooter(Phrase,false)。貌似可以达到预期效果,但是你一看代码,就知道这是以代码的复杂性为代价的,而且会额外的 ...

itext pdftemplate使用

    博客分类:
  • PDF
在开发系统时,需要在PDF上写入总页数。于是在网上搜索到   iText加入页码   这篇文章。但是仍然不知道PdfTemplate是什么使用的。   在Itext in action 2006版 第14章刚好有个这个例子(14.2.3 PageXofY)   /* chapter14/PageXofY.java */ import java.io.FileOutputStream; import java.io.IOException; import com.lowagie.text.Document; import com.lowagie.text ...
读到itext in action第6章6.1.3,有个函数getDefaultCell(),查看该函数的API       PdfPCell com.lowagie.text.pdf.PdfPTable .getDefaultCell()   Gets the default PdfPCell that will be used as reference for all the addCell methods except addCell(PdfPCell) .   那么就是说你使用new PdfPCell就有border     那再 ...
IText中有三个处理text的类com.lowagie.text.Chunk,com.lowagie.text.Phrase,com.lowagie.text.Paragraph。 它们之间有什么区别呢?     Chunk   Chunk是IText最小的文本编辑单位。不能再拆分更小的单元。其他高级的文本对象都是基于Chunk的。请看下图 (注此图,来源自http://www.cnblogs.com/LifelongLearning/archive/2011/03/30/2000072.html)     package org.study.itext.tex ...
import junit.framework.TestCase; public class StringTest extends TestCase{ public void ntestRpad(){ System.out.println(rpad("1",3,"0")); } public void testLpad(){ System.out.println(lpad("1",3,"0")); } private String lpad(String s, int n, Str ...
Global site tag (gtag.js) - Google Analytics