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

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

tks
Thaiz
在 09-1-12 上午5:02 发帖。
Try creating it in: ext-impl/src
在 09-1-12 上午7:27 发帖以回复 Thaiz de Cássia Rodrigues
在 09-1-19 上午9:41 发帖以回复 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.
在 09-1-23 上午3:20 发帖。
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>
在 09-2-11 上午7:00 发帖。
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
在 09-3-5 上午4:14 发帖。
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
在 09-3-10 上午1:55 发帖以回复 Matthias Beick
I also faced same issue.
Please help...
Thansk !
在 09-3-15 下午10:52 发帖以回复 jagannath shukla
I also faced same issue.
Please help...
Thansk !
在 09-3-15 下午10:53 发帖以回复 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
在 09-3-24 上午11:17 发帖以回复 sandeep kumar bansal
FYI, the Power User and User in the role should have been
power-user and user.
在 09-5-28 下午4:37 发帖以回复 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.
在 09-6-6 上午10:55 发帖。
I have no portlet-ext.xml. The Plugin SDK does not create any *-ext.xml files. What do I do?
在 09-6-8 上午7:37 发帖以回复 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
在 09-6-24 下午9:18 发帖以回复 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
在 09-7-29 上午12:31 发帖。
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
在 09-7-29 上午12:32 发帖。
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.
在 09-8-10 上午2:31 发帖。
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
在 09-11-16 下午11:45 发帖。
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.
在 09-11-17 下午12:00 发帖。
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
在 09-11-30 上午3:00 发帖。
have you really managed to get sample-strurs-liferay-portlet to work on liferay 5.2.x ?
all I've got is exceptions emoticon
在 09-12-2 上午1:45 发帖以回复 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.
在 09-12-3 下午9:59 发帖以回复 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!!
在 10-2-23 下午6:08 发帖。
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
在 10-4-4 上午7:03 发帖以回复 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
在 10-4-21 下午10:13 发帖以回复 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
在 10-5-2 下午11:29 发帖以回复 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)
在 10-7-21 下午9:22 发帖。
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
在 10-10-26 上午4:29 发帖。
hi,
i m not getting {EXTN_HOME}. where it is?
please any one tell me.
在 11-4-19 上午3:38 发帖以回复 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...
在 11-5-28 上午12:03 发帖。
can any one please provide me step by step process to implement struts in liferay in eclipse.
在 11-10-28 下午12:21 发帖。