我的評論
re: 音頻、視頻格式大全 gembin 2012-03-03 11:59
要什么要啊 日
re: 精品Ajax圖書下載 gembin 2010-07-10 22:04
@papermoonsun
要哪本?
要哪本?
re: Microsoft Robotics Developer Studio 2008 Standard Edition free download gembin 2010-04-19 18:27
能下在阿,最好用JDownloader
re: Microsoft Robotics Developer Studio 2008 Standard Edition free download gembin 2010-03-20 15:37
要下載所有的包,并按順序命名才能解壓。
比如,可以重命名為:
1.rar
2.rar
...
5.rar
比如,可以重命名為:
1.rar
2.rar
...
5.rar
re: [原創]Example for GraniteDS v1.2.0 OSGi bundle gembin 2009-06-09 21:57
Sorry, the ant file is generated by eclipse and i didn't use it.
Maybe there are some problems.
Why not just use Eclipse to compile the code and export it as a bundle. it should work!
Maybe there are some problems.
Why not just use Eclipse to compile the code and export it as a bundle. it should work!
re: Seam 錯誤:org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role gembin 2009-04-13 14:51
PersistenceContextType.EXTENDED, This only applies to stateful session beans?
re: EJB3 學習Notes 1。 gembin 2009-02-25 14:43
hehe 剛才還沒寫完。。。
re: 百家講壇-武則天(蒙曼) mp3 gembin 2009-02-23 23:36
估計時間長了,頁面被刪除了。。。。
re: [原創]Example for GraniteDS v1.2.0 OSGi bundle gembin 2008-12-21 00:57
it seems the required bundle javax.xml_1.3.4.v200806030440.jar is not installed, so the ManifestMetadataParser cannot parse the granite-osgi.xml, which will be result in the data service not registered and also osgi EventAdmin is required(org.eclipse.equinox.event_1.1.0.v20080225.jar).. you can find it in the eclipse plugins directory.
Note: the flex file (i.e. sample.mxml) should be compiled using the WebContent Context
Note: the flex file (i.e. sample.mxml) should be compiled using the WebContent Context
re: [原創] Adding OSGi support to graniteds v1.1.0 gembin 2008-12-05 21:30
i'm very happy to contribute!
re: 關于權限控制策略的討論 gembin 2008-12-04 11:54
Refer to OSGi UserAdmin
re: ActionScript 3.0 Game Programming University gembin 2008-11-11 15:14
我能打開啊,用Acrobat7
re: 一篇比較全面的Flash&Flex相關技術資源大全(轉) gembin 2008-10-10 18:14
恩 不錯!
re: 7個強大超酷的CSS導航菜單 gembin 2008-09-24 11:27
是啊都是轉的,呵呵
re: javasvn gembin 2008-09-12 10:38
能否提供代碼,本人正需要,謝謝
re: "音量控制器"下載 gembin 2008-08-01 21:46
每什么用啊 呵呵
re: 談談osgi中的事件機制 gembin 2008-07-31 14:00
期待深入的講解。。。
re: 這日子過得~~~~~ gembin 2008-07-29 13:39
自己學東西阿
re: 精品Ajax圖書下載 gembin 2008-07-22 15:55
@cyber
80多MB怎么發
80多MB怎么發
re: 精品Ajax圖書下載[未登錄] gembin 2008-07-11 14:39
@doyowei
挑幾個吧,少點,一般說都想要的我都沒發,實在太大了
挑幾個吧,少點,一般說都想要的我都沒發,實在太大了
re: Oracle收購BEA——如何看待J2EE中間件的價值 gembin 2008-07-06 10:24
hao !
re: JSF1.2 +Spring2.0 +Hibernate3.2 gembin 2008-06-16 13:37
java.lang.NoClassDefFoundError: org/apache/commons/digester/RuleSet
看樣子是少commons-digester 包把
看樣子是少commons-digester 包把
re: 精品Ajax圖書下載 gembin 2008-06-13 19:50
@王應天
我這沒有源碼
我這沒有源碼
re: JSF1.2 +Spring2.0 +Hibernate3.2 gembin 2008-06-12 00:03
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!--servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet-->
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<application>
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver
</variable-resolver>
<!-- locale-config>
<default-locale>en</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>es</supported-locale>
</locale-config>
<message-bundle>messages</message-bundle-->
</application>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!--servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet-->
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<application>
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver
</variable-resolver>
<!-- locale-config>
<default-locale>en</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>es</supported-locale>
</locale-config>
<message-bundle>messages</message-bundle-->
</application>
re: JSF1.2 +Spring2.0 +Hibernate3.2 gembin 2008-06-11 23:56
RichFaces3.2.0+Spring2.5.4 +Hibernate3.2 怎么配置
我的 BackingBean Setter方法里設的值總是 NULL
我的 BackingBean Setter方法里設的值總是 NULL
re: 當前階段在項目中選擇jsf技術的一些建議 gembin 2008-05-31 22:16
如何集成Myfaces和OSGi!??
re: FCKeditor與JSF的整合 gembin 2008-05-28 23:05
等到現在還沒發給我。。。。。。。。。。。。 :(
re: Eclipse Rich Ajax Platform (RAP)開發環境的配置 gembin 2008-05-28 16:50
@盼回復
http://127.0.0.1:4469/rap?startup=XXXX
Plugin.xml
<extension
point="org.eclipse.rap.ui.entrypoint">
<entrypoint
class="rap.Application"
parameter="XXXX"
id="rap.Application">
</entrypoint>
</extension>
http://127.0.0.1:4469/rap?startup=XXXX
Plugin.xml
<extension
point="org.eclipse.rap.ui.entrypoint">
<entrypoint
class="rap.Application"
parameter="XXXX"
id="rap.Application">
</entrypoint>
</extension>
re: 讓OSGi支持JSF Web開發 gembin 2008-05-25 18:20
給我發1份Demo,急需阿,十分感謝!!gembin@gmail.com
請問如何讓JBoss的Ajax4JSF,RichFaces運行在OSGi 環境下
請問如何讓JBoss的Ajax4JSF,RichFaces運行在OSGi 環境下
re: 中國首支自發抗震救災隊伍-老板”帶60臺工程機械,幾乎與軍隊同時抵達了災區 gembin 2008-05-19 18:44
不會把,四川汶川阿,地球人都知道了
re: Web信息抽取技術縱覽一 gembin 2008-05-15 22:49
太理論了吧,有沒實際點的。。。
re: Eclipse Rich Ajax Platform (RAP)開發環境的配置 gembin 2008-05-13 15:55
Web容器中部署RAP
RAP的運行依賴于OSGI框架,而對于現有的JEE Web容器一般都不提供直接支持OSGI的能力。因此部署RAP的過程實際上相當與部署OSGI框架的過程。以下用Eclipse中集成的OSGI框架equinox為例介紹部署過程。
1. 首先需要下載equinox和servlet容器集成的工具包org.eclipse.equinox.servletbridge。可以通過eclipse的cvs站點(http://www.eclipse.org/equinox/server/downloads/servletbridge-anon.psf)下載這個項目集;
2. 針對RAP項目創建一個feature項目(過程同RCP);
3. 根據RAP項目的依賴創建feature項目的插件依賴;
為了讓OSGI框架和RAP應用能在應用服務器中部署運行,必須包含如下插件依賴:
必須依賴插件
<plugin
id="org.eclipse.core.commands"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.contenttype"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.expressions"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.jobs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.runtime"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.app"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.registry"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.servlet"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.servletbridge"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.preferences"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.registry"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.osgi"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.osgi.services"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.jface"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.rwt"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.ui.workbench"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.update.configurator"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
版本號必須設置為0.0.0以便于pde工具導出依賴插件的時候能夠同步版本號。
4. 在feature項目得根目錄創建script(存放構建腳本)文件夾和templates(存放標準Web應用格式文件)文件夾;
5. 在script文件夾下創建一個ant構建文件;
webappBuilder.xml
<?xml version="1.0"?>
<project name="project" default="default">
<description>
Example of a webapplication build script for RAP applications that use
the equinox servlet bridge to run in a servlet container.
</description>
<!-- =================================
target: init
================================= -->
<target name="init">
<property name="proj.dir" value="${basedir}/.." />
<!--
This script assumes that the servlet bridge project is available
in the current workspace. Note: The location is hardcoded and must be
adjusted to your needs.
-->
<property name="servletbridge.dir"
value="D:/RAP/eclipse/workspace/org.eclipse.equinox.servletbridge" />
<!--
On windows be cautious about long file names for ${build.dir}
These long path problems were resolved in JRE 1.5.0_08
-->
<property name="build.dir" value="${proj.dir}/build" />
<property name="templates.dir" value="${proj.dir}/templates" />
<property name="webapp.name" value="xwiki" />
<property name="features" value="rcp.feature" />
<!--
If you are using this script in a head-less build define the following properties:
"ignore.pdeExportFeatures" (available only in the IDE - do the feature export with PDE Build)
"ignore.servletbridge.jar" (if you're compiling or extracting the jar yourself)
-->
</target>
<!-- =================================
target: prepare
================================= -->
<target name="prepare" depends="init">
<delete dir="${build.dir}/${webapp.name}" />
<mkdir dir="${build.dir}/${webapp.name}/WEB-INF/lib" />
</target>
<!-- =================================
target: default
================================= -->
<target name="default"
depends="copyResources, servletbridge.jar, pdeExportFeatures" />
<!-- =================================
target: copyResources
================================= -->
<target name="copyResources" depends="prepare">
<copy todir="${build.dir}/${webapp.name}">
<fileset dir="${templates.dir}" />
</copy>
</target>
<!-- =================================
target: servletbridge.jar
================================= -->
<target name="servletbridge.jar"
depends="prepare"
unless="ignore.servletbridge.jar">
<antcall target="jar-servletbridge.jar" />
<antcall target="copy-servletbridge.jar" />
</target>
<!-- =================================
target: copy-servletbridge.jar
================================= -->
<target name="copy-servletbridge.jar" if="servletbridge.jar-present">
<copy todir="${build.dir}/${webapp.name}/WEB-INF/lib">
<fileset file="${servletbridge.dir}/servletbridge.jar" />
</copy>
</target>
<!-- =================================
target: jar-servletbridge.jar
================================= -->
<target name="jar-servletbridge.jar" unless="servletbridge.jar-present">
<jar destfile="${build.dir}/${webapp.name}/WEB-INF/lib/servletbridge.jar">
<fileset dir="${servletbridge.dir}/bin">
<include name="**/*.class" />
</fileset>
</jar>
</target>
<!-- =================================
target: pdeExportFeatures
================================= -->
<target name="pdeExportFeatures"
depends="prepare"
unless="ignore.pdeExportFeatures">
<!--
Features get built asynchronously but this approach is sometimes convenient.
So that the pde.exportFeatures task is available in the IDE select
"Run in the same JRE as the workspace" from the JRE tab from "Run Ant.."
-->
<pde.exportFeatures features="${features}"
destination="${build.dir}/${webapp.name}/WEB-INF/eclipse"
exportType="directory"
useJARFormat="true"
exportSource="false" />
</target>
</project>
6. 在templates文件夾下創建如下文件結構;
WEB-INF
|--eclipse
| |--configuration
| | |--config.ini
| |--launch.ini
|--web.xml
launch.ini
# Eclipse Runtime Configuration Overrides
# These properties are loaded prior to starting the framework and can also be used to override System Properties
# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
# "*" can be used together with @null to clear System Properties that match a prefix name.
osgi.*=@null
org.osgi.*=@null
eclipse.*=@null
osgi.parentClassloader=app
osgi.contextClassLoaderParent=app
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<display-name>Equinox Bridge Servlet</display-name>
<description>Equinox Bridge Servlet</description>
<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
<init-param>
<param-name>commandline</param-name>
<param-value>-console</param-value>
</init-param>
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>true</param-value>
</init-param>
<!--
org.eclipse.equinox.servletbridge and the Servlet API are exported automatically to the underlying OSGi framework.
The extendedFrameworkExports parameter allows the specification of additional java package exports.
The format is a comma separated list of exports as specified by the "Export-Package" bundle manifest header.
For example: com.mycompany.exports; version=1.0.0, com.mycompany.otherexports; version=1.0.0
-->
<init-param>
<param-name>extendedFrameworkExports</param-name>
<param-value></param-value>
</init-param>
<!--
You can specify your own framework launcher here.
The default is: org.eclipse.equinox.servletbridge.FrameworkLauncher
<init-param>
<param-name>frameworkLauncherClass</param-name>
<param-value>org.eclipse.equinox.servletbridge.FrameworkLauncher</param-value>
</init-param>
-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!--
This is required if your application bundles expose JSPs.
-->
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
</web-app>
7. 用ant執行script下的構建腳本;
再用Ant執行腳本的時候,應當把JRE標簽下的"Run in the same JRE as the workspace"選中,否則PDE工具可能無法導出依賴插件。
8. 編輯configration目錄下的config.ini文件,根據項目需要設定bundles,可用如下程序生成后拷貝到config.ini文件中。
ConfigIniCreator.java
/*******************************************************************************
* Copyright (c) 2002-2006 Innoopract Informationssysteme GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Innoopract Informationssysteme GmbH - initial API and implementation
******************************************************************************/
package org.eclipse.rap.tools;
import java.io.File;
/**
* <p>This tool creates the content of a simple config.ini file.
* Run this after the ANT build scripts (webappBuilder.xml and the
* pde.exportFeatures) have finished. After that replace the content
* of the config.ini file in the build.</p>
*
* <p>Note: this is not meant to be a high end deployment tool or the only
* possibility of how the content of your config.ini should look like if you
* are creating a RAP WAR. This should simplify the task to get
* a minimalistic runtime configuration that works...</p>
*/
public class ConfigIniCreator {
public static void main( final String[] arx ) {
////////////////////////////////////////////////////////////////////////////
// replace this with the absolute path to the plugin directory of
// the deployment build for example
// File file = new File( "C:\\projects\\org.eclipse.rap\\org.eclipse.rap.demo.feature\\build\\rapdemo\\WEB-INF\\eclipse\\plugins" );
File file = new File( "D:\\RAP\\eclipse\\workspace\\rcp.feature\\build\\xwiki\\WEB-INF\\eclipse\\plugins" );
////////////////////////////////////////////////////////////////////////////
String[] list = file.list();
StringBuffer buffer = new StringBuffer();
buffer.append( "#Eclipse Runtime Configuration File\n" );
buffer.append( "osgi.bundles=" );
for( int i = 0; i < list.length; i++ ) {
if( list[ i ].endsWith( ".jar" )
&& !list[ i ].startsWith( "org.eclipse.osgi_" ) )
{
buffer.append( list[ i ] );
if( list[ i ].startsWith( "org.eclipse.equinox.common_" ) ) {
buffer.append( "@2:start" );
} else {
buffer.append( "@start" );
}
if( i + 1 < list.length ) {
buffer.append( "," );
}
}
}
buffer.append( "\n" );
buffer.append( "osgi.bundles.defaultStartLevel=4\n" );
// write the content to the console
System.out.print( buffer );
}
}
在控制臺上可看到類似信息:
config.ini
#Eclipse Runtime Configuration File
osgi.bundles=org.eclipse.core.commands_3.3.0.I20070605-0010.jar@start,
org.eclipse.core.contenttype_3.2.100.v20070319.jar@start,
org.eclipse.core.expressions_3.3.0.v20070606-0010.jar@start,
org.eclipse.core.jobs_3.3.0.v20070423.jar@start,
org.eclipse.core.runtime_3.3.100.v20070530.jar@start,
org.eclipse.equinox.app_1.0.0.v20070606.jar@start,
org.eclipse.equinox.common_3.3.0.v20070426.jar@2:start,
org.eclipse.equinox.http.registry_1.0.0.jar@start,
org.eclipse.equinox.http.servletbridge_1.0.0.jar@start,
org.eclipse.equinox.http.servlet_1.0.0.jar@start,
org.eclipse.equinox.preferences_3.2.100.v20070522.jar@start,
org.eclipse.equinox.registry_3.3.0.v20070522.jar@start,
org.eclipse.osgi.services_3.1.200.v20070605.jar@start,
org.eclipse.rap.jface_1.0.0.jar@start,
org.eclipse.rap.rwt_1.0.0.jar@start,
org.eclipse.rap.ui.workbench_1.0.0.jar@start,
org.eclipse.rap.ui_1.0.0.jar@start,
org.eclipse.update.configurator_1.0.0.jar@start,
rcp_1.0.0.jar@start
osgi.bundles.defaultStartLevel=4
9. 構建完成,打包應用(用jar命令歸檔為一個war文件);
10. 拷貝到Web容器相應的Web應用目錄下,或采用Web服務器的部署工具部署。
RAP的運行依賴于OSGI框架,而對于現有的JEE Web容器一般都不提供直接支持OSGI的能力。因此部署RAP的過程實際上相當與部署OSGI框架的過程。以下用Eclipse中集成的OSGI框架equinox為例介紹部署過程。
1. 首先需要下載equinox和servlet容器集成的工具包org.eclipse.equinox.servletbridge。可以通過eclipse的cvs站點(http://www.eclipse.org/equinox/server/downloads/servletbridge-anon.psf)下載這個項目集;
2. 針對RAP項目創建一個feature項目(過程同RCP);
3. 根據RAP項目的依賴創建feature項目的插件依賴;
為了讓OSGI框架和RAP應用能在應用服務器中部署運行,必須包含如下插件依賴:
必須依賴插件
<plugin
id="org.eclipse.core.commands"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.contenttype"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.expressions"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.jobs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.runtime"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.app"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.registry"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.servlet"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.servletbridge"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.preferences"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.registry"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.osgi"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.osgi.services"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.jface"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.rwt"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.rap.ui.workbench"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.update.configurator"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
版本號必須設置為0.0.0以便于pde工具導出依賴插件的時候能夠同步版本號。
4. 在feature項目得根目錄創建script(存放構建腳本)文件夾和templates(存放標準Web應用格式文件)文件夾;
5. 在script文件夾下創建一個ant構建文件;
webappBuilder.xml
<?xml version="1.0"?>
<project name="project" default="default">
<description>
Example of a webapplication build script for RAP applications that use
the equinox servlet bridge to run in a servlet container.
</description>
<!-- =================================
target: init
================================= -->
<target name="init">
<property name="proj.dir" value="${basedir}/.." />
<!--
This script assumes that the servlet bridge project is available
in the current workspace. Note: The location is hardcoded and must be
adjusted to your needs.
-->
<property name="servletbridge.dir"
value="D:/RAP/eclipse/workspace/org.eclipse.equinox.servletbridge" />
<!--
On windows be cautious about long file names for ${build.dir}
These long path problems were resolved in JRE 1.5.0_08
-->
<property name="build.dir" value="${proj.dir}/build" />
<property name="templates.dir" value="${proj.dir}/templates" />
<property name="webapp.name" value="xwiki" />
<property name="features" value="rcp.feature" />
<!--
If you are using this script in a head-less build define the following properties:
"ignore.pdeExportFeatures" (available only in the IDE - do the feature export with PDE Build)
"ignore.servletbridge.jar" (if you're compiling or extracting the jar yourself)
-->
</target>
<!-- =================================
target: prepare
================================= -->
<target name="prepare" depends="init">
<delete dir="${build.dir}/${webapp.name}" />
<mkdir dir="${build.dir}/${webapp.name}/WEB-INF/lib" />
</target>
<!-- =================================
target: default
================================= -->
<target name="default"
depends="copyResources, servletbridge.jar, pdeExportFeatures" />
<!-- =================================
target: copyResources
================================= -->
<target name="copyResources" depends="prepare">
<copy todir="${build.dir}/${webapp.name}">
<fileset dir="${templates.dir}" />
</copy>
</target>
<!-- =================================
target: servletbridge.jar
================================= -->
<target name="servletbridge.jar"
depends="prepare"
unless="ignore.servletbridge.jar">
<antcall target="jar-servletbridge.jar" />
<antcall target="copy-servletbridge.jar" />
</target>
<!-- =================================
target: copy-servletbridge.jar
================================= -->
<target name="copy-servletbridge.jar" if="servletbridge.jar-present">
<copy todir="${build.dir}/${webapp.name}/WEB-INF/lib">
<fileset file="${servletbridge.dir}/servletbridge.jar" />
</copy>
</target>
<!-- =================================
target: jar-servletbridge.jar
================================= -->
<target name="jar-servletbridge.jar" unless="servletbridge.jar-present">
<jar destfile="${build.dir}/${webapp.name}/WEB-INF/lib/servletbridge.jar">
<fileset dir="${servletbridge.dir}/bin">
<include name="**/*.class" />
</fileset>
</jar>
</target>
<!-- =================================
target: pdeExportFeatures
================================= -->
<target name="pdeExportFeatures"
depends="prepare"
unless="ignore.pdeExportFeatures">
<!--
Features get built asynchronously but this approach is sometimes convenient.
So that the pde.exportFeatures task is available in the IDE select
"Run in the same JRE as the workspace" from the JRE tab from "Run Ant.."
-->
<pde.exportFeatures features="${features}"
destination="${build.dir}/${webapp.name}/WEB-INF/eclipse"
exportType="directory"
useJARFormat="true"
exportSource="false" />
</target>
</project>
6. 在templates文件夾下創建如下文件結構;
WEB-INF
|--eclipse
| |--configuration
| | |--config.ini
| |--launch.ini
|--web.xml
launch.ini
# Eclipse Runtime Configuration Overrides
# These properties are loaded prior to starting the framework and can also be used to override System Properties
# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
# "*" can be used together with @null to clear System Properties that match a prefix name.
osgi.*=@null
org.osgi.*=@null
eclipse.*=@null
osgi.parentClassloader=app
osgi.contextClassLoaderParent=app
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<display-name>Equinox Bridge Servlet</display-name>
<description>Equinox Bridge Servlet</description>
<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
<init-param>
<param-name>commandline</param-name>
<param-value>-console</param-value>
</init-param>
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>true</param-value>
</init-param>
<!--
org.eclipse.equinox.servletbridge and the Servlet API are exported automatically to the underlying OSGi framework.
The extendedFrameworkExports parameter allows the specification of additional java package exports.
The format is a comma separated list of exports as specified by the "Export-Package" bundle manifest header.
For example: com.mycompany.exports; version=1.0.0, com.mycompany.otherexports; version=1.0.0
-->
<init-param>
<param-name>extendedFrameworkExports</param-name>
<param-value></param-value>
</init-param>
<!--
You can specify your own framework launcher here.
The default is: org.eclipse.equinox.servletbridge.FrameworkLauncher
<init-param>
<param-name>frameworkLauncherClass</param-name>
<param-value>org.eclipse.equinox.servletbridge.FrameworkLauncher</param-value>
</init-param>
-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!--
This is required if your application bundles expose JSPs.
-->
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
</web-app>
7. 用ant執行script下的構建腳本;
再用Ant執行腳本的時候,應當把JRE標簽下的"Run in the same JRE as the workspace"選中,否則PDE工具可能無法導出依賴插件。
8. 編輯configration目錄下的config.ini文件,根據項目需要設定bundles,可用如下程序生成后拷貝到config.ini文件中。
ConfigIniCreator.java
/*******************************************************************************
* Copyright (c) 2002-2006 Innoopract Informationssysteme GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Innoopract Informationssysteme GmbH - initial API and implementation
******************************************************************************/
package org.eclipse.rap.tools;
import java.io.File;
/**
* <p>This tool creates the content of a simple config.ini file.
* Run this after the ANT build scripts (webappBuilder.xml and the
* pde.exportFeatures) have finished. After that replace the content
* of the config.ini file in the build.</p>
*
* <p>Note: this is not meant to be a high end deployment tool or the only
* possibility of how the content of your config.ini should look like if you
* are creating a RAP WAR. This should simplify the task to get
* a minimalistic runtime configuration that works...</p>
*/
public class ConfigIniCreator {
public static void main( final String[] arx ) {
////////////////////////////////////////////////////////////////////////////
// replace this with the absolute path to the plugin directory of
// the deployment build for example
// File file = new File( "C:\\projects\\org.eclipse.rap\\org.eclipse.rap.demo.feature\\build\\rapdemo\\WEB-INF\\eclipse\\plugins" );
File file = new File( "D:\\RAP\\eclipse\\workspace\\rcp.feature\\build\\xwiki\\WEB-INF\\eclipse\\plugins" );
////////////////////////////////////////////////////////////////////////////
String[] list = file.list();
StringBuffer buffer = new StringBuffer();
buffer.append( "#Eclipse Runtime Configuration File\n" );
buffer.append( "osgi.bundles=" );
for( int i = 0; i < list.length; i++ ) {
if( list[ i ].endsWith( ".jar" )
&& !list[ i ].startsWith( "org.eclipse.osgi_" ) )
{
buffer.append( list[ i ] );
if( list[ i ].startsWith( "org.eclipse.equinox.common_" ) ) {
buffer.append( "@2:start" );
} else {
buffer.append( "@start" );
}
if( i + 1 < list.length ) {
buffer.append( "," );
}
}
}
buffer.append( "\n" );
buffer.append( "osgi.bundles.defaultStartLevel=4\n" );
// write the content to the console
System.out.print( buffer );
}
}
在控制臺上可看到類似信息:
config.ini
#Eclipse Runtime Configuration File
osgi.bundles=org.eclipse.core.commands_3.3.0.I20070605-0010.jar@start,
org.eclipse.core.contenttype_3.2.100.v20070319.jar@start,
org.eclipse.core.expressions_3.3.0.v20070606-0010.jar@start,
org.eclipse.core.jobs_3.3.0.v20070423.jar@start,
org.eclipse.core.runtime_3.3.100.v20070530.jar@start,
org.eclipse.equinox.app_1.0.0.v20070606.jar@start,
org.eclipse.equinox.common_3.3.0.v20070426.jar@2:start,
org.eclipse.equinox.http.registry_1.0.0.jar@start,
org.eclipse.equinox.http.servletbridge_1.0.0.jar@start,
org.eclipse.equinox.http.servlet_1.0.0.jar@start,
org.eclipse.equinox.preferences_3.2.100.v20070522.jar@start,
org.eclipse.equinox.registry_3.3.0.v20070522.jar@start,
org.eclipse.osgi.services_3.1.200.v20070605.jar@start,
org.eclipse.rap.jface_1.0.0.jar@start,
org.eclipse.rap.rwt_1.0.0.jar@start,
org.eclipse.rap.ui.workbench_1.0.0.jar@start,
org.eclipse.rap.ui_1.0.0.jar@start,
org.eclipse.update.configurator_1.0.0.jar@start,
rcp_1.0.0.jar@start
osgi.bundles.defaultStartLevel=4
9. 構建完成,打包應用(用jar命令歸檔為一個war文件);
10. 拷貝到Web容器相應的Web應用目錄下,或采用Web服務器的部署工具部署。
re: 精品Ajax圖書下載 gembin 2008-05-12 14:20
@kerry
無法到達以下收件人:
kerrywu.tw@yahoo.com.tw,時間為 5/12/2008 1:44 PM
電子郵件系統無法傳遞此郵件,但未報告具體原因。請檢查郵件地址,然后重新發送。如果再次失敗,請與系統管理員聯系。
< host mx1.mail.tw.yahoo.com[203.188.197.9] said: 554 delivery error: dd Sorry your message to kerrywu.tw@yahoo.com.tw cannot be delivered because it is too large. - mta186.mail.tp2.yahoo.com (in reply to end of DATA command)>
請確認Yahoo的郵箱能否接收11MB的收件。。。。。
無法到達以下收件人:
kerrywu.tw@yahoo.com.tw,時間為 5/12/2008 1:44 PM
電子郵件系統無法傳遞此郵件,但未報告具體原因。請檢查郵件地址,然后重新發送。如果再次失敗,請與系統管理員聯系。
< host mx1.mail.tw.yahoo.com[203.188.197.9] said: 554 delivery error: dd Sorry your message to kerrywu.tw@yahoo.com.tw cannot be delivered because it is too large. - mta186.mail.tp2.yahoo.com (in reply to end of DATA command)>
請確認Yahoo的郵箱能否接收11MB的收件。。。。。
re: 精品Ajax圖書下載 gembin 2008-05-12 13:35
@thinkfree
具體要哪本,太大了不好發幾百MB呢,需要哪個發哪個把
具體要哪本,太大了不好發幾百MB呢,需要哪個發哪個把
re: OSGi Bundle Repository(OBR) gembin 2008-05-08 22:06
OSGi 的Deployment Admin 怎么用?
用的是FELIX的Impl
FileInputStream in= new FileInputStream(bundleLocation);
DeploymentPackage dPackage=deployAdmin.installDeploymentPackage(in);
卻得到各DeploymentException ERROR CODE=451 (Missing mandatory manifest header)
但是直接在Console Install 這個Bundle 沒任何錯誤。
不知道怎么回事
用的是FELIX的Impl
FileInputStream in= new FileInputStream(bundleLocation);
DeploymentPackage dPackage=deployAdmin.installDeploymentPackage(in);
卻得到各DeploymentException ERROR CODE=451 (Missing mandatory manifest header)
但是直接在Console Install 這個Bundle 沒任何錯誤。
不知道怎么回事
re: IBM 將大力推動Eclipse RCP gembin 2008-05-08 21:49
支持RCP
re: 基于Ajax的web桌面操作系統AjaxWindows gembin 2008-05-08 19:05
恩 看上去不錯啊!
re: 中國移動飛信 gembin 2008-05-06 00:43
光發短信應該是免費的吧
re: 精品Ajax圖書下載 gembin 2008-05-05 10:54
@王天桂
已發送
已發送
re: 精品Ajax圖書下載 gembin 2008-04-28 17:14
@笨笨 @漣漪
已發送
已發送
re: Eclipse Rich Ajax Platform (RAP)開發環境的配置 gembin 2008-04-15 22:03
是啊,把Eclipse的界面風格以及其擴展性用在Web上了。原來做桌面開發的人也可以快速上手做Web開發了~~還可以很方便定制界面風格。
嘗試了一下真的不錯,有時間得好好研究1下。
嘗試了一下真的不錯,有時間得好好研究1下。
re: JAVA Appliation下取得資源文件的路徑 gembin 2008-04-10 22:42
Document doc = db.parse(ConfigFactoryImplTest.class.getResource("") + "boss-connector-service.xml");
改成這樣不就行了
Document doc = db.parse(ConfigFactoryImplTest.class.getResource("boss-connector-service.xml") );
改成這樣不就行了
Document doc = db.parse(ConfigFactoryImplTest.class.getResource("boss-connector-service.xml") );
re: 精品Ajax圖書下載 gembin 2008-04-07 11:37
已經發了幾本給sccn.sq@gmail.com ,wyz_java@163.com,jackcao1985@gmail.com ,mljmalongjiang@163.com 了
re: 精品Ajax圖書下載 gembin 2008-04-07 11:36
不知道怎么傳,QQ超大附件也慢。
哪位大哥有FTP。。。。呵呵 資源共享
哪位大哥有FTP。。。。呵呵 資源共享
re: JSF深入--控制跳轉 gembin 2008-04-01 18:05
關注JSF
re: 精品Ajax圖書下載 gembin 2008-04-01 16:33
先整理1下,在發。
現在上面所有的書,未壓縮時:大概350MB
現在上面所有的書,未壓縮時:大概350MB
re: 《SOA Using Java Web Services》 gembin 2008-04-01 16:28
@Robin's Java World
OK,弄好了。。。
OK,弄好了。。。
re: 精品外文Ajax圖書 gembin 2008-03-31 18:45
這些1起 有>100MB 先給你發幾個小的
re: 用SWT實現MSN風格的下拉框 gembin 2008-03-26 19:14
Good!!!!!!!!!