留言板

problem in creating sample struts2 portlet

ganesh h d,修改在15 年前。

problem in creating sample struts2 portlet

New Member 帖子: 7 加入日期: 08-7-22 最近的帖子
Hi all,

Iam trying to create a sample struts2 portlet. i have followed the tutorial that is been published in the following site http://cwiki.apache.org/confluence/display/WW/Struts+2+Portlet+Tutorial. Iam using liferay-portal-tomcat-6.0-5.0.1 to deploy the portlet.
wen i start the server i am able to see the following messages.

[PortletHotDeployListener:440] 1 portlets for Struts2Portlet registered successfully.

So its ben registered properly, but when i open the life ray portal following exception is been thrown...

06:13:09,453 ERROR [Jsr168Dispatcher:422] Could not find action
There is no Action mapped for namespace /view and action name index. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:34)
at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:415)
at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:299)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:121)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.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.java:535)....................

i come to know that the helper class which is been used to add the portlet in the main page of of the portal is written using struts1 action class. i think this sturts 1 action class could not communicate with the sturts 2 action class of my sample portlet.
If any body knows any information regarding this problem please do reply soon.

regards
Ganesh H D
thumbnail
stephane Manou,修改在15 年前。

RE: problem in creating sample struts2 portlet#H

New Member 帖子: 12 加入日期: 07-2-2 最近的帖子
Hello,

I´m trying the same thing, but i´ve got some problem by the registration:

Error registering portlets for HelloPortlet.


I think i do not write the liferay-portlet.xml correctly, can you publish your liferay-portlet.xml, i don´t know waht i have to write by the <struts-path>?


I also create a HelloPortlet.war as follow:


WEB-INF/classes -> all sample classes
WEB-INF/jsp -> all sample jsp
WEB-INF/lib -> all required jars

and in WEBN-INF all xml, but my web.xml is like in sample empty, is it correct? can you help me?
ganesh h d,修改在15 年前。

RE: problem in creating sample struts2 portlet#H

New Member 帖子: 7 加入日期: 08-7-22 最近的帖子
HI
I have attached all related files of the sample2portlet . hope this will help u

regards
Ganesh H D
ganesh h d,修改在15 年前。

RE: problem in creating sample struts2 portlet#H

New Member 帖子: 7 加入日期: 08-7-22 最近的帖子
hi
thumbnail
stephane Manou,修改在15 年前。

RE: problem in creating sample struts2 portlet#H

New Member 帖子: 12 加入日期: 07-2-2 最近的帖子
Hi,

i´ve always got the same problem, i send you my HelloPortlet.war (without the jars), can you send me yours (without the jars)?
thumbnail
stephane Manou,修改在15 年前。

RE: problem in creating sample struts2 portlet

New Member 帖子: 12 加入日期: 07-2-2 最近的帖子
Hi, do you solve the problem?
ganesh h d,修改在15 年前。

RE: problem in creating sample struts2 portlet

New Member 帖子: 7 加入日期: 08-7-22 最近的帖子
hey, i got an sample struts 2 portlet. i just created the war file and deployed. its working fine. go to following site
http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/struts2-portlet/2.1.1-SNAPSHOT/ and download the WAR file by name "struts2-portlet-2.1.1-SNAPSHOT.war". enjoy (: .

regards,
Ganesh H D
Lam Le,修改在13 年前。

RE: problem in creating sample struts2 portlet

New Member 帖子: 10 加入日期: 09-6-16 最近的帖子
Hi Ganesh,
Thank you for your sample.
That was a great help.
Attached is another simpler sample I have made, hope it can help others.
thumbnail
Brian Scott Schupbach,修改在13 年前。

RE: problem in creating sample struts2 portlet

Expert 帖子: 329 加入日期: 08-10-23 最近的帖子
works great!

thanks a lot
Patrik Holecka,修改在8 年前。

RE: problem in creating sample struts2 portlet

Junior Member 帖子: 46 加入日期: 13-10-21 最近的帖子
Hi,
I tried to make struts2 portlet based on your example but I can't get it work. When I submit form a parameters(userName) are not passed in action class. Can anybody paste here working example of struts portlet under liferay 6.2CE? I don't know where can be problem in my portlet.
In attachment is my maven portlet.
Thanks a lot.
Patrik
hamed yousefi,修改在8 年前。

RE: problem in creating sample struts2 portlet

New Member 帖子: 10 加入日期: 15-8-12 最近的帖子
i have the same problem, no data passing from view.jsp to action class.

what should i do? what is the solution?