[英]method in actionURL not being called
我定义了一个jsp,其中包含以下代码:
<portlet:actionURL name="checkOtp" var="otpDemo"></portlet:actionURL>
<form method="post" action="<%= otpDemo %>">
Enter otp:
<input type="text" name="otpText"/>
<input type="submit" value="Submit" />
</form>
提交表单时,我收到以下错误消息: Render response is null because this tag is not being called within the context of a portlet
如何摆脱此错误。请提前提供帮助。
同样,我假设您正在将RenderRequest
和RenderResponse
对象传递给该操作方法,而这些对象应为ActionRequest
和ActionResponse
类型。
如果是,对于给定的<portlet:actionURL name="checkOtp" var="otpDemo"></portlet:actionURL>
,您在portlet的操作类中的actionListener
方法将为:
public void checkOtp(ActionRequest actionRequest, ActionResponse actionResponse)
throws IOException, PortletException {
// your logic goes here
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.