From user-return-219552-apmail-struts-user-archive=struts.apache.org@struts.apache.org Fri Apr 10 13:51:28 2020 Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 8B8141978D for ; Fri, 10 Apr 2020 13:51:25 +0000 (UTC) Received: (qmail 32701 invoked by uid 500); 10 Apr 2020 13:51:22 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 32682 invoked by uid 500); 10 Apr 2020 13:51:22 -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 32660 invoked by uid 99); 10 Apr 2020 13:51:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2020 13:51:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1A20B1A3240 for ; Fri, 10 Apr 2020 13:51:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 57pLmHY20CUX for ; Fri, 10 Apr 2020 13:51:19 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::730; helo=mail-qk1-x730.google.com; envelope-from=burtonrhodes@gmail.com; receiver= Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 383117F51D for ; Fri, 10 Apr 2020 13:51:19 +0000 (UTC) Received: by mail-qk1-x730.google.com with SMTP id 130so2143569qke.4 for ; Fri, 10 Apr 2020 06:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=bizThT9ioMf8nWm0yV5epi8dlgA2Xjw5Ok7NTxe5RD8=; b=kxj+PDgxJTZvJbC8en1dUml8ZpvdFicUQWlP7wH1MREOcCd5t+3U/5ajdX3RtoQ+wr +LhFulZ6W6ZNu2iPlQDAWlj0+aSOx2YnjGR8RTUw+xUmBPIuAdPb+qucZzAfFjElv8Bl DtGnCz/w0GSBn1c95ucLEE49ZBe0MBa8oRIrTdiWdox0AMOCj9acSCcy7l7YqotKeKQI VAUHXLGxMyKSrb2MLqwGbvB+h9AsmslhkcZjrJXSGXrmR+P1ynedeSEt7L6zEqL7hYWc 2c9G/fab+uWUU0CTrF0wNvq/TytGONwEo0mBWdcrRsLTi1teh2tBSBgrDKQZgpGghnEz Pggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=bizThT9ioMf8nWm0yV5epi8dlgA2Xjw5Ok7NTxe5RD8=; b=DPz6ciTqwhRD7MCdR3yc9+j7FTd1AeZtZT1Gza67jiBA+G9cYWSfq8Md8mVmRfPmka YPgbAgqiNZn6UsT/7CwMjmWV9hoUVXTAjQdhedGMPipgQzIKJqyPE0bp9gIt4bdOo29u i79HuhipVB23kMWVd3dc2/NMIVh7xkh662udCB2WAJDjIMAheUcvjOKP2ifCgCkqvtME dv6+pH8kBg+rAODF5QDMb2Vyzk8xTeXZmGLUEu6s6GWWwW5oqfvDVUXF0lBattiMHXC1 sae+9rNRSiN42IY2vjXxNBWHWDHOQXV+JA3DZisIj81a+7bRpWdm6n+lR/ZH8XV4mwxy 5ZyQ== X-Gm-Message-State: AGi0Puazcm5VV5FbO3dZnNMB9aZqGosKOWW0Gdj8IK9tV1z8Hd4qCuel UhSALxsFxjZKc8kegLrBfGSezAxPdT/i4ORzFzg3wx+n X-Google-Smtp-Source: APiQypLyMsgMEbztR79Vqo3z/TW2tEDh5DbVQ55VDKyI8KYPMVjc/RANXcfAMJzw7yLAyiSSvTHVYgNj32yOoUpyZ8w= X-Received: by 2002:a05:620a:8dc:: with SMTP id z28mr3766268qkz.263.1586526677838; Fri, 10 Apr 2020 06:51:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Burton Rhodes Date: Fri, 10 Apr 2020 08:51:06 -0500 Message-ID: Subject: Re: How to reference a struts constant from within struts.xml? To: Struts Users Mailing List Content-Type: multipart/alternative; boundary="0000000000000f3f7105a2f0078a" --0000000000000f3f7105a2f0078a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Done. The JIRA ticket is located here: https://issues.apache.org/jira/browse/WW-5066 On Fri, Apr 10, 2020 at 12:45 AM Lukasz Lenart wrote: > czw., 9 kwi 2020 o 16:58 Burton Rhodes > napisa=C5=82(a): > > > > Is it possible to reference a Struts constant from within the same file= ? > > In other words, I would like to define a constant inside my struts.xml > file > > and then reference that constant further down in the file. > > > > For example: > > > > [struts.xml] > > > > > > > > > > > > > > > class=3D"com.afs.web.struts.action.xaction.XactionActivityGenericAction= " > > method=3D"update"> > > > > > > > name=3D"fileUpload.maximumSize">${afs.maxFileSize} > > This rather won't work directly, as ${...} is executed in context of > an action, which means the "afs.maxFileSize" must be action's > property. Anyway this looks like an interesting idea, would you mind > registering a ticket in JIRA with this proposal? > > ... but you can use @Inject("afs.maxFileSize") in your action (you can > use either constructor or field injection) and then reference it via a > getter from the action, eg.: getMaxFileSize -> ${maxFileSize} > > > Regards > -- > =C5=81ukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > --0000000000000f3f7105a2f0078a--