jspページのカスタムポートレット内で、表示されたジャーナル記事へのコメントを許可しようとしています
埋め込むために 。問題は、次のように g.ClassNotFoundException: org.apache.jsp.view_jsp をスローすることです。
An error occurred at line: 119 in the jsp file: /discussion.jsp
The method setClassName(String) in the type DiscussionTag is not applicable for the arguments (Class<capture#2-of ? extends JournalArticle>)
116: id="journalCommentsPanel" persistState="<%= true %>"
117: title='<%= LanguageUtil.get(pageContext, "Comments") %>'>
118:
119: <liferay-ui:discussion
120: className="<%= journal.getClass() %>"
121: classPK="31575"
122: formAction="www.google.com"
15:57:13,540 エラー [PortletRequestDispatcherImpl:108]
org.apache.jasper.JasperException: java.lang.ClassNotFoundException:
org.apache.jsp.discussion_jsp
org.apache.jasper.JasperException: java.lang.ClassNotFoundException:
org.apache.jsp.discussion_jsp
これは私のdiscussion.jspページです
<%
WindowState windowState = null;
PortletMode portletMode = null;
PortletURL currentURLObj = null;
if (renderRequest != null) {
windowState = renderRequest.getWindowState();
portletMode = renderRequest.getPortletMode();
currentURLObj = PortletURLUtil.getCurrent(renderRequest,
renderResponse);
} else if (resourceRequest != null) {
windowState = resourceRequest.getWindowState();
portletMode = resourceRequest.getPortletMode();
currentURLObj = PortletURLUtil.getCurrent(resourceRequest,
resourceResponse);
}
String currentURL = currentURLObj.toString();
ThemeDisplay themeDisplayObject = (ThemeDisplay) request
.getAttribute(WebKeys.THEME_DISPLAY);
//long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);
long groupId = themeDisplayObject.getScopeGroupId();
String url = PortalUtil.getCurrentURL(request);
String[] urlString = url.split("/");
String urlTitle = urlString[urlString.length - 1];
urlTitle = HttpUtil.decodeURL(urlTitle).trim();
JournalArticle journal = JournalArticleLocalServiceUtil
.getArticleByUrlTitle(groupId, urlTitle);
%>
<portlet:actionURL var="discussionUrl">
<!-- <portlet:param name="jspPage" value="/discussion.jsp" /> -->
</portlet:actionURL>
<portlet:actionURL var="editGreetingURL">
<portlet:param name="jspPage" value="/view.jsp" />
</portlet:actionURL>
<liferay-ui:panel-container extended="<%= false %>"
id="journalCommentsPanelContainer" persistState="<%= true %>">
<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>"
id="journalCommentsPanel" persistState="<%= true %>"
title='<%= LanguageUtil.get(pageContext, "Comments") %>'>
<portlet:actionURL name="invokeTaglibDiscussion" var="discussionURL" />
<liferay-ui:discussion
className="<%= JournalArticle.class.getName() %>"
classPK="<%= journal.getArticleId() %>"
formAction="www.google.com"
subject="Wall Comments"
userId="<%= journal.getUserId() %>" />
</liferay-ui:panel>
</liferay-ui:panel-container>
and this is my processAction method :
PortletConfig portletConfig = getPortletConfig();
// System.out.println(">>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> inside invoke");
PortalClassInvoker .invoke(true, "com.liferay.portlet.messageboards.action.EditDiscussionAction",
"processAction", new String[] {
"org.apache.struts.action.ActionMapping",
"org.apache.struts.action.ActionForm",
PortletConfig.class.getName(),
ActionRequest.class.getName(),
ActionResponse.class.getName()
}, null, null, portletConfig, actionRequest, actionResponse);