Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why
« Back to Development

Developing Struts-based Portlets

Introduction #

Lots of developers want to get StrutsPortlet working on Liferay portal. Here are the steps you have to follow in order to develop your own Struts based portlet. This however is not 100% truly JSR168 compliant as this depends on StrutsPortlet class of liferay is only recommended for development in the ext environment.

Prerequisites- #

This document assumes that you have setup your extension environment. If you want to make your portlets deployable as web-apps, you can study the sample_struts_portlet available in the /portal/portlets folder in the Liferay source distribution. To get Struts .war applications to work, follow the instructions in the article about How to access the full Liferay API from a portlet application.

Steps #

For the ext environment follow these steps:

1. Create a folder called test_struts_portlet under {EXTN_HOME}\ext-web\docroot\html\portlet\

2. Add init.jsp into this folder; this file will have most of the imports. Following is the code for init.jsp

 <%@ include file="/html/portlet/init.jsp" %>

Note that this step is not mandatory, but it follows the guidelines set by the portlets bundled with Liferay. If it is your first StrutsPortlet we recommend that you follow this and other suggestions next. Afterwards you can decide to develop your own guidelines.

3. Add a simple JSP called view.jsp into test_struts_portlet folder. copy and paste following code into the JSP page.

 <%@ include file="/html/portlet/test_struts_portlet/init.jsp" %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
     <head>
         <title>My First Struts Portlet</title>
     </head>
 <body>
 <form action="<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>">
                   <portlet:param name="struts_action" value="/test_struts_portlet/say_hello" />
               </portlet:actionURL>" method="post" name="<portlet:namespace />fm"><br />
     &lt;table border="0" cellpadding="0" cellspacing="0">
     <tr>
         <td valign="top"><%= LanguageUtil.get(pageContext, "your_name") %></td>
         <td style="padding-left: 10px;"></td>
         <td><input type="text" name="guest_name"/></td>
     </tr>  
     <tr>
         <td colspan="3"><button type="submit" name="<%= LanguageUtil.get(pageContext, "submit_button") %>"/></td>
     </tr> 
     &lt;/table>   
 </form>    
 </body>
 </html>

4. Modify portlet-ext.xml file to add Struts portlet entry into it. Copy and paste following code into portlet-ext.xml

 <portlet>
  <portlet-name>EXT_4</portlet-name>
  <display-name>Struts Sample Portlet</display-name>
  <portlet-class>com.liferay.portlet.StrutsPortlet</portlet-class>
  <init-param>
  	<name>view-action</name>
  	<value>/test_struts_portlet/view</value>
  </init-param>
  <expiration-cache>300</expiration-cache>
  <supports>text/html</supports>
  <portlet-info>
  	<title>Struts Sample Portlet</title>
  </portlet-info>
  <resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
  <security-role-ref>
  	<role-name>Power User</role-name>
  </security-role-ref>
  <security-role-ref>
  	<role-name>User</role-name>
  </security-role-ref>
 </portlet>

5. Add following line into struts-config.xml for mapping action with a view page

 <action path="/test_struts_portlet/view" forward="portlet.struts.test.view"/>

6. Add following lines into tiles-def.xml. Make sure that forward from struts-config.xml and definetion name are exactly same

 <definition name="portlet.struts.test.view" extends="portlet">
    <put name="portlet_content" value="/portlet/test_struts_portlet/view.jsp"/>
 </definition>

7. Edit liferay-portlet-ext.xml file and add our new portlet entry into it.

 <portlet>
    <portlet-name>EXT_4</portlet-name>
    <struts-path>test_struts_portlet</struts-path>
    <use-default-template>false</use-default-template>
 </portlet>

IMPORTANT: When developing with Liferay's StrutsPortlet, you need to ensure that the struts-path above equals the substring between the first and last slash of every Struts action-mapping defined in your struts-config.xml (step 5). The reason for this is to prevent URL manipulation. For instance, imagine that a regular user sees that he can delete a user by using the struts-config mapping of "/enterprise_admin/edit_user". Liferay looks at the struts_action parameter passed in the querystring, takes the substring of the first and last slash, and then maps it to the portlet-name by matching the substring to the struts-path (in this case Enterprise Admin portlet 79). When the portal sees that the regular user does not have access to the Enterprise Admin portlet, the user will be returned a security exception.

8. Now edit liferay-display.xml file to add the category where this newly developed portlet must go. We will enter newly created portlet into test category by adding <portlet id="EXT_4" /> line along with others

 <category name="category.test">
    <portlet id="47" />
    <portlet id="48" />
    <portlet id="50" />
    <portlet id="53" />
    <portlet id="66" />
    <portlet id="69" />
    <portlet id="EXT_1" />
    <portlet id="EXT_4" />
 </category>

9. Create a package called com.liferay.portlet.struts.test in {EXTN_HOME}\ext-ejb. Add new class called SayHelloAction which extends PortletAction in to this package. Write a method called processAction() in this class. Following is the code for processAction() method

 public void processAction(ActionMapping mapping, ActionForm form,
         PortletConfig config, ActionRequest req, ActionResponse res)
     throws Exception {<br/>
     String userName = ParamUtil.getString(req, "guest_name");
     PortletSession session = req.getPortletSession();
     session.setAttribute("guest_name", userName);
     setForward(req, "portlet.struts.test.say.hello");
 }

10. Now Make sure that you add respective struts-config.xml entry for the action.

 <action path="/test_struts_portlet/say_hello" type="com.liferay.portlet.struts.test.SayHelloAction">
        <forward name="portlet.struts.test.say.hello" path="portlet.struts.test.say.hello"/>
 </action>

11. add another entry into tiles-defs.xml for the forward mapping

 <definition name="portlet.struts.test.say.hello" extends="portlet">
        <put name="portlet_content" value="/portlet/test_struts_portlet/hello.jsp"/>
 </definition>

12. create hello.jsp and with in this JSP access the session attribute and get the guest name and display it on to page.

13. Run deploy from build.xml located at the root folder of extension environment.

0 Attachments
110410 Views
Average (2 Votes)
The average rating is 4.0 stars out of 5.
Comments
Threaded Replies Author Date
This is again struts 1.x. I think that nobody... G. A. Angelova October 17, 2008 2:22 AM
I don´t have the folder ext-ejb, in my project... Thaiz de Cássia Rodrigues January 12, 2009 5:02 AM
Try creating it in: ext-impl/src Tamas Kusnyar January 12, 2009 7:27 AM
It worked. tks Thaiz de Cássia Rodrigues January 19, 2009 9:41 AM
hi, i m not getting {EXTN_HOME}. where it... Aniruddha p Shirguppe April 19, 2011 3:38 AM
In Liferay 5.1.2 you have to replace ... Nicola Camillo January 23, 2009 3:20 AM
In Liferay 5.2.0 modify portlet-ext.xml to add... relax sun February 11, 2009 7:00 AM
I have no portlet-ext.xml. The Plugin SDK does... Kolja Köster June 8, 2009 7:37 AM
Plugins donot have the notion of ext. This is... Lakshman Kumar Mukkamalla June 24, 2009 9:18 PM
I get an error when deploying: [javac] symbol ... Matthias Beick March 5, 2009 4:14 AM
I am using liferay 5.2.1 and facing the same... jagannath shukla March 10, 2009 1:55 AM
I also faced same issue. Please help... Thansk ! sandeep kumar bansal March 15, 2009 10:52 PM
I also faced same issue. Please help... Thansk ! sandeep kumar bansal March 15, 2009 10:53 PM
I got help in the Forum: You have to change... Matthias Beick March 24, 2009 11:17 AM
FYI, the Power User and User in the role should... Lakshman Kumar Mukkamalla May 28, 2009 4:37 PM
I received following errors when running "ant... Matus Ferko June 6, 2009 10:55 AM
good guide I am using Liferay Portal SE 5.2.3,... radar lee July 29, 2009 12:31 AM
good guide I am using Liferay Portal SE 5.2.3,... radar lee July 29, 2009 12:32 AM
FYI In portlet-ext.xml the line... Vivek Yadav August 10, 2009 2:31 AM
Java class has to extend PortletAction class.... Nirathan Sathsivamoorthy November 16, 2009 11:45 PM
Good article for ext environment. I'm aware... Mahipalsinh Rana November 17, 2009 12:00 PM
One might want to see the samples in liferay's... Tom Y November 30, 2009 3:00 AM
have you really managed to get... Nicolas Grolleau December 2, 2009 1:45 AM
It failed on me on different reasons.... Tom Y December 3, 2009 9:59 PM
i got an error when i deploy and the error is ... goutami sana May 2, 2010 11:29 PM
I have created a tutorial on how to get struts... Heikki Uljas April 4, 2010 7:03 AM
hi do i need to do any changes in build.xml... goutami sana April 21, 2010 10:13 PM
Hi, how do i perform task 12? << create... Sheryn test Low February 23, 2010 6:08 PM
Excellent Guide : (:) But i want to know: 1)... DarshanKumar N Bhatia July 21, 2010 9:22 PM
This is very excellent guide but i don't get... Umesh Annegirikar October 26, 2010 4:29 AM
hey m getting a portlet but not getting a any... nrupa travadi May 28, 2011 12:03 AM
can any one please provide me step by step... Sujay Kumar Paul October 28, 2011 12:21 PM

This is again struts 1.x. I think that nobody uses this version for new development any more.
Posted on 10/17/08 2:22 AM.
I don´t have the folder ext-ejb, in my project ext.
Can you help me?

tks
Thaiz
Posted on 1/12/09 5:02 AM.
Try creating it in: ext-impl/src
Posted on 1/12/09 7:27 AM in reply to Thaiz de Cássia Rodrigues.
It worked.

tks
Posted on 1/19/09 9:41 AM in reply to Tamas Kusnyar.
Nicola Camillo
In Liferay 5.1.2 you have to replace

<supports>text/html</supports>

with

<supports>
<mime-type>text/html</mime-­type>
</supports>

in the portlet-ext.xml file
Otherwise it doesn't render the portlet.
Posted on 1/23/09 3:20 AM.
In Liferay 5.2.0 modify portlet-ext.xml to add this

<portlet>
<portlet-name>EXT_4</portlet-name>
<display-name>Struts Sample Portlet</display-name>
<portlet-class>com.liferay.portlet.StrutsPortlet</portlet-class>
<init-param>
<name>view-action</name>
<value>/test_struts_portlet/view</value>
</init-param>
<expiration-cache>300</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
Posted on 2/11/09 7:00 AM.
I get an error when deploying:

symbol : class ParamUtil
location: package com.liferay.util
import com.liferay.util.ParamUtil;
^
$EXT/ext-impl/src/com/liferay/portlet/struts/test/SayHelloAction.java:20: cannot find symbol
symbol : variable ParamUtil
location: class com.liferay.portlet.struts.test.SayHelloAction
String userName = ParamUtil.getString(req, "guest_name");
^
2 errors

Is there a jar anywhere including ParamUtil? Did I forget some entry in the class or library path?

Thanks,
Matthias
Posted on 3/5/09 4:14 AM.
I am using liferay 5.2.1 and facing the same problem..
unable to get class ParamUtil in liferay jars.
i have tried to use com.liferay.portal.kernel.util.ParamUtil but it gives error on deployment.
plz help me out...
Thanks
Posted on 3/10/09 1:55 AM in reply to Matthias Beick.
I also faced same issue.
Please help...
Thansk !
Posted on 3/15/09 10:52 PM in reply to jagannath shukla.
I also faced same issue.
Please help...
Thansk !
Posted on 3/15/09 10:53 PM in reply to sandeep kumar bansal.
I got help in the Forum:

You have to change the import and add:

import com.liferay.portal.kernel.util.ParamUtil;

to SayHelloAction.java
Posted on 3/24/09 11:17 AM in reply to sandeep kumar bansal.
FYI, the Power User and User in the role should have been
power-user and user.
Posted on 5/28/09 4:37 PM in reply to Matthias Beick.
I received following errors when running "ant deploy":
...\liferay-portal-ext-5.1.2\ext-service\src\com\liferay\portlet\struts\sample\S­ayHelloAction.java:8: package org.apache.struts.action does not exist
import org.apache.struts.action.ActionForm;

This error occurs for these imports:
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import com.liferay.portal.struts.PortletAction;

Actually the deploy task failed on "ant compile" of ext-service. The solution was to alter "web.classpath" property in buidl-common.xml with following 2 lines:

<fileset dir="${project.dir}/lib/portal" includes="*.jar" />
<fileset dir="${project.dir}/modules" includes="portal-impl.jar" />

Weird that no one else experienced the same problems.
Posted on 6/6/09 10:55 AM.
I have no portlet-ext.xml. The Plugin SDK does not create any *-ext.xml files. What do I do?
Posted on 6/8/09 7:37 AM in reply to Giuseppe Cinque.
Plugins donot have the notion of ext. This is for the extension environment only. For the plugin dev, make the changes in the portlet.xml file
Posted on 6/24/09 9:18 PM in reply to Kolja Köster.
good guide

I am using Liferay Portal SE 5.2.3, my opinion, it's better to set the portlet folder as
{EXTN_HOME}\ext-web\docroot\html\portlet\ext, just as the report portlet sample
Posted on 7/29/09 12:31 AM.
good guide

I am using Liferay Portal SE 5.2.3, my opinion, it's better to set the portlet folder as
{EXTN_HOME}\ext-web\docroot\html\portlet\ext, just as the report portlet sample
Posted on 7/29/09 12:32 AM.
FYI
In portlet-ext.xml the line <supports>text/html</supports> should be changed to

<supports>
<mime-type>text/html</mime-type>
</supports>

Portlet doesn't appear otherwise. Spent lot of time trying to figure that one out.
Posted on 8/10/09 2:31 AM.
Java class has to extend PortletAction class. It gives error says the class not defined.
As I think it should be in some external libraries/jar file. But it doesn't mention anything regarding the jar file.
Anyone who able to manage with that plz give a solution to the issue
Posted on 11/16/09 11:45 PM.
Good article for ext environment. I'm aware that struts portlets are still supported in ext environment , but it could be proven as bottleneck in upgrade and reusability.

In my opinion , Struts portlets should be developed in plugins environment. It will ensure it working as separate portlet.

There are two ways in which you can develop struts portlet in plugins.

1) Refer sample-struts-liferay-portlet in community plugins svn- this approach gives you similar feeling of ext environment and gives you flexibility to access all the liferay classes (not just kernel and service but impl classes also , courtesy by using lifeary classloader). Downside of using single classloader will prevent you from using multiple version of same lib.

2) Refer sample-struts-portlet n community plugins svn - it is using apache struts bridge to drive struts portlet lifecycle. In this example whole execution was driven through struts taglib. But you can easily use liferay kernel and service classes and get yoru work done. , I have developed struts portlet (with service , it was quite a bit of challenge but got succeeded in the end).

my 2c. keep up the good work.
Posted on 11/17/09 12:00 PM.
One might want to see the samples in liferay's SVN. The sample is not as minimal as this HOW-TO:

http://svn.liferay.com/repos/public/plugins/trunk/portlets/sample-struts-portlet­/

http://svn.liferay.com/repos/public/plugins/trunk/portlets/sample-struts-liferay­-portlet/

(user: guest passemoticon
Posted on 11/30/09 3:00 AM.
have you really managed to get sample-strurs-liferay-portlet to work on liferay 5.2.x ?
all I've got is exceptions emoticon
Posted on 12/2/09 1:45 AM in reply to Tom Y.
It failed on me on different reasons. Eventually, I got it working.

1) I checked out http://svn.liferay.com/repos/public/plugins/trunk/ into "liferay-plugins"
2) Added build.%USERNAME%.properties with these lines:
app.server.dir=C:/Users/%USERNAME%/liferay-plugins/tomcat-6.0.18
java.compiler=modern
3) ant deploy

I am using mysql. Not sure if it makes a different.
Posted on 12/3/09 9:59 PM in reply to Nicolas Grolleau.
Hi,

how do i perform task 12?
<<
create hello.jsp and with in this JSP access the session attribute and get the guest name and display it on to page
>>

thanks!!
Posted on 2/23/10 6:08 PM.
I have created a tutorial on how to get struts based portlets to work with liferay.

http://pragmatastic.blogspot.com/2010/04/strutsfreemarker-sample-portlet­-for.html
Posted on 4/4/10 7:03 AM in reply to Nicolas Grolleau.
hi

do i need to do any changes in build.xml file??
plz answer me i m trying this for the first time.

thanks
sana
Posted on 4/21/10 10:13 PM in reply to Heikki Uljas.
i got an error when i deploy and the error is

compile:
Compiling 1 source file to /home/openuser/Desktop/liferay_helloWorld/ext/ext-impl/classes
/home/openuser/Desktop/liferay_helloWorld/ext/ext-impl/src/com.liferay.portlet.s­truts.test/SayHelloAction.java:13: cannot find symbol
symbol: class PortletAction
public class SayHelloAction extends PortletAction{
^
/home/openuser/Desktop/liferay_helloWorld/ext/ext-impl/src/com.liferay.portlet.s­truts.test/SayHelloAction.java:18: cannot find symbol
symbol : class PortletSession
location: class com.liferay.portlet.struts.test.SayHelloAction
PortletSession session = req.getPortletSession();
^
/home/openuser/Desktop/liferay_helloWorld/ext/ext-impl/src/com.liferay.portlet.s­truts.test/SayHelloAction.java:20: cannot find symbol
symbol : method setForward(javax.portlet.ActionRequest,java.lang.String)
location: class com.liferay.portlet.struts.test.SayHelloAction
setForward(req, "portlet.struts.test.say.hello");
^
3 errors

can you tell me the solution???
i got struck here.
plz help
Posted on 5/2/10 11:29 PM in reply to Tom Y.
Excellent Guide : (emoticon
But i want to know:
1) How to use struts validation
2) where to specify error resource bundle messages.
3) How to use ActionForm and Action of struts

Pls Reply soon..........
Thanks
MR.Bhatia
4)
Posted on 7/21/10 9:22 PM.
This is very excellent guide but i don't get the step no 12 that is how to access the session attribute & get the guest name & display
So please tell it briefly
Posted on 10/26/10 4:29 AM.
hi,
i m not getting {EXTN_HOME}. where it is?
please any one tell me.
Posted on 4/19/11 3:38 AM in reply to Thaiz de Cássia Rodrigues.
hey m getting a portlet
but not getting a any thing in view part in dis portlet
i got an error
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: File &quot;/html/portlet/ext/test_struts_portlet/view.jsp&quot; not found
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:319)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java­:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j­ava:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav­a:472)
at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:67)
at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:2736)­
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
­at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java­:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j­ava:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav­a:472)
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatch­erImpl.java:307)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatche­rImpl.java:115)
at com.liferay.portal.struts.PortletRequestProcessor.doInclude(PortletRequestProces­sor.java:284)
at com.liferay.portal.struts.PortletRequestProcessor.doForward(PortletRequestProces­sor.java:255)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesReques­tProcessor.java:239)
at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(Tile­sRequestProcessor.java:341)
at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:5­72)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcesso­r.java:235)
at com.liferay.portlet.StrutsPortlet.include(StrutsPortlet.java:261)
at com.liferay.portlet.StrutsPortlet.doView(StrutsPortlet.java:156)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:­149)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(Filter­ChainImpl.java:126)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.j­ava:69)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:700)­
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:419)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet­_jsp.java:1467)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
­at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java­:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j­ava:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav­a:472)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:2884)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:897)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(R­untimePortletUtil.java:170)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(R­untimePortletUtil.java:103)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(­RuntimePortletUtil.java:281)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(­RuntimePortletUtil.java:190)
at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:­831)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
­at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java­:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j­ava:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav­a:472)
at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:29­4)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:471)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.­java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.­java:157)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:608)
a­t com.liferay.portal.servlet.MainServlet.service(MainServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java­:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc­her.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j­ava:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav­a:302)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:14­3)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.j­ava:142)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java­:140)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilte­r.java:282)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.j­ava:425)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoL­oginFilter.java:257)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenS­SOFilter.java:73)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.ja­va:193)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(Virtua­lHostFilter.java:191)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheFilter.proce­ssFilter(ThreadLocalCacheFilter.java:55)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
­at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.jav­a:738)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt­erChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.­java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2­33)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1­91)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.jav­a:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at­ org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at­ org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109­)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr­otocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)



plzzz help ne out...
Posted on 5/28/11 12:03 AM.
can any one please provide me step by step process to implement struts in liferay in eclipse.
Posted on 10/28/11 12:21 PM.