Freeswitch transfer on fail - freeswitch

I have this extension for gsm gateway
<extension name="incoming_from_gsm" >
<condition field="destination_number" expression="987987" >
<action application="set" data="transfer_on_fail=USER_BUSY,SUBSCRIBER_ABSENT,USER_NOT_REGISTERED BRIDGE_FAILED_EXTENSION" />
<action application="set" data="hangup_after_bridge=true" />
<action application="answer" />
<action application="sleep" data="1000" />
<action application="start_dtmf" />
<action application="play_and_get_digits" data="1 4 1 10000 # /usr/local/freeswitch/sounds/ru/RU/elena/ivr/48000/ivr-enter_ext.wav silence_stream://250 INTERNAL_PHONE_NUMBER" />
<action application="log" data="INFO digits collected for internal phone ${INTERNAL_PHONE_NUMBER}" />
<action application="bridge" data="user/${INTERNAL_PHONE_NUMBER}#${domain_name}" />
</condition>
</extension>
And extension for failed bridges
<extension name="BRIDGE_FAILED_EXTENSION" >
<condition field="destination_number" expression=".*" >
<action application="log" data="hangup cause was:::::: ${originate_disposition}" />
</condition>
<condition field="${originate_disposition}" expression="SUBSCRIBER_ABSENT">
<action application="log" data="hangup cause was ${originate_disposition}" />
<action application="playback" data="voicemail/vm-that_was_an_invalid_ext.wav" />
<action application="hangup" data="NORMAL_CLEARING" />
</condition>
<condition field="${originate_disposition}" expression="USER_NOT_REGISTERED">
<action application="log" data="hangup cause was ${originate_disposition}" />
<action application="playback" data="/usr/local/freeswitch/sounds/phone_not_registered.wav" />
<action application="hangup" data="NORMAL_CLEARING" />
</condition>
<condition field="${originate_disposition}" expression="USER_BUSY">
<action application="log" data="hangup cause was ${originate_disposition}" />
<action application="playback" data="/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-user_busy.wav" />
<action application="hangup" data="NORMAL_CLEARING" />
</condition>
</extension>
I want it to play some messages when user does not exist, not available or busy, bot no conditions match.
Log
2017-03-13 16:30:50.015492 [INFO] mod_dptools.c:1566 digits collected for internal phone 387
2017-03-13 16:30:50.015492 [NOTICE] switch_ivr_originate.c:2651 Cannot create outgoing channel of type [error] cause: [USER_NOT_REGISTERED]
2017-03-13 16:30:50.015492 [NOTICE] switch_ivr_originate.c:2651 Cannot create outgoing channel of type [user] cause: [USER_NOT_REGISTERED]
2017-03-13 16:30:50.015492 [INFO] mod_dptools.c:3123 Originate Failed. Cause: USER_NOT_REGISTERED
2017-03-13 16:30:50.015492 [INFO] mod_hash.c:304 Usage for 10.133.20.100_1004 is now 0
2017-03-13 16:30:50.015492 [NOTICE] switch_ivr.c:1831 Transfer sofia/internal/1004#10.133.20.100:5060 to XML[BRIDGE_FAILED_EXTENSION#default]
2017-03-13 16:30:50.015492 [INFO] mod_dialplan_xml.c:558 Processing 79040374921 <79040374921>->BRIDGE_FAILED_EXTENSION in context default
2017-03-13 16:30:50.015492 [INFO] switch_limit.c:126 incr called: 10.133.20.100_1004 max:1, interval:0
2017-03-13 16:30:50.015492 [INFO] mod_hash.c:202 Usage for 10.133.20.100_1004 is now 1/1
2017-03-13 16:30:53.855491 [NOTICE] mod_dptools.c:1179 Hangup sofia/internal/1004#10.133.20.100:5060 [CS_EXECUTE] [NONE]
2017-03-13 16:30:53.855491 [INFO] mod_hash.c:304 Usage for 10.133.20.100_1004 is now 0
2017-03-13 16:30:53.995503 [NOTICE] switch_core_session.c:1560 Session 4 (sofia/internal/1004#10.133.20.100:5060) Ended
2017-03-13 16:30:53.995503 [NOTICE] switch_core_session.c:1564 Close Channel sofia/internal/1004#10.133.20.100:5060 [CS_DESTROY]
I see that it transfers failed bridge to BRIDGE_FAILED_EXTENSION, but nothing else (no log INFO from extension, no messages in my phone).

Related

Android-10 DeepLink is not working..., but works below android 10 versions

Android-10 DeepLink is not working..., but works below android 10 versions
<activity
android:name="com.post.rest"
android:screenOrientation="portrait">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="my-post.org"
android:pathPrefix="/diet.apk" />
<data
android:scheme="https"
android:host="my-post.org"
android:pathPrefix="/diet.apk" />
</intent-filter>
</activity>
please help me ...thanks

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED on Android 6 (API 23)

I am unable to deploy my app (in debug/release) on Android 6 (API 23) but on Android 8 (API 26) and Android 9 (API 28) everything works fine. There is a INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error in output.
Output:
Detecting installed packages...
Copying application to device...
90% ... 21184kb of 23527kb copied
100% ... 23527kb of 23527kb copied
ADB0000: Deployment failed Mono.AndroidTools.InstallFailedException:
Unexpected install output: pkg:
/data/local/tmp/com.companyname.appname-Signed.apk Failure
[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A_work\275\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1 t) in E:\A\_work\275\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753
at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
ADB0010: Unexpected install output: pkg:
/data/local/tmp/com.companyname.appname-Signed.apk Failure
[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
at
Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String
output, String packageName) in
E:\A_work\275\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line
345 at
Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1
t) in
E:\A\_work\275\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line
753 at
System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute() Done building project
"AppNameInCamelCase.Droid.csproj" -- FAILED.
Blockquote
Build FAILED.
2>Deployment failed to Samsung SM-G800F.
========== Build: 1 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Here is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.companynameallinsmall.appnameallinsmall" android:versionName="X.X.x" android:versionCode="XXXYYY">
<!--Target SDK version should be 25+ in order to ask for permissions in popups.-->
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<!--Permissions which are requested via popup.-->
<!--For logging and data writing.-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--For picking photo.-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--For location-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--Permissions granted during installation.-->
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature android:name="android.hardware.sensor.compass" android:required="false" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true" />
<uses-feature android:name="android.hardware.location" android:required="true" />
<uses-feature android:name="android.hardware.location.gps" android:required="true" />
<uses-feature android:name="android.hardware.location.network" android:required="true" />
<application android:label="CamelCase Name" android:theme="#style/STAPPCustomTheme">
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YXSIBIDGA......" />
</application>
</manifest>
Compiled AndroidManifest - Obj Folder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.companynameallinsmall.appnameallinsmall" android:versionName="X.X.x" android:versionCode="XXXYYY">
<!--Target SDK version should be 25+ in order to ask for permissions in popups.-->
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<!--Permissions which are requested via popup.-->
<!--For logging and sensor data writing.-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--For picking photo.-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--For location-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--Permissions granted during installation.-->
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature android:name="android.hardware.sensor.compass" android:required="false" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true" />
<uses-feature android:name="android.hardware.location" android:required="true" />
<uses-feature android:name="android.hardware.location.gps" android:required="true" />
<uses-feature android:name="android.hardware.location.network" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<application android:label="CamelCase Name" android:theme="#style/STAPPCustomTheme" android:name="android.app.Application" android:allowBackup="true" android:icon="#mipmap/icon" android:debuggable="true">
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YXSIBIDGA......" />
<activity android:configChanges="orientation|screenSize" android:icon="#mipmap/icon" android:label="CamelCase Name" android:launchMode="singleTop" android:screenOrientation="portrait" android:name="md***********.MainActivity" />
<activity android:configChanges="orientation|screenSize" android:icon="#mipmap/icon" android:label="CamelCase Name" android:noHistory="true" android:screenOrientation="portrait" android:theme="#style/Theme.SplashNotPowered" android:name="md***********.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider android:authorities="com.companynameallinsmall.appnameallinsmall.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="Companyname.Utils.fileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/companynameallinsmall_utils_fileprovider_file_paths" />
</provider>
<service android:name="md***********.MatchaBackgroundService" />
<receiver android:enabled="true" android:exported="false" android:label="Connectivity Plugin Broadcast Receiver" android:name="md***********.ConnectivityChangeBroadcastReceiver" />
<activity android:configChanges="orientation|screenSize" android:name="md***********.MediaPickerActivity" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="md***********.BatteryBroadcastReceiver" />
<provider android:authorities="com.companynameallinsmall.appnameallinsmall.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="xamarin.essentials.fileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/xamarin_essentials_fileprovider_file_paths" />
</provider>
<receiver android:enabled="true" android:exported="false" android:name="md***********.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.companynameallinsmall.appnameallinsmall.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.com.companynameallinsmall.appnameallinsmall" />
</intent-filter>
</receiver>
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
</application>
</manifest>
Lint output AndroidManifest.xml:
Scanning manifest:
manifest: Error: Can't find API database; API check not performed [LintError]
AndroidManifest.xml:43: Warning: Use '$' instead of '.' for inner
classes (or use only lowercase letters in package names); replace
"Companyname.Utils.fileProvider" with "Companyname$Utils$fileProvider"
[InnerclassSeparator]
<provider android:authorities="com.companynameallinsmall.fileProvider"
android:exported="false" android:grantUriPermissions="true" android:name="Companyname.Utils.fileProvider">
AndroidManifest.xml:33: Error: Avoid hardcoding the debug mode; leaving it out allows debug
and release builds to automatically assign one [HardcodedDebugMode]
<application android:label="CamelCase Name" android:theme="#style/STAPPCustomTheme" android:name="android.app.Application" android:allowBackup="true" android:icon="#mipmap/icon" android:debuggable="true">
AndroidManifest.xml:33: Warning: On SDK
version 23 and up, your app data will be automatically backed up and
restored on app install. Consider adding the attribute
android:fullBackupContent to specify an #xml resource which configures
which files to backup. More info:
https://developer.android.com/training/backup/autosyncapi.html
[AllowBackup]
<application android:label="CamelCase Name" android:theme="#style/STAPPCustomTheme"
android:name="android.app.Application" android:allowBackup="true"
android:icon="#mipmap/icon" android:debuggable="true">
AndroidManifest.xml:33: Warning: App is not indexable by Google
Search; consider adding at least one Activity with an ACTION-VIEW
intent filter. See issue explanation for more details.
[GoogleAppIndexingWarning]
<application android:label="CamelCase Name" android:theme="#style/STAPPCustomTheme" android:name="android.app.Application" android:allowBackup="true" android:icon="#mipmap/icon" android:debuggable="true">
^ 2 errors, 3
warnings
My Installed Android SDKs
1.To resolve the first error:
manifest: Error: Can't find API database; API check not performed
[LintError]
You can try to set the Linking option to None
2.To resolve the second error:
AndroidManifest.xml:33: Error: Avoid hardcoding the debug mode;
leaving it out allows debug and release builds to automatically assign
one [HardcodedDebugMode]
You can try to disable Debugging in your code:
For more details, you can check:
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/?tabs=windows#disable-debugging
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/debuggable-attribute
Note:
If your app still has problems,could you please post a basic demo so that we can test on my side?

Oozie actionData not available on Error

I have a oozie job as follows:
<action name="action1">
<ssh xmlns="uri:oozie:ssh-action:0.1">
<host>${sshHost}</host>
<command>${scriptDir}/${scriptName}</command>
<capture-output/>
</ssh>
<ok to="scheduleOkAction" />
<error to="scheduleErrorAction" />
</action>
<action name="action2">
<email xmlns="uri:oozie:email-action:0.1">
<to>${emailToAddress}</to>
<subject>Workflow failed to run</subject>
<body>
[Workflow - ${wf:name()}] failed to run.
Stack Trace
${wf:actionData('action1')['ERROR']}
</body>
</email>
<ok to="kill" />
<error to="kill" />
</action>
<action name="action3">
<email xmlns="uri:oozie:email-action:0.1">
<to>${emailToAddress}</to>
<subject>Success</subject>
<body>
[Workflow - ${wf:name()}] - OK.
${wf:actionData('action1')['SUCCESS_CODE']}
</body>
</email>
<ok to="kill" />
<error to="kill" />
</action>
When 'action1' run with out an exception, the workflow takes me to 'action3' and sends me an email with the 'SUCCESS_CODE' actionData. But when 'action1' throws an exception, the workflow takes me to 'action2' and sends me an email with out 'ERROR' actionData.
Is it a valid behavior to loose all actionData in an event of error in Oozie? Or am I missing something?

My app supports no device

I've got a big problem with my first app. I've uploaded the app earlier this day to the Google Play Store and there it says that my app supports zero devices. What am I doing wrong? Here is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:resizeable="true" />
<uses-feature
android:name="android.service.wallpaper"
android:required="true">
</uses-feature>
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="app.wallpaper.com.giflivewallpaper.MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="app.wallpaper.com.giflivewallpaper.GIFWallpaperService"
android:enabled="true"
android:label="Particle Live Wallpaper"
android:permission="android.permission.BIND_WALLPAPER" >
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="#xml/wallpaper" >
</meta-data>
</service>
</application>
In your uses-feature, did you mean android.software.live_wallpaper?
<uses-feature
android:name="android.software.live_wallpaper"
android:required="true">
</uses-feature>
http://developer.android.com/guide/topics/manifest/uses-feature-element.html

struts2 errors lost

I trying to use struts2 validation framework. I have a ActionName-validation.xml in place. Entry in the struts.xml is as follows
<action name="registerCandidateStep1" class="candidateAction"
method="registerCandidateStep1">
<result name="success" type="tiles">registerCandidate</result>
<result name="input" type="chain">
<param name="actionName">loadCandidateRegistrationForm</param>
<param name="namespace">/.secureActions</param>
</result>
</action>
<action name="loadCandidateRegistrationForm" class="loadCandidateFromAction"
method="loadCandidateRegistrationForm">
<result name="success" type="tiles">registerCandidate</result>
</action>
on error condition request do get forwarded to "loadCandidateRegistrationForm" but i dont see error on the page. I have included tag in the jsp
StrutsConfig.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.objectFactory" value="spring" />
<constant name="struts.devMode" value="false" />
<constant name="struts.action.extension" value="action" />
<constant name="struts.custom.i18n.resources" value="global" />
<package name="org" namespace="/"
extends="struts-default,json-default">
<result-types>
<result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<global-results>
<result name="welcome" type="tiles">welcome</result>
</global-results>
</package>
<package name="org.unsecureActions" extends="org">
<!--
This package contains such a actions which doesn't need user logged
in.
-->
<action name="welcome" method="forwardAction" class="baseAction">
<result name="success" type="tiles">welcome</result>
</action>
<action name="logout" method="logoutCandidate" class="logoutAction">
<result name="success" type="tiles">welcome</result>
</action>
<action name="loadAdvanceSearchForm" method="loadAdvanceSearch"
class="advanceSearchAction">
<result name="success" type="tiles">advanceSearch</result>
</action>
<!--Candidate workflow actions -->
<action name="registerCandidateStep1" class="candidateAction"
method="registerCandidateStep1">
<interceptor-ref name="store">
<param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result name="success" type="tiles">registerCandidate</result>
<result name="input" type="redirect">loadCandidateRegistrationForm.action</result>
</action>
<action name="registerCandidateStep2" class="candidateAction"
method="registerCandidateStep2">
<result name="success" type="tiles">registerCandidate</result>
<result name="input" type="tiles">loadCandidateRegistrationForm</result>
</action>
<action name="registerCandidateStep3" class="candidateAction"
method="registerCandidateStep3">
<result type="chain">
<param name="actionName">loginCandidate</param>
<param name="namespace">/org.unsecureActions</param>
</result>
<result name="input" type="tiles">registerCandidate</result>
</action>
<action name="loadCandidateRegistrationForm" class="loadCandidateFromAction"
method="loadCandidateRegistrationForm">
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
<result name="success" type="tiles">registerCandidate</result>
</action>
<!--Candidate workflow actions -->
<action name="loginCandidate" class="loginAction" method="loginCandidate">
<result name="success" type="tiles">home</result>
<result name="input" type="tiles">welcome</result>
</action>
</package>
<package name="org.secureActions" extends="org">
<!--
This package contains such a actions which needs user must logged in
before executing these.
-->
<interceptors>
<!--
Following interceptor checks for is user logged in before executing
the action.
-->
<interceptor name="contextSecurityInterceptor"
class="org.kovid.matrimony.interceptor.ContextSecurityInterceptor">
</interceptor>
<!--
This stack is as like default stack provided ny Struts Only
difference is at the bottom of folowing stack where we included our
"contextSecurityInterceptor" interceptor.
-->
<interceptor-stack name="applicationStack">
<interceptor-ref name="exception" />
<interceptor-ref name="alias" />
<interceptor-ref name="servletConfig" />
<interceptor-ref name="prepare" />
<interceptor-ref name="i18n" />
<interceptor-ref name="chain" />
<interceptor-ref name="debugging" />
<interceptor-ref name="profiling" />
<interceptor-ref name="scopedModelDriven" />
<interceptor-ref name="modelDriven" />
<interceptor-ref name="fileUpload" />
<interceptor-ref name="checkbox" />
<interceptor-ref name="staticParams" />
<interceptor-ref name="actionMappingParams" />
<interceptor-ref name="params" />
<interceptor-ref name="conversionError" />
<interceptor-ref name="validation" />
<interceptor-ref name="workflow" />
<interceptor-ref name="contextSecurityInterceptor" />
</interceptor-stack>
</interceptors>
<!--
Setting default stack for interceptor taking care of this packageS.
-->
<default-interceptor-ref name="applicationStack" />
<action name="home" method="forwardAction" class="baseAction">
<result name="success" type="tiles">home</result>
</action>
<action name="loadAdvanceSearchForm" method="loadAdvanceSearch"
class="advanceSearchAction">
<result name="success" type="tiles">advanceSearch</result>
</action>
<action name="simpleSearch" method="simpleSearch" class="simpleSearchAction">
<result name="success" type="tiles">search</result>
<result name="input" type="tiles">home</result>
</action>
<action name="advanceSearch" method="advanceSearch" class="advanceSearchAction">
<result name="success" type="tiles">search</result>
</action>
<action name="loadImage" method="loadImage" class="imageAction">
<result name="imageData" type="stream">
<param name="contentType">${imageContentType}</param>
<param name="inputName">imageStream</param>
<param name="contentDisposition">filename="candidate.jpeg"</param>
<param name="bufferSize">${myBufferSize}</param>
</result>
</action>
</package>
</struts>
Action chaining is actively discouraged, and interactions with the validation interceptor is one reason why. You might be able to sneak around it by explicitly mapping some values (like the validation messages) from one action to the next, but... don't chain actions--there's almost never a reason to do so.
Like Dave said, Action Chaining is discouraged.
Action Chaining :
Don't Try This at Home
As a rule, Action Chaining is not recommended.
First explore other options, such as the Redirect After Post
technique.
And if you have good reason to use Redirect After Post, use the
Redirect Result + Message Store Interceptor OR
Redirect Action Result + Message Store Interceptor
Life time of Errors lasts for the current Action. If you forward/redirect to another action, then the errors will be lost.
Use session scope instead. Place ArrayList in session and append your errors/messages.
Action/Interceptor:
Map session = ActionContext.getContext().getSession();
List<String> errors = session.get("errorMessages");
if(errors==null)
session.put("errorMessages", errors=new ArrayList<String>() );
errors.add("Invalid Username/Password. Kindly retry");
JSP:
<s:iterator var="msg" value="#session.errorMessages" >
<p> ${msg} </p>
</s:iterator>
<s:set scope="session" var="errorMessages" value="%{null}" /><%--flush errors--%>

Resources