Announcement Announcement Module
Collapse
No announcement yet.
struts2 portlet with spring on liferay problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • struts2 portlet with spring on liferay problem

    i integrated struts2 portlet with spring into liferay portlet container but i failed to create action of struts with spring

    first i use struts 2 spring plugin and create the action into spring config file like
    <bean id="helloStruts2Portlet2" class="com.portlet.struts.HelloStruts2Portlet">
    <property name="title" value="Software Engineer"/>
    </bean>

    then i mapped the id of bean to action on struts config file like:

    <package name="view" extends="struts-portlet-default" namespace="/view">
    <action name="helloForm" class="helloStruts2Portlet2">
    <result name="input">/WEB-INF/view/index.jsp</result>
    <result name="success">/WEB-INF/view/result.jsp</result>
    </action>
    </package>

    and added also to struts config file these lines:

    <constant name="struts.objectFactory" value="spring" /><constant name="struts.devMode" value="false" />

    on jsp i added form with action helloForm

    deployment succeed with this log:

    16:53:46,720 INFO [STDOUT] 16:53:46,720 INFO [PortletHotDeployListener] Registering portlets for hell

    16:53:46,898 INFO [XmlConfigurationProvider] Parsing configuration file [struts-default.xml]

    16:53:47,047 INFO [XmlConfigurationProvider] Parsing configuration file [struts-plugin.xml]

    16:53:47,080 INFO [XmlConfigurationProvider] Parsing configuration file [struts.xml]

    16:53:47,197 INFO [StrutsSpringObjectFactory] Initializing Struts-Spring integration...

    16:53:47,197 INFO [SpringObjectFactory] Setting autowire strategy to name

    16:53:47,198 INFO [StrutsSpringObjectFactory] ... initialized Struts-Spring integration successfully

    but when submit the form this error was shown:

    16:54:19,692 ERROR [Jsr168Dispatcher] Could not find action

    There is no Action mapped for namespace /view/view and action name helloForm. - [unknown location]

    Thank you.
Working...
X