は以下の通りである展開するときemtyです:ポートレットは、私はそれが私がLiferayのと私のポートレット・クラスを使用してい
public class HospitalPortlet extends MVCPortlet {
private static Log _log = LogFactory.getLog(HospitalPortlet.class);
public void doLogin(ActionRequest actionRequest,
ActionResponse actionResponse)
throws IOException, PortletException{
actionRequest.setAttribute("test", "this is a test");
}
public void doView(RenderRequest renderRequest,
RenderResponse renderResponse)
throws IOException, PortletException{
renderRequest.setAttribute("test", "this is a test");
include("view.jsp", renderRequest, renderResponse);
}
public void include(String path,
RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException{
PortletRequestDispatcher portletRequestDispatcher =
getPortletContext().getRequestDispatcher(path);
if (portletRequestDispatcher == null){
_log.error(path + " is not a valid include");
}
else{
portletRequestDispatcher.include(renderRequest, renderResponse);
}
}
}
と私viw.jspは以下の通りです:
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<portlet:defineObjects />
This is the <b>Hospital</b> portlet.
<%
String testVar = (String)renderRequest.getAttribute("test");
%>
<br />
<p><%= testVar %></p>
が、私はこのポートレットをdepolyページに配置しますが、それは空であり、liferayログファイルにエラーメッセージはありません。何が問題なの?