留言板

WAR to WAB converter and JSPs

Michael Freeman,修改在6 年前。

WAR to WAB converter and JSPs

Junior Member 帖子: 37 加入日期: 12-7-2 最近的帖子
I am seeing a behavior from the JSP Analyzer that does not seem correct to me when converting legacy WAR apps to DXP through automated use of the WAR->WAB converter (i.e. drop the WAR in deploy directory)

When the analyzer sees a JSP including something like the following:

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

it (I think incorrectly) generates the following Require-Capability header in the generated WAB bundle:

osgi.extender; filter:="(&(osgi.extender=jsp.taglib)(uri=/WEB-INF/struts-tiles.tld))

While I understand that this JSP reference should probably be using a "true URI" the fact is that this kind of reference is fully legal for a JEE container and will work quite nicely at runtime if the subject TLD is in fact located at /WEB-INF/struts-tiles.tld. However this generated header causes OSGi deployment to fail ...

Is this a bug in the JSP Analyzer (i.e. should it be ignoring URIs that are relative (begin with '/')?
thumbnail
David H Nebinger,修改在6 年前。

RE: WAR to WAB converter and JSPs

Liferay Legend 帖子: 14917 加入日期: 06-9-2 最近的帖子
Did the WEB-INF/lib contain the struts/tiles taglib jar?









Come meet me at Devcon 2017 or 2017 LSNA!
Michael Freeman,修改在6 年前。

RE: WAR to WAB converter and JSPs

Junior Member 帖子: 37 加入日期: 12-7-2 最近的帖子
Dave
Yes those TLDs are there. The problem here is that none of them expose a URI that begins with "/WEB-INF..." so the JspAnalyzer thinks it needs to generate a Require-Capability instruction for that

I think the fundamental problem here is that the JspAnalyzer needs to ignore any TLD references that are "relative path" style which by defintion need to be inside the WAR at runtime to work
thumbnail
David H Nebinger,修改在6 年前。

RE: WAR to WAB converter and JSPs

Liferay Legend 帖子: 14917 加入日期: 06-9-2 最近的帖子
Gotcha.

So switch to the standard non-local URI and you should be in business.










Come meet me at Devcon 2017 or 2017 LSNA!