掲示板

problem in creating sample struts2 portlet

15年前 に ganesh h d によって更新されました。

problem in creating sample struts2 portlet

New Member 投稿: 7 参加年月日: 08/07/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
15年前 に stephane Manou によって更新されました。

RE: problem in creating sample struts2 portlet#H

New Member 投稿: 12 参加年月日: 07/02/02 最新の投稿
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?
15年前 に ganesh h d によって更新されました。

RE: problem in creating sample struts2 portlet#H

New Member 投稿: 7 参加年月日: 08/07/22 最新の投稿
HI
I have attached all related files of the sample2portlet . hope this will help u

regards
Ganesh H D
15年前 に ganesh h d によって更新されました。

RE: problem in creating sample struts2 portlet#H

New Member 投稿: 7 参加年月日: 08/07/22 最新の投稿
hi
thumbnail
15年前 に stephane Manou によって更新されました。

RE: problem in creating sample struts2 portlet#H

New Member 投稿: 12 参加年月日: 07/02/02 最新の投稿
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
15年前 に stephane Manou によって更新されました。

RE: problem in creating sample struts2 portlet

New Member 投稿: 12 参加年月日: 07/02/02 最新の投稿
Hi, do you solve the problem?
15年前 に ganesh h d によって更新されました。

RE: problem in creating sample struts2 portlet

New Member 投稿: 7 参加年月日: 08/07/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
13年前 に Lam Le によって更新されました。

RE: problem in creating sample struts2 portlet

New Member 投稿: 10 参加年月日: 09/06/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
13年前 に Brian Scott Schupbach によって更新されました。

RE: problem in creating sample struts2 portlet

Expert 投稿: 329 参加年月日: 08/10/23 最新の投稿
works great!

thanks a lot
8年前 に Patrik Holecka によって更新されました。

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

添付ファイル:

8年前 に hamed yousefi によって更新されました。

RE: problem in creating sample struts2 portlet

New Member 投稿: 10 参加年月日: 15/08/12 最新の投稿
i have the same problem, no data passing from view.jsp to action class.

what should i do? what is the solution?