File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Application to a Portlet

 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to convert a Struts 2 application to a Portlet to finally deploy it in Liferay Portal Server.

Problem is there aren't any useful resources available on the net for this. I have explored the Portal Bridges provided by Apache but I am not quite sure if they work with Liferay. Also they havent mentioned about the changes needed for the Action Classes which use Action Servlet and other Struts classes.

If any of you had success with Bridges then kindly provide the steps you followed.

Any help will be greatly appreciated.

Thanks..
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a little CBT tutorial I put together on creating and deploying a Struts portlet to WebSphere. For liferay, the process is similar:
Developing and deploying a Struts Portlet

Good luck!

-Cameron McKenzie
 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, can you tell me what are the changes needed for Action Class in Struts. Also which lib jar files did you include to get it running.

 
rashmi shivanna
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I have one deployed struts application in jboss portal it is working fine but for the login validation i have writen my own login action beacuse i need to check in Microsoft crm database insted of portal database to know he is valid user i tried to use j_security_check but i couldn't use . so i have wrtien struts action for login check . till this is working . now i need to display which user has logged in the header page . i am not able to set the portlet session in login action class in struts . my action class extends Action . i downloaded rpsstrutsportletfromtutorial.war also but i didn't find it was using any portlet session . can you please help me how to set portlet session in action class and how to retrive it in JSP file .
Thanks in advance .

 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Did you convert a Struts App to a Portlet? Can you share the steps for the same. I am finding it a little complex to convert my application to a Portlet.
Problem is coming mainly with the Action Class which uses struts Action classes. Although I have specified the jar files.

Thanks...
 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron,

I am getting this error when I try to deploy your example war in Liferay:

java.lang.ClassNotFoundException: org.apache.jetspeed.portlet.ServletContextProviderImpl

Details Attached....

Do I need to remove certain code for Liferay or add something
 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this one resolved, I will post the solution soon. I managed to convert a sample Struts application to a Portlet and deploy it in Liferay.

Now my focus is to convert an application which uses Struts2 and EJB and make that into a Portal.

If anyone of you has done that, kindly share the ways/steps for the same.

Thanks...
 
Joe Harry
Ranch Hand
Posts: 10045
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any similiar tutorial that shows how to integrate a Struts application to a JBoss Portal?
 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I have managed to convert an existing Struts EJB Application to a JSR 168 Portlet. Now I am using IBM Websphere and Liferay for the same.

I have outlined all the steps here : http://createportlet.blogspot.com/2009/10/struts-and-ejb-application-to-jsr-168.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic