嗨,我希望你能帮助我请:)我有一个使用servlet 2.4的web应用程序,我知道很老,但我试图将这个应用程序部署在Liberty Profile 8.5.5.3,Liberty配置文件与“功能”的工作,我使用“jsp-2.2”,我读了关于该功能,它使用Servlet 3.0,假设我可以使用其他servlet版本,如果我使用classLoader配置,但是当我启动我的服务器自由Profile Web这个使用Servlet 3.0,可以使用Liberty Profile和Servlet 2.4 ?.Liberty Profile + Servlet 2.4
我的server.xml配置为:
<?xml version="1.0" encoding="UTF-8"?>
<server description="server01">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
</featureManager>
<application id="webapptest" name="webapp type="ear" location="D:/LBP/webapp.ear">
<classloader delegation="parentLast" commonLibraryRef="mySharedLib"></classloader>
</application>
<library id="mySharedLib">
<fileset dir="D:/LBP/wlp/usr/servers/server-prueba01/myLib" includes="*.jar" />
</library>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
httpPort="9088"
httpsPort="9443" />
</server>
在 “commonLibraryRef” 我把 “servlet的API-2.4” 罐子
嗨,朋友,我也尝试过,但我必须补充说,我工作与旧的春天版本有依赖于servlet版本(2.4),这是一个大的应用程序,所以我想知道是否有一种方法使用servlet 2.4版本,如果没有,我会记住更新我的春天版本(我使用WAS,它的工作原理,但知道我必须使用Liberty Profile) – CharlyPL 2014-09-03 22:15:03
@CharlyPL据我所知,你不能在Liberty中运行J2EE 1.4应用程序并替换servlet罐子。所以当你改变描述符时,你有什么样的错误? – Gas 2014-09-03 22:18:33
相同的错误异常= java.lang.ClassCastException 源= com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet probeid = 213 堆栈转储= java.lang.ClassCastException:mx.telecom.company.compatibility.ws .ControlWebService无法转换为javax.servlet.Servlet – CharlyPL 2014-09-03 22:28:44