Fórumok
servlet request in portlet
vikendra kumar, módosítva 12 év-val korábban
servlet request in portlet
New Member Bejegyzések: 4 Csatlakozás dátuma: 2011.09.26. Legújabb bejegyzések
Hi
thnx in advance .
how can we get the http servlet request in protlet class.
thnx in advance .
how can we get the http servlet request in protlet class.
Pankaj Kathiriya, módosítva 12 év-val korábban
RE: servlet request in portlet
Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
Hi,
You can use following to get Http Servlet request.
HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
HTH,
Pankaj
You can use following to get Http Servlet request.
HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
HTH,
Pankaj
vikendra kumar, módosítva 12 év-val korábban
RE: servlet request in portlet
New Member Bejegyzések: 4 Csatlakozás dátuma: 2011.09.26. Legújabb bejegyzések
thank you pankaj
i got the http servlet request but i want to one more thing. that if iuse get method in form in view.jsp and make any url (render or action ) then i am not able to get the parameters set to url or any form field value and if i use action url and get method in form then proccess action method is not executed. why.? i want to know th reason .
thanks and regards
i got the http servlet request but i want to one more thing. that if iuse get method in form in view.jsp and make any url (render or action ) then i am not able to get the parameters set to url or any form field value and if i use action url and get method in form then proccess action method is not executed. why.? i want to know th reason .
thanks and regards
Pankaj Kathiriya, módosítva 12 év-val korábban
RE: servlet request in portlet
Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
Hi Vikendra ,
Support of the get method is optional according to the standard. Since portal consumers are not required to support the get method ,it seems Liferay is not providing support for GET method.
Thanks,
Pankaj
Support of the get method is optional according to the standard. Since portal consumers are not required to support the get method ,it seems Liferay is not providing support for GET method.
Thanks,
Pankaj
Hitesh Dangi, módosítva 12 év-val korábban
RE: servlet request in portlet
New Member Bejegyzések: 11 Csatlakozás dátuma: 2010.12.14. Legújabb bejegyzések
private String getParameterValue(final PortletRequest portletRequest,final String paramName)
{
final HttpServletRequest request = PortalUtil.getHttpServletRequest(portletRequest);
String paramValue = ParamUtil.getString(PortalUtil.getOriginalServletRequest(request),
paramName, null);
if (paramValue == null)
{
paramValue = ParamUtil.getString(request, paramName, null);
if (paramValue == null)
{
paramValue = ParamUtil.getString(portletRequest, paramName, null);
}
}
return paramValue;
}
{
final HttpServletRequest request = PortalUtil.getHttpServletRequest(portletRequest);
String paramValue = ParamUtil.getString(PortalUtil.getOriginalServletRequest(request),
paramName, null);
if (paramValue == null)
{
paramValue = ParamUtil.getString(request, paramName, null);
if (paramValue == null)
{
paramValue = ParamUtil.getString(portletRequest, paramName, null);
}
}
return paramValue;
}