struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srikanth <sreekanth.n...@egovernments.org>
Subject Struts Conventional plugin is not working, Not calling invoking my Action but page is displaying
Date Sat, 12 Nov 2011 16:59:24 GMT
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.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/content/common/homepage.jsp

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

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

Its not going to the HomepageAction execute method but the page is displaying

thanks





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message