- 浏览: 1127897 次
- 性别:
- 来自: 火星郊区
博客专栏
-
OSGi
浏览量:0
文章分类
- 全部博客 (695)
- 项目管理 (48)
- OSGi (122)
- java (79)
- Vaadin (5)
- RAP (47)
- mysql (40)
- Maven (22)
- SVN (8)
- 孔雀鱼 (10)
- hibernate (9)
- spring (10)
- css (3)
- 年审 (6)
- ant (1)
- jdbc (3)
- FusionCharts (2)
- struts (4)
- 决策分析 (2)
- 生活 (10)
- 架构设计 (5)
- 破解 (2)
- 狼文化 (4)
- JVM (14)
- J2EE (1)
- 应用服务器 (1)
- 我的链接 (5)
- 数学 (2)
- 报表 (1)
- 百科 (6)
- Flex (7)
- log4j (2)
- PHP (1)
- 系统 (2)
- Web前端 (7)
- linux (6)
- Office (1)
- 安全管理 (5)
- python (2)
- dom4j (1)
- 工作流 (3)
- 养生保健 (4)
- Eclipse (8)
- 监控开发 (1)
- 设计 (3)
- CAS (1)
- ZK (41)
- BluePrint (3)
- 工具 (1)
- SWT (7)
- google (2)
- NIO (1)
- 企业文化 (2)
- Windoes (0)
- RCP (7)
- JavaScript (10)
- UML (1)
- 产品经理 (2)
- Velocity (10)
- C (1)
- 单元测试 (1)
- 设计模式 (2)
- 系统分析师 (2)
- 架构 (4)
- 面试 (2)
- 代码走查 (1)
- MongoDB (1)
- 企业流程优化 (1)
- 模式 (1)
- EJB (1)
- Jetty (1)
- Git (13)
- IPV6 (1)
- JQuery (8)
- SSH (1)
- mybatis (10)
- SiteMesh (2)
- JSTL (1)
- veloctiy (1)
- Spring MVC (1)
- struts2 (3)
- Servlet (1)
- 权限管理 (1)
- Java Mina (1)
- java 系统信息 (6)
- OSGi 基础 (3)
- html (1)
- spring--security (6)
- HTML5 (1)
- java爬虫搜索 (1)
- mvc (3)
最新评论
-
Tom.X:
http://osgia.com/
将web容器置于OSGi框架下进行web应用的开发 -
chenyuguxing:
你好, 为什么我的bundle export到felix工程中 ...
在Apache Felix中运行bundle -
string2020:
<niceManifest>true</ni ...
Bundle Plugin for Maven -
jsonmong:
OSGI,是未来的主流,目前已相当成熟。应用OSGI比较好的, ...
基于OSGi的声明式服务 -
zyhui98:
貌似是翻译过来的,有很少人在linux上做开发吧
如何成为“10倍效率”开发者
1 、解决 rap 字符集乱码的问题
字符集问题,解决办法: 在plugin.xml - build.properties 中添加
javacDefaultEncoding.. = UTF-8 即可解决字符集乱码
2、解决web前台输入乱码问题
使用传统的 字符集过滤器
写一个过滤器类
- <span style= "font-size: small;" > public class CharacterEncodingFilter implements Filter
- {
- private String edcoding;
- private FilterConfig filterConfig;
- private boolean ignore;
- public CharacterEncodingFilter()
- {
- this .edcoding = null ;
- this .filterConfig = null ;
- this .ignore = true ; }
- public void destroy() {
- this .edcoding = null ;
- this .filterConfig = null ;
- }
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException
- {
- if (( this .ignore) || (request.getCharacterEncoding() == null )) {
- String encoding = setCharacterEncoding(request);
- if (encoding != null )
- request.setCharacterEncoding(encoding)
- }
- filterChain.doFilter(request, response);
- }
- public void init(FilterConfig filterConfig) throws ServletException {
- this .filterConfig = filterConfig;
- this .edcoding = filterConfig.getInitParameter( "encoding" );
- String value = filterConfig.getInitParameter("ignore" );
- if (value == null )
- this .ignore = true ;
- else if (value.equalsIgnoreCase( "true" )) {
- this .ignore = true ;
- }
- else
- this .ignore = false ;
- }
- public String setCharacterEncoding(ServletRequest request)
- {
- return this .edcoding;
- }
- }
- </span>
然后达成 jar 包方式到 war /WEB_INF/lib 目录下面
在 web.xml 添加
rap 导出 war 包时,编码问题处理,加入了字符过滤器的处理方式
1. 在导出 WAR 后,修改 war 包里面的 web.xml 文件,添加过滤器,
内容如下
- <span style= "font-size: small;" ><span> <filter>
- <filter-name>CharacterEncodingFilter</filter-name>
- <filter-class >com.encoding.CharacterEncodingFilter</filter- class >
- <init-param>
- <param-name>encoding</param-name>
- <param-value>UTF-8 </param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>CharacterEncodingFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- </span>
- </span>
2. 增加 jar 包
把过滤器要用的 jar 包【 encoding.jar 】添加到导出的 WAR 包的 lib 下面,这样 WAR 包加载后,能够找寻到过滤器用到的类。
上面 2 部分可以保证完美的解决中文问题
发表评论
-
RCP开发者的好去处之ICON系列(持续更新中... ...)
2012-03-31 10:13 1097为了找个合适的图片是不是头大的不像样子了?OK,我现在就 ... -
RAP 整合 Spring (基于 Spring-osgi )
2012-03-31 10:12 1357RAP 介绍请见: http://www.eclipse. ... -
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
2012-03-25 14:50 1431引用 在rcp的路径添加了mysql驱动,并添加之cla ... -
解决JFace Dialog中ScrollComposite无法滚动
2012-03-26 10:26 1553今天写了一个Jface的dialog,作为配置界面,其中有 ... -
SWT实现弹出日历控件
2012-03-27 08:00 2544实现像网页上的那种用户单击一个Text框然后框下面出现一个日历 ... -
JFace进度条
2012-03-27 08:01 1087Java代码 someB ... -
getConfigurationElementsFor 无法获得扩展点的信息
2012-03-26 10:27 1067做项目的时候RCP程序在eclipse调试环境下面运行正常 ... -
测试rcp 和 rap 何时触发 组建.addListener(SWT.xxx, new Listener() )的方法
2012-02-24 14:22 1240Java代码 直接通过反射让组建监 ... -
RAP 界面显示不完全的问题
2012-02-24 14:22 1181rap运行第一刷新界面总是刷新不完整,组件错位,后台报Layo ... -
Uploading files with RAP 1.4
2012-02-17 11:37 1583One of the new things in RAP 1. ... -
【RAP】CAS PIA 快速浏览入口地址
2012-02-07 08:23 1213下面的链接是访问RAP应用的入口。有2中方式,图片上已经注明。 ... -
RAP 与 RCP的区别
2012-02-07 08:23 1296RAP 可以让开发人员使用 JAVA API 和按照 E ... -
将Eclipse RAP部署到Tomcat中
2012-02-07 08:23 1099在上次成功将我的RCP项目迁移到浏览器中运行后,开始研究 ... -
RAP(Rich AJAX Platform)的可部署文件下载
2012-02-07 08:24 1111这是我自己做的RAP的可部署文件,可以下载下来解压到Tom ... -
Eclipse rcp/rap 开发经验总结(15) -rap如何使用js
2012-02-03 08:11 14051. 把输入的字符串当 javascript 执行 ... -
Eclipse rcp/rap 开发经验总结(14) -rap 图片、数据缓存处理
2012-02-03 08:10 1473一、概述 在进行了 rap 的基本学习之后,您对 rap ... -
Eclipse rcp/rap 开发经验总结(13) -Rap/Rcp保存按钮处理方式
2012-02-03 08:10 1051一、概述 在做项目的过程中,处理编辑区的保存机制的时候。发 ... -
Eclipse rcp/rap 开发经验总结(12) -Rap 优化之组件的销毁
2012-02-03 08:10 824一、概述 经过几个月的rap 项目实战,总结了一些小 ... -
Eclipse rcp/rap 开发经验总结(11) -rcp/rap与spring ibatis集成
2012-02-03 08:10 12741. rcp/rap 与 spring 集成 Activa ... -
Eclipse rcp/rap 开发经验总结(10) -Rap不同系统间的差异和处理方式
2012-02-01 08:01 1358平常进行 rap 程序开发一般都是在 win ...
相关推荐
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-linux-gtk-x86_64.tar.gz) 适用于Linux x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-win32-x86_64.zip) 适用于Windows x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-linux-gtk-aarch64.tar.gz) 适用于Linux aarch64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-macosx-cocoa-x86_64.dmg) 适用于macOS x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-macosx-cocoa-aarch64.dmg) 适用于macOS aarch64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
linux x86(AMD) 下 RCP 开发工具 eclipse-rcp-2020-06-R-linux-x86
Eclipse RCP富客户端平台,基于Eclipse开发的。
eclipse plug-in/rcp 开发方法详解第二部分
eclipse rcp应用系统开发方法与实战源代码.zip
Eclipse IDE for RCP and RAP Developers (includes Incubating components) Version: 2020-06 (4.16.0) Build id: 20200615-1200
Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT
http://downloads.myeclipseide.com/downloads/products/eworkbench/galileo/myeclipse-8.0.0-win32.exe eclipse\eclipse-RCP-SDK-3.0.1-win32.zip
eclipse plug-in/rcp 开发方法详解第三部分 随书光盘
Eclipse RCP 软件打包发布方法。之前花了5分下了一个教材,更不不好用。现在自己摸索写了一个,绝对赞~
Eclipse RCP允许开发者使用eclipse结构风格设计弹性的可扩展的应用程序,可重用Eclipse中已存在的方法和编码模式。俗话说,万事开头难。Eclipse RCP入手可能会比较困难、费时。接下来我们将主要讲述如何让RCP工作. ...
eclipse RCP Plug-in开发自学教程 , 只要java基础好,自学没问题的。。。
Eclipse RCP应用系统开发方法与实战
eclipse-rcp-indigo-SR2-win32-x86_64,根据所需可供下载
eclipse plug-in/rcp 开发方法详解 pdf 第一部分
eclipse-rcp-juno-SR2-win32-x86_64,根据所需进行下载。