<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
<!--[if !supportLists]-->1.首先整合 <!--[endif]-->两个项目lib,web.xml配置,Shark.conf配置修改(Shark版本tws-community-2.0-beta8);
web.xml内容:
<?
xmlversion="1.0"encoding="ISO-8859-1"
?>
<!
DOCTYPEweb-appPUBLIC
"-//SunMicrosystems,Inc.//DTDWebApplication2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd"
>
<
web-app
>
<
display-name
>
Shark-SpringWorkflowApplication
</
display-name
>
<
context-param
>
<
param-name
>
Shark_Conf
</
param-name
>
<
param-value
>
/WEB-INF/conf/Shark.conf
</
param-value
>
</
context-param
>
<
context-param
id
="ContextParam_1086328608344"
>
<
param-name
>
contextConfigLocation
</
param-name
>
<
param-value
>
/WEB-INF/conf/applicationContext.xml
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
Shark_Survey_XPDL
</
param-name
>
<
param-value
>
WellnessDemo2.xpdl
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
Shark_admin_username
</
param-name
>
<
param-value
>
admin
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
Shark_admin_password
</
param-name
>
<
param-value
>
enhydra
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
Shark_Survey_client_enginename
</
param-name
>
<
param-value
>
SharkSurveyClient
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
Shark_Survey_xpdl
</
param-name
>
<
param-value
>
Survey1.xpdl
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
SharkPackageID
</
param-name
>
<
param-value
>
WellnessDemo2
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
SharkProcessID
</
param-name
>
<
param-value
>
WellnessEvaluationProcess2
</
param-value
>
</
context-param
>
<
context-param
>
<
param-name
>
Shark_Survey_urlAsFormalParam_Variable_Name
</
param-name
>
<
param-value
>
urlAsFormalParam
</
param-value
>
</
context-param
>
<!--
returningthiscodebacktoLoginActionduetodynamicloadingissues.
<listener>
<listener-class>
com.intellicare.SharkStrutsWorkflowContextListener
</listener-class>
</listener>
-->
<
listener
>
<
listener-class
>
org.springframework.web.context.ContextLoaderListener
</
listener-class
>
</
listener
>
<
servlet
id
="Servlet_1086328596032"
>
<
servlet-name
>
action
</
servlet-name
>
<
servlet-class
>
org.springframework.web.servlet.DispatcherServlet
</
servlet-class
>
<
init-param
>
<
param-name
>
contextConfigLocation
</
param-name
>
<
param-value
>
/WEB-INF/conf/applicationContext.xml
</
param-value
>
</
init-param
>
<
load-on-startup
>
1
</
load-on-startup
>
</
servlet
>
<!--
StandardActionServletMapping
-->
<
servlet-mapping
>
<
servlet-name
>
action
</
servlet-name
>
<
url-pattern
>
*.do
</
url-pattern
>
</
servlet-mapping
>
<
servlet
id
="Servlet_1086328596033"
>
<
servlet-name
>
init
</
servlet-name
>
<
servlet-class
>
com.qtong.servlet.InitServlet
</
servlet-class
>
<
init-param
>
<
param-name
>
Shark_Conf
</
param-name
>
<
param-value
>
/WEB-INF/conf/Shark.conf
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
url
</
param-name
>
<
param-value
>
index.jsp
</
param-value
>
</
init-param
>
<
load-on-startup
>
2
</
load-on-startup
>
</
servlet
>
<
servlet-mapping
>
<
servlet-name
>
init
</
servlet-name
>
<
url-pattern
>
/init
</
url-pattern
>
</
servlet-mapping
>
<
filter
id
="Filter_1086328608359"
>
<
filter-name
>
SetCharacterEncoding
</
filter-name
>
<
filter-class
>
com.qtong.filter.SetCharacterEncodingFilter
</
filter-class
>
<
init-param
id
="InitParam_1086328608359"
>
<
param-name
>
encoding
</
param-name
>
<
param-value
>
GBK
</
param-value
>
</
init-param
>
</
filter
>
<
filter-mapping
id
="FilterMapping_1086328608375"
>
<
filter-name
>
SetCharacterEncoding
</
filter-name
>
<
url-pattern
>
/*
</
url-pattern
>
</
filter-mapping
>
<!--
TheUsualWelcomeFileList
-->
<
welcome-file-list
>
<
welcome-file
>
init
</
welcome-file
>
</
welcome-file-list
>
</
web-app
>
<!--[if !supportLists]-->2. <!--[endif]-->出现NoSuchMethodError异常,自己修改com/lutris/appserver/server/sql/DBTransaction类:
java.lang.NoSuchMethodError: com.lutris.appserver.server.sql.AbstractDBTransactionFactory.getTransaction()Lcom/lutris/appserver/server/sql/DBTransaction;
at com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.createTransaction(StandardLogicalDatabase.java:612)
<!--[if !supportLists]-->3. <!--[endif]-->修改了org.objectweb.carol.rmi.jrmp.serverJUnicastRemoteObject类unexportObject方法,增加了类型强制转换
public
static
boolean
unexportObject(Remoteobj,
boolean
force)
throws
NoSuchObjectException
...
{
if(localO)...{
JUnicastRefremoteref=(JUnicastRef)((RemoteObject)ObjectTable.getStub(obj)).getRef();
JLocalObjectStore.removeObject(remoteref.getLocalId());
}
returnObjectTable.unexportObject(obj,force);
}
java.lang.NoSuchMethodError: sun.rmi.transport.ObjectTable.getStub(Ljava/rmi/Remote;)Ljava/rmi/server/RemoteStub
<!--[if !supportLists]-->4. <!--[endif]-->初始化servlet调用getServletContext()方法抛出空指针异常,需要在servlet的init中调用super.init(sc)才能调用getServletContext()
java.lang.NullPointerException
at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:159)
<!--[if !supportLists]-->5. <!--[endif]-->Shark.conf文件配置在initServlet的init-param参数下用config.获取
<!--[if !supportLists]-->6.访问系统 <!--[endif]-->先初始化工作流
<welcome-file-list id="WelcomeFileList_1086328608391">
<welcome-file>login</welcome-file>
</welcome-file-list>