Fórumok
jsp parameters dont send to the controller in spring portlet 4.0.2
babak naddaf, módosítva 10 év-val korábban
jsp parameters dont send to the controller in spring portlet 4.0.2
New Member Bejegyzések: 23 Csatlakozás dátuma: 2011.07.06. Legújabb bejegyzések
Hi every one
I have written a simple Spring4.0.2 portlet including one jsp page (which sends two simple text parameters to the controller) every thing is okey the the jsp correctly jump to the right actionMapping method but the sent parameters(two textboxes) are null. The controller and jsp are as follow :
controller:
@ActionMapping(params = "action=formSetValuesAction")
public void simpleActionMethod(ActionRequest actionRequest, ActionResponse actionResponse) {
String firstName = actionRequest.getParameter("firstname");
String lastName = actionRequest.getParameter("lastname");
System.out.println("Here your user first name: "+firstName);
System.out.println("Here your user first name: "+lastName);
}
Jsp :
<%@ page import="java.text.Format" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Set" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
<%@include file="./include.jsp"%>
<portlet:defineObjects />
<portlet:actionURL var="formSetValuesURL">
<portlet:param name="action" value="formSetValuesAction"></portlet:param>
</portlet:actionURL>
<form action="${formSetValuesURL}" method="post">
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
<input type="submit" value="Submit"/>
</form>
can any one help me to solve this problem,?
http://stackoverflow.com/questions/22268535/spring-4-0-2-portlet-mvc
I have written a simple Spring4.0.2 portlet including one jsp page (which sends two simple text parameters to the controller) every thing is okey the the jsp correctly jump to the right actionMapping method but the sent parameters(two textboxes) are null. The controller and jsp are as follow :
controller:
@ActionMapping(params = "action=formSetValuesAction")
public void simpleActionMethod(ActionRequest actionRequest, ActionResponse actionResponse) {
String firstName = actionRequest.getParameter("firstname");
String lastName = actionRequest.getParameter("lastname");
System.out.println("Here your user first name: "+firstName);
System.out.println("Here your user first name: "+lastName);
}
Jsp :
<%@ page import="java.text.Format" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Set" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
<%@include file="./include.jsp"%>
<portlet:defineObjects />
<portlet:actionURL var="formSetValuesURL">
<portlet:param name="action" value="formSetValuesAction"></portlet:param>
</portlet:actionURL>
<form action="${formSetValuesURL}" method="post">
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
<input type="submit" value="Submit"/>
</form>
can any one help me to solve this problem,?
http://stackoverflow.com/questions/22268535/spring-4-0-2-portlet-mvc
Harish Kumar, módosítva 10 év-val korábban
RE: jsp parameters dont send to the controller in spring portlet 4.0.2
Expert Bejegyzések: 483 Csatlakozás dátuma: 2010.07.31. Legújabb bejegyzések
Liferay version ??
If you using Liferay 6.2, then you have to set the following property in liferay-portlet.xml file
If you using Liferay 6.2, then you have to set the following property in liferay-portlet.xml file
<requires-namespaced-parameters>false</requires-namespaced-parameters>
Muhammed Shafeek V, módosítva 10 év-val korábban
RE: jsp parameters dont send to the controller in spring portlet 4.0.2
Regular Member Bejegyzések: 140 Csatlakozás dátuma: 2013.07.22. Legújabb bejegyzések
Thank you Harish.
I too have facing the same problem. but it resolved your answer
Shafeek
I too have facing the same problem. but it resolved your answer
Shafeek
babak naddaf, módosítva 9 év-val korábban
RE: jsp parameters dont send to the controller in spring portlet 4.0.2
New Member Bejegyzések: 23 Csatlakozás dátuma: 2011.07.06. Legújabb bejegyzések
Thanks Harish