From user-return-218782-archive-asf-public=cust-asf.ponee.io@struts.apache.org Wed Jan 17 10:37:13 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 9BB9D18062C for ; Wed, 17 Jan 2018 10:37:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8C189160C35; Wed, 17 Jan 2018 09:37:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D16F8160C1B for ; Wed, 17 Jan 2018 10:37:12 +0100 (CET) Received: (qmail 45810 invoked by uid 500); 17 Jan 2018 09:37:11 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 92831 invoked by uid 99); 17 Jan 2018 08:29:56 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.243 X-Spam-Level: ** X-Spam-Status: No, score=2.243 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FROM_MISSPACED=0.001, FROM_MISSP_EH_MATCH=0.769, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_LOW=-0.7, SPF_SOFTFAIL=0.972] autolearn=disabled MIME-Version: 1.0 Message-ID: Subject: Re: Multiple configuration files and incorrect global-results for different namespaces References: From: "shahzad.ismail@gmail.com" In-Reply-To: Content-Type: text/plain; charset="iso-8859-1" x-ponymail-sender: 9d1c8d80eb7a6d50aba707871d24da3a312cd85d Date: Wed, 17 Jan 2018 08:29:52 -0000 x-ponymail-agent: PonyMail Composer/0.2 To: X-Mailer: LuaSocket 3.0-rc1 On 2018-01-12 23:26, Yasser Zamani wrote: > > > On 1/11/2018 11:13 AM, sim4biz@gmail.com wrote: > > My question is originally posted here: > > https://stackoverflow.com/questions/48166761/struts-2-multiple-configuration-files-and-global-results-for-different-namespace > > > > But it is incorrectly marked as duplicate. Due to less formatting options, I'll be brief. > > I'm migrating a big struts1 application to struts2. Basically, I have a package in config file A with namespace="/" and some global-results. I want to access those global-results with config file A package namespace="/" in other config file X with package namespace="/Xname". > > > > My current solution extends config file A package in config file X package. I want to access global result jsp at the url: /common/global-test.jsp as a result forwarded from config file X action class. > > However, it is incorrectly adding config file X package namespace in fetching the jsp file as /Xname/common/global-test.jsp. > > > > Any suggestions? > > Do you have a slash (/) at beginning of your result value? I get same > error like you when I don't haven that slash but works with a starting > slash. My working example: > > > > > /WEB-INF/content/hello.jsp > > ... > > ... > > > class="me.zamani.yasser.ww_convention.actions.CategoriesAction"> > commerce.categories > > > > ... > > package me.zamani.yasser.ww_convention.actions; > > public class CategoriesAction { > public String execute() > { > return "globalResult1"; > } > } > Yes, that was the problem. Huge thanks, Yasser!!! I prepended a '/' for the global-result and it worked. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org