Liferay
Jersey Restful web services
Hi i created Life ray Jersey Restful
web services.
The
following is the URL you can download Liferay Jersey Plug-in portlet.
Once you get
portlet from above URL
1)
Run service
builder by ant build-service this will create meer-person table in database. If not created you can
create manually and make sure primary column is auto increment.
2)
Run ant deploy
to deploy portlet in your portal.
3)
Add portlet your
page which is available in sample category.
The
following is Liferay Jersey Portlet
I create
table in liferay portal and I create two methods which are
1)
Adperson: This method adds the data in
person table.
2)
Get Person: get the Person by id.
Note:
1)
In view.jap you
need change URL according to your environment. Means port number and your dev
URL.
2)
If you change
portlet context then you need to modify request URL in jsp page.
3)
For your liferay
created table you need to alter table ad auto increment.
Important Classes
and JSP
1) PersonRestServices.java
2) View.jsp
3) Web.xml
4) You
can see all required jars in portlet lib directory.
The following are Referenses links to get more information.
http://www.vogella.com/articles/REST/article.html
http://www.mkyong.com/webservices/jax-rs/jersey-spring-integration-example/
http://persistentdesigns.com/wp/rest-crud-jersey-spring-and-jpa/
http://jersey.java.net/
The following are Referenses links to get more information.
http://www.vogella.com/articles/REST/article.html
http://www.mkyong.com/webservices/jax-rs/jersey-spring-integration-example/
http://persistentdesigns.com/wp/rest-crud-jersey-spring-and-jpa/
http://jersey.java.net/