Fórumok
Liferay Web Service
Pradip Bhatt, módosítva 11 év-val korábban
Liferay Web Service
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
Hello All...
I am developed 3 different portlet in Liferay 6.2.0m2. I am using Struts2 + Spring3.0.5 and Hibenate technology. All my these modules runs specifically and well.
Now My question is that how can I connect this my modules internally. is Liferay provides some mechanism to interconect these modules. Note that Here, in my case all these portlets are individual like one is PIM another Admin andother Recruitment... And Using Web Service is this possible??
I am not using Service Builder here...
I want to integrate all this three and become one System(HRMS).
Please help me on this.
Please reply me as early as possible.
Thankssssss in Advance...
Pradip Bhatt
Ahmedabad - India
Mob : (+91) 9328278401
I am developed 3 different portlet in Liferay 6.2.0m2. I am using Struts2 + Spring3.0.5 and Hibenate technology. All my these modules runs specifically and well.
Now My question is that how can I connect this my modules internally. is Liferay provides some mechanism to interconect these modules. Note that Here, in my case all these portlets are individual like one is PIM another Admin andother Recruitment... And Using Web Service is this possible??
I am not using Service Builder here...
I want to integrate all this three and become one System(HRMS).
Please help me on this.
Please reply me as early as possible.
Thankssssss in Advance...
Pradip Bhatt
Ahmedabad - India
Mob : (+91) 9328278401
Gwowen Fu, módosítva 11 év-val korábban
RE: Liferay Web Service
Expert Bejegyzések: 315 Csatlakozás dátuma: 2010.12.27. Legújabb bejegyzések
One way to do it is to use <liferay-portlet:resourceURL> tag in your jsp page. This tag creates a link to other portlet's resource method.
David H Nebinger, módosítva 11 év-val korábban
RE: Liferay Web Service
Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Personally I'd use the LMB to have them message back and forth.
Pradip Bhatt, módosítva 10 év-val korábban
RE: Liferay Web Service
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
Thanks sir,
Example :
My requirement like fetching Job category from Admin portlet to Employee Information Portlet. It means data passing size may be become more.
Is it possible in this way?
Example :
My requirement like fetching Job category from Admin portlet to Employee Information Portlet. It means data passing size may be become more.
Is it possible in this way?
David H Nebinger, módosítva 10 év-val korábban
RE: Liferay Web Service
Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
You do not need to pass the whole content in LMB; in fact in normal messaging systems you'd pass a reference to the corresponding data and let the recipient find the actual message content. Saves the load on the messaging system and maintains performance levels.
Pradip A Bhatt, módosítva 10 év-val korábban
RE: Liferay Web Service
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
Thankssss Sir,
Can you please give me small example which describe what you say???
Because I have no much knowledge about Liferay framework..
If possible..... My requirement is neat and clean that i have to passed out data between two different portlet.
Thankssssssss in advance
Can you please give me small example which describe what you say???
Because I have no much knowledge about Liferay framework..
If possible..... My requirement is neat and clean that i have to passed out data between two different portlet.
Thankssssssss in advance
Pradip A Bhatt, módosítva 10 év-val korábban
RE: Liferay Web Service
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
Hello....
Finally , I successfully integrated Jersey RESTful web service with portlet.
You have to understand what is jersey framework.
For more inquiry...
Visit this..
Liferay Jersey
Contact me.
Pradip Bhatt.
Finally , I successfully integrated Jersey RESTful web service with portlet.
You have to understand what is jersey framework.
For more inquiry...
Visit this..
Liferay Jersey
Contact me.
Pradip Bhatt.
ranjit reval, módosítva 10 év-val korábban
RE: Liferay 6.2 With Strust2......
New Member Bejegyzések: 9 Csatlakozás dátuma: 2013.10.25. Legújabb bejegyzések
hi pradip,
i am also using liferay 6.2 ce + strust2 but i am not gettgin jsp value in strust2 action after submitting jsp form
kindly help....
thanks advance.......
i am also using liferay 6.2 ce + strust2 but i am not gettgin jsp value in strust2 action after submitting jsp form
kindly help....
thanks advance.......
Pradip A Bhatt, módosítva 10 év-val korábban
RE: Liferay 6.2 With Strust2......
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
I can not understand what u say.. please post your question in detail. So All can understand.
ranjit reval, módosítva 10 év-val korábban
RE: Liferay with struts2....
New Member Bejegyzések: 9 Csatlakozás dátuma: 2013.10.25. Legújabb bejegyzések
Hi Pradip,
Jsp
------------------------
<s:form action="addApmc" namespace="/apmc" theme="simple" method="post">
<s:textfield name="apmcName" label="Name" value=""/>
<s:textfield name="apmcDesc" label="Description" value=""/>
<s:textfield name="apmcLocation" label="Location" value=""/>
<s:submit value="submit" align="center"/>
</s:form>
-------------------------------
strust.xml
----------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.devMode" value="false" />
<package namespace="/apmc" extends="struts-portlet-default,json-default" name="apmc">
<interceptors>
<interceptor-stack name="storeStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="store">
<param name="operationMode">STORE</param>
</interceptor-ref>
</interceptor-stack>
<interceptor-stack name="retrieveStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
<action name="index">
<result>/html/apmc/view.jsp</result>
</action>
<action name="addApmc" class="com.struts2.action.AddAPMCDetails" method="execute">
<result name="success">/html/apmc/AddApmc.jsp</result>
<result name="error">/html/apmc/view.jsp</result>
</action>
</package>
</struts>
----------------------------------------
AddAPMCDetails.java File
---------------------------------
Instance variable and getter setter of apmcName....other
public String execute() throws Exception {
System.out.println("Name" + getApmcName() );
System.out.println("Location " + getApmcLocation() );
System.out.println("Desc... " + getApmcDesc() );
apmc apmcList=getApmcDetails();
apmcLocalServiceUtil.addapmc(apmcList);
return SUCCESS;
}
----------------------------
Library used for struts2 is
struts2-core-2.2.1.jar
struts2-portlet-plugin-2.3.1.1.jar
xwork-core-2.2.1.jar
freemarker-2.3.16.jar
.
.
other required...
-------------------------------
I m using Liferay 6.2.0 ce ga1 with struts2
--------------------------------------------------------------
My Question is that when i Submit the Strust Form i m getting null value for all parameter i have passed in struts2 form in Jsp like (apmcName..desc...and loc).
How can i get all parameter value in Java Action File. I have already make getter setter for all instance variable and also try using object referance..
But Still Getting null......... value..
Please...Help....
Jsp
------------------------
<s:form action="addApmc" namespace="/apmc" theme="simple" method="post">
<s:textfield name="apmcName" label="Name" value=""/>
<s:textfield name="apmcDesc" label="Description" value=""/>
<s:textfield name="apmcLocation" label="Location" value=""/>
<s:submit value="submit" align="center"/>
</s:form>
-------------------------------
strust.xml
----------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.devMode" value="false" />
<package namespace="/apmc" extends="struts-portlet-default,json-default" name="apmc">
<interceptors>
<interceptor-stack name="storeStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="store">
<param name="operationMode">STORE</param>
</interceptor-ref>
</interceptor-stack>
<interceptor-stack name="retrieveStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
<action name="index">
<result>/html/apmc/view.jsp</result>
</action>
<action name="addApmc" class="com.struts2.action.AddAPMCDetails" method="execute">
<result name="success">/html/apmc/AddApmc.jsp</result>
<result name="error">/html/apmc/view.jsp</result>
</action>
</package>
</struts>
----------------------------------------
AddAPMCDetails.java File
---------------------------------
Instance variable and getter setter of apmcName....other
public String execute() throws Exception {
System.out.println("Name" + getApmcName() );
System.out.println("Location " + getApmcLocation() );
System.out.println("Desc... " + getApmcDesc() );
apmc apmcList=getApmcDetails();
apmcLocalServiceUtil.addapmc(apmcList);
return SUCCESS;
}
----------------------------
Library used for struts2 is
struts2-core-2.2.1.jar
struts2-portlet-plugin-2.3.1.1.jar
xwork-core-2.2.1.jar
freemarker-2.3.16.jar
.
.
other required...
-------------------------------
I m using Liferay 6.2.0 ce ga1 with struts2
--------------------------------------------------------------
My Question is that when i Submit the Strust Form i m getting null value for all parameter i have passed in struts2 form in Jsp like (apmcName..desc...and loc).
How can i get all parameter value in Java Action File. I have already make getter setter for all instance variable and also try using object referance..
But Still Getting null......... value..
Please...Help....
Pradip A Bhatt, módosítva 10 év-val korábban
RE: Liferay with struts2....
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
AS per my first point of view
You should have to use
<s:textfield name="<entityName>.<attributeName>" label="Name" value=""/>
in your jsp file.
Suppose :
Entity / pojo class :
class Student{
int rno;
String name;
// GETTER - SETTER
}
class YOUR_ACTION_CLASS
{
Student student;
// GETTER - SETTER of student
public void execute()
{
System.out.println("Name :" + student.getName());
System.out.println("Student Name :" + name);
}
}
jsp file :
<form action="YUOR_ACTION" method="POST">
<s:textfield name="student.name" label="Name" value=""/>
</form>
It will be work..
You should have to use
<s:textfield name="<entityName>.<attributeName>" label="Name" value=""/>
in your jsp file.
Suppose :
Entity / pojo class :
class Student{
int rno;
String name;
// GETTER - SETTER
}
class YOUR_ACTION_CLASS
{
Student student;
// GETTER - SETTER of student
public void execute()
{
System.out.println("Name :" + student.getName());
System.out.println("Student Name :" + name);
}
}
jsp file :
<form action="YUOR_ACTION" method="POST">
<s:textfield name="student.name" label="Name" value=""/>
</form>
It will be work..
ranjit reval, módosítva 10 év-val korábban
RE: Liferay with struts2....
New Member Bejegyzések: 9 Csatlakozás dátuma: 2013.10.25. Legújabb bejegyzések
Hi Pradip
As per your suggestion I have implement new portlet but getting nullpointer exception at following point
System.out.println("Name :" + student.getName());
portlet.xml
---------------------
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
-------------------------------------------------
web.xml
-----------------------
<listener>
<listener-class>com.liferay.portal.kernel.spring.context.PortletContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>struts2servlet</servlet-name>
<servlet-class>org.apache.struts2.dispatcher.ng.servlet.StrutsServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>struts2servlet</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>struts2Resources</servlet-name>
<servlet-class>org.apache.struts2.dispatcher.ng.servlet.StrutsServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>struts2Resources</servlet-name>
<url-pattern>/struts/*</url-pattern>
</servlet-mapping>
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
<taglib-location>
/WEB-INF/tld/liferay-portlet.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://liferay.com/tld/aui</taglib-uri>
<taglib-location>/WEB-INF/tld/aui.tld</taglib-location>
</taglib>
</jsp-config>
--------------------------------------------------------------------------
As well as tell me list of library file you are using...
can you send any small example using liferay with struts2 ??
As per your suggestion I have implement new portlet but getting nullpointer exception at following point
System.out.println("Name :" + student.getName());
portlet.xml
---------------------
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
-------------------------------------------------
web.xml
-----------------------
<listener>
<listener-class>com.liferay.portal.kernel.spring.context.PortletContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>struts2servlet</servlet-name>
<servlet-class>org.apache.struts2.dispatcher.ng.servlet.StrutsServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>struts2servlet</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>struts2Resources</servlet-name>
<servlet-class>org.apache.struts2.dispatcher.ng.servlet.StrutsServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>struts2Resources</servlet-name>
<url-pattern>/struts/*</url-pattern>
</servlet-mapping>
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
<taglib-location>
/WEB-INF/tld/liferay-portlet.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://liferay.com/tld/aui</taglib-uri>
<taglib-location>/WEB-INF/tld/aui.tld</taglib-location>
</taglib>
</jsp-config>
--------------------------------------------------------------------------
As well as tell me list of library file you are using...
can you send any small example using liferay with struts2 ??
Pradip A Bhatt, módosítva 10 év-val korábban
RE: Liferay with struts2....
Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2013.01.29. Legújabb bejegyzések
Visit this one
http://liferay-struts2-portlet.blogspot.in/2012/01/simple-liferay-struts2-portlet.html
http://liferay-struts2-portlet.blogspot.in/2012/01/simple-liferay-struts2-portlet.html
ranjit reval, módosítva 10 év-val korábban
RE: Liferay with struts2....
New Member Bejegyzések: 9 Csatlakozás dátuma: 2013.10.25. Legújabb bejegyzések
Hi Pradip,
I have already tried this link....but it's not work for me.
are you also using liferay 6.2???
If it is possible then please send me small kind of example war file as well as tell me list of library file you are using for strust2 configuration with liferay 6.2
Thanks Advance
I have already tried this link....but it's not work for me.
are you also using liferay 6.2???
If it is possible then please send me small kind of example war file as well as tell me list of library file you are using for strust2 configuration with liferay 6.2
Thanks Advance
Ronald Lopez, módosítva 10 év-val korábban
RE: Liferay with struts2....
New Member Bejegyzés: 1 Csatlakozás dátuma: 2013.05.11. Legújabb bejegyzések
Hello. I have the same problem. My project works for the 6.1.2 version without any problem. But when I change it to version 6.2, it stopped working sending values submit sends "null". However, sending values renderURL works.
<portlet:renderURL var="nameURL" windowState="pop_up">
<portlet:param name="struts.portlet.action"
value="/view/view/name" />
<portlet:param name="codigoOferta" value="${oferta.id}" />
<portlet:param name="tituloOferta" value="${oferta.titulo}" />
</portlet:renderURL>
Anyone know at what the problem is?.
Sorry for the english, I'm a translator.
<portlet:renderURL var="nameURL" windowState="pop_up">
<portlet:param name="struts.portlet.action"
value="/view/view/name" />
<portlet:param name="codigoOferta" value="${oferta.id}" />
<portlet:param name="tituloOferta" value="${oferta.titulo}" />
</portlet:renderURL>
Anyone know at what the problem is?.
Sorry for the english, I'm a translator.
Jay Trivedi, módosítva 10 év-val korábban
RE: Liferay with struts2....
New Member Bejegyzés: 1 Csatlakozás dátuma: 2013.10.25. Legújabb bejegyzések
Hey Ranjit,
Put portlet name sapce before the name of elements of form:
Put portlet name sapce before the name of elements of form:
<s:set var="portletnamespace"><%=renderResponse.getNamespace()%></s:set>
<s:form action="addBook">
<s:textfield name="%{#portletnamespace}book.title" label="Book Title"></s:textfield>
<s:textfield name="%{#portletnamespace}book.author" label="Book Author"></s:textfield>
</s:form>
Henrique Andrade, módosítva 10 év-val korábban
RE: Liferay with struts2....
New Member Bejegyzések: 9 Csatlakozás dátuma: 2013.07.18. Legújabb bejegyzések
Or you can add this in your liferay-portlet.xml:
I had a similar problem in Liferay 6.2.
Henrique S
<requires-namespaced-parameters>false</requires-namespaced-parameters>
I had a similar problem in Liferay 6.2.
Henrique S