• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Application to a Portlet

 
Ranch Hand
Posts: 57
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic