struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sreekanth S Nair (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (WW-3705) Struts 2 Conventional Plugin is not working
Date Sat, 12 Nov 2011 12:28:51 GMT
Struts 2 Conventional Plugin is not working
-------------------------------------------

                 Key: WW-3705
                 URL: https://issues.apache.org/jira/browse/WW-3705
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Convention
    Affects Versions: 2.2.3.1
         Environment: Jboos AS 7
            Reporter: Sreekanth S Nair


struts.xml is like

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.1.7.dtd">

<struts>
	<constant name="struts.devMode" value="true" />
	<constant name="struts.configuration.xml.reload" value="true"/> 	
	<constant name="struts.convention.result.path" value="/jsp" />
	<constant name="struts.convention.action.packages" value="my.struts2.example.web.actions"
/>
	<constant name="struts.custom.i18n.resources" value="custom" />
	<constant name="struts.i18n.reload" value="false" />
	<constant name="struts.locale" value="en_IN" />
	<constant name="struts.multipart.maxSize" value="10485760" />
	<constant name="struts.multipart.parser" value="jakarta"/>
	
	<package name="mypackage" extends="struts-default" namespace="/">
            ...................
        </package>
</struts>


web.xml is like 
<web-app xmlns="http://java.sun.com/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

     version="2.5">
.............
         <filter>
		<filter-name>struts2</filter-name>
		<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
	</filter>
        <filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>*.action</url-pattern>
	</filter-mapping>
...............
</web-app>

Project structure is like

XYZ.ear-|
        |--xyz.war
        |
        |--lib-|
               |- xyz.jar
               |- struts2-core-2.2.3.1.jar
               |- struts2-convention-plugin-2.2.3.1.jar
               |- xwork-core-2.2.3.1.jar
               |- freemarker-2.3.16.jar
               | etc (all jars required for struts2)
 
xyz.jar is containing my struts.xml file

xyz.jar contains my Action class as follows.

my.struts2.example.web.actions.common 
//java imports......
@ParentPackage("mypackage")
public class HomepageAction extends ActionSupport {

   public String execute() {
      return SUCCESS;
   }
}

xyz.war contains my jsp for HomepageAction like as follows

...WEB-INF/jsp/common/homepage.jsp


With this my server is starting successfully and deployed as expected but when i provide URL
like

http://localhost:8080/xyz/common/homepage.action

Its throwing 

Struts has detected an unhandled exception:

Messages:	
There is no Action mapped for namespace /common and action name homepage.
Stacktraces

There is no Action mapped for namespace /common and action name homepage. - [unknown location]
    com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
    org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
    org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
    com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
   


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message