In portlet What is the best way to read namespace parameter in action method. My form contains
<input id="<portlet:namespace/>param1" name="<portlet:namespace/>param1" value='hello'/>
option1:
request.getParameter(response.getNamespace() + "param1");
option2:
request.getParameter("param1");
option1 does not work in liferay, but does seem will work in websphere. option2 works fine in liferay 6.2. option1 seems to work in before 6.1.
Can anyone please tell me what is the jsr 286 compliant way?
There is no "jsr 286 compliant way" You can use both approach. The main purpose of usage tag is pass exact parameter to exact porlet when you have multiple portlet instances on same portal page. In this case same html inputs of different portlets have different names and every portlet will get his own page value.