Action class is not getting invoked after upgrading Struts to 2.3.37 - struts2

I have configured in my index.html page that calls Action servlet. Initially the Struts version was 2.0.14 and it was working fine when the web.xml has the below filter mapping
struts2
org.apache.struts2.dispatcher.FilterDispatcher
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
My struts.xml looks like
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<include file="utils.xml"/>
</struts>
After I upgraded the struts version to 2.3.37, I have modified the web.xml filter mapping to
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
and when I click the href, I'm getting HTTP error 404 saying could not find action class even though my action classes are defined in struts.xml. Please advise.

Related

I am using struts2 application but its asking the spring configuration

I am getting the following error when i am trying to run the manning examples separately out of the sand box.
Error as follows:
You might need to add the following to web.xml:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Jun 17, 2013 7:17:39 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:188)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:479)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:450)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:407)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>manning</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>anotherServlet</servlet-name>
<servlet-class>manning.servlet.AnotherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>anotherServlet</servlet-name>
<url-pattern>/anotherServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
struts.xml
<?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.0.dtd">
<struts>
<!--
For the purposes of the book, we will leave devMode set to true. This
allows several things to occur including provision of debugging level information
on error pages as well as reloading of various resources with each request.
-->
<constant name="struts.devMode" value="true" />
<!--
You can define packages directly in this file, but its probably best
to modularize the configuration files with separate xml files for each
package. Ulitmately its all the same because the include element, seen
below, pulls the included configuration document directly in to the
primary document. The only thing to consider is that a referenced
element must have been declared above the referring element.
-->
<!--
This is the menu action that will allow the reader to see the different
samples actions from the different chapters in a menu format. We declare
it here, in the root namespace, because its not really related to any of the
specific examples or chapters, its just a kind of utility for the whole
application.
-->
<package name="default" namespace="/" extends="struts-default">
<action name="Menu">
<result>/menu/Menu.jsp</result>
</action>
</package>
<include file="manning/chapterTwo/chapterTwo.xml"/>
<include file="manning/chapterThree/chapterThree.xml"/>
<include file="manning/chapterThree/objectBacked/chapterThree.xml"/>
<include file="manning/chapterThree/modelDriven/chapterThree.xml"/>
<include file="manning/chapterFour/chapterFour.xml"/>
<include file="manning/chapterFive/chapterFive.xml"/>
<include file="manning/chapterSix/chapterSix.xml"/>
<include file="manning/chapterSeven/chapterSeven.xml"/>
<include file="manning/chapterEight/chapterEight.xml"/>
<include file="manning/chapterNine/chapterNine.xml"/>
<include file="manning/chapterTen/chapterTen.xml"/>
<include file="manning/chapterEleven/chapterEleven.xml"/>
</struts>
Why i am getting the error. I have removed some configuration regarding spring in web.xml
Change your filter to below
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
And remove struts2-spring-plugin-*.jar from classpath if you have this jar in your classpath and dont want to use Spring integration with Struts2
Please let me know if you still face issue

There is no action mapped etc.. In Struts 2

Yet another question on this I know, but let me just say I looked everything else or about. So, I'm currently building the structure of my Struts 2 Project. I use Struts 2.3.4, JBoss 7.1 and Eclipse Indigo. I also included all the necessary jar into my project. The problem is when I run my application (Add project to Jboss, Run On Server) and go "http://localhost:8080/booxstore/" I get this:
Etat HTTP 404 - There is no Action mapped for namespace [/] and action name [] associated with context path [/booxstore]
My web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>Booxstore</display-name>
<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>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
My struts.xml :
<?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.0.dtd">
<struts>
<constant name="struts.devMode" value="false" />
<package name="pages" namespace="/pages" extends="struts-default">
<action name="afficher" class="com.booxstore.controller.DisplayAction" >
<result name="SUCCESS">/center.jsp</result>
</action>
</package>
</struts>
My action :
/**
*
*/
package com.booxstore.controller;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
public class DisplayAction extends ActionSupport {
/**
*
*/
private static final long serialVersionUID = 8199854978749642334L;
public String execute() throws Exception{
System.out.println("IN");
return Action.SUCCESS;
}
}
My JSP just have plain text and have imported struts 2 tags. Basically no matter what I do I can't get a resource. If I go to "http://localhost:8080/booxstore/" or "http://localhost:8080/booxstore/DisplayAction" I get "There is no action mapped" and if I tried to access directly the jsp I get a 404. Please note my war is deployed and enabled on the server.
Put index.jsp under WebContent folder, move pages folder to WEB-INF and then change the struts.xml with:
<struts>
<constant name="struts.devMode" value="false" />
<package name="pages" extends="struts-default">
<action name="afficher" class="com.booxstore.controller.DisplayAction" >
<result name="SUCCESS">/WEB-INF/pages/center.jsp</result>
</action>
</package>
</struts>
I think that the problem is that the application is not finding the jsps that you are putting in the configuration files. And META-INF folder is not the place for putting your jsps pages if you don't want to make them public, WEB-INF is better for that purpose.
To prevent misunderstandings about mappings, add the config browser plugin jar to your application. It will allow you to browse all pages. Caution! Only deploy the dependency in dev or testing, never ond production. Use maven profiles for this restrictions.
http://struts.apache.org/release/2.3.x/docs/config-browser-plugin.html

Cant load any page with struts 2 . Issue with web.xml

I am trying to run this example using struts 2. I inserted the libraries in the Lib folder of Web-Inf of a dynamic web project in eclipse.
My Web.xml looks like this now:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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>/*</url-pattern>
</filter-mapping>
</web-app>
and i created the struts.xml and placed it inside the source folder , the content of which is
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- Configuration for the default package. -->
<package name="default" extends="struts-default">
<action name="UserAction" class="struts.UserAction">
<result name="input">/index.jsp</result>
<result name="success">/result.jsp</result>
</action>
</package>
</struts>
So now when i run any jsp i get the following error in eclipse console
Unable to load configuration. - bean - jar:file:/D:/Users/Don/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Mscs674-Struts2/WEB-INF/lib/struts2-gxp-plugin-2.3.4.jar!/struts-plugin.xml:8:162
and this on the webpage
HTTP Status 404 -
type Status report
message
description The requested resource () is not available.
Any suggestions ?
The best way i found to create struts 2 application is to use the struts-blank.jar file. It has all the required configurations done for you, and you can remove some example files. It will have all the jars and xml files created for you.
If you still have problems, try doing this now...
first remove all jar (adding all lib is not solution)
Only add necessary libraries
so problem is you are having too many lib
Seems like some jars are missing .. !!
The common dependecies are ::
commons-fileupload-1.2.1.jar
- commons-io-1.3.2.jar
- commons-logging-1.0.4.jar
- commons-logging-api-1.1.jar
- freemarker-2.3.15,jar
- log4j-1.2.14.jar
- ognl-2.7.3.jar
- xwork-core-2.1.6.jar
Check the version number and add jars to classpath.
You do One thing..add javassist-3.11.0.GA.jar file.it will remove your error like
Dispatcher initialization failed java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException ..
I hope this will help you..

struts2 ignore particular pattern

I am using strust2 for my web application development. My struts.xml file will be like:
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default" namespace ="/">
<action name="signup">
<result>/check.jsp</result>
</action>
</package>
</struts>
and my web.xml file will be something like:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>sample</display-name>
<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>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>My WS</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.dr1.dr2</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>My WS</servlet-name>
<url-pattern>/checking</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
and now,
if i access like: http://localhost:8080/appName/ its going to my signup action perfectly.
But when i tried to access like http://localhost:8080/appName/checking (for webservices), Its even looking in struts.xml and getting an error message like:
HTTP Status 404 - There is no Action mapped for namespace / and action name checking...
even after defining this in web.xml..
Is there any way to exclude a pattern in struts2, so that when I hit http://localhost:8080/appName/checking, it must not look struts action, it must call my default page path defined in web.xml file.
Thanks..
you can probably add exclude pattern in your struts.xml, something like
<struts>
<constant name="struts.action.excludePattern" value="appName/checking"/>
</struts>
read here and find excludePattern for more information.
this could works:
<!-- exclude pattern -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/struts/*</url-pattern>
</filter-mapping>
an action exampe:
<constant name="struts.action.excludePattern" value="appName/checking"/>
the constant excludePattern explicit exclusions (since 2.1.7)

Struts 2 Tile and REST plugin

I'm trying to get my Struts2 project running with Tiles and REST Plugin but I just can't get it working.
I've looked at the documentation for both and I think i'm doing it right. here are my files:
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app metadata-complete="true" version="2.5"
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">
<!-- listeners -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
<!-- context params -->
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles-tradesman.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring-tradesman.xml</param-value>
</context-param>
<!-- filters -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!-- filter mappings -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
struts.xml
<?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.0.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<!-- RESTful plugin setup -->
<constant name="struts.mapper.class" value="rest" />
<constant name="struts.convention.action.suffix" value="Controller"/>
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<constant name="struts.convention.default.parent.package" value="rest-default"/>
<constant name="struts.convention.package.locators" value="tp"/>
<package name="tradesman" namespace="/beta/tradesman" extends="default">
<result-types>
<result-type name="json" class="org.apache.struts2.json.JSONResult"/>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<interceptors>
<interceptor name="json" class="org.apache.struts2.json.JSONInterceptor"/>
</interceptors>
</package>
</struts>
JobAlertsController.java
package uk.co.ratedpeople.tp;
import com.opensymphony.xwork2.ActionSupport;
import java.util.logging.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
public class JobAlertsController extends ActionSupport {
private static final Logger LOGGER = Logger.getLogger(JobAlertsController.class.getName());
#Action(results={
#Result(name = SUCCESS, location = "tradesman.page.jobalerts", type = "tiles")
})
public String index() {
LOGGER.info("executing index action...");
LOGGER.info("leaving index action...");
return SUCCESS;
}
}
When i try to run the project I get this error:
SEVERE: Exception starting filter struts2
Unable to load configuration. - [unknown location]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:195)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4542)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5220)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5215)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
... 13 more
Caused by: The Result type [tiles] which is defined in the Result annotation on the class [class uk.co.ratedpeople.tp.JobAlertsController] or determined by the file extension or is the default result type for the PackageConfig of the action, could not be found as a result-type defined for the Struts/XWork package [uk.co.ratedpeople.tp#rest-default#] - [unknown location]
at org.apache.struts2.convention.DefaultResultMapBuilder.createResultConfig(DefaultResultMapBuilder.java:427)
at org.apache.struts2.convention.DefaultResultMapBuilder.createFromAnnotations(DefaultResultMapBuilder.java:399)
at org.apache.struts2.convention.DefaultResultMapBuilder.build(DefaultResultMapBuilder.java:200)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.createActionConfig(PackageBasedActionConfigBuilder.java:864)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildConfiguration(PackageBasedActionConfigBuilder.java:650)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:335)
at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 15 more
27-Jul-2011 17:07:07 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
I'm sure i'm doing something really stupid but I can't see it myself. Anyone?
First, I would suggest putting your struts actions in a package simply called struts, I've had much less configuration issues when using standard conventions plugin architecture. Move your actions to a package like:
uk.co.ratedpeople.struts
instead of
uk.co.ratedpeople.tp;
The less out of the box configuration, the better off you typically are.
This also eliminates the need for this:
<constant name="struts.convention.package.locators" value="tp"/>
Second, part of your problem is with your xml configuration:
<struts>
<constant name="struts.devMode" value="true" />
<!-- RESTful plugin setup -->
<constant name="struts.mapper.class" value="rest" />
<constant name="struts.convention.action.suffix" value="Controller"/>
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<constant name="struts.convention.default.parent.package" value="rest-default"/>
<constant name="struts.convention.package.locators" value="tp"/>
<package name="tradesman" namespace="/beta/tradesman" extends="default">
<result-types>
<result-type name="json" class="org.apache.struts2.json.JSONResult"/>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<interceptors>
<interceptor name="json" class="org.apache.struts2.json.JSONInterceptor"/>
</interceptors>
</package>
Try something like this instead (providing you moved your actions as previously suggested):
<struts>
<constant name="struts.devMode" value="true" />
<!-- RESTful plugin setup -->
<constant name="struts.mapper.class" value="rest" />
<constant name="struts.convention.action.suffix" value="Controller"/>
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<constant name="struts.convention.default.parent.package" value="tradesman"/>
<package name="tradesman" namespace="/beta/tradesman" extends="rest-default">
<result-types>
<result-type name="json" class="org.apache.struts2.json.JSONResult"/>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
</package>
</struts>
Notice the constant name="struts.convention.default.parent.package" value="tradesman" which is referring to the package below it which defines your result types and extends rest-default. This should eliminate your tiles result definition errors.
I've also run into issues using the struts filter you have in your web.xml, I would change from:
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
to:
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

Resources