struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fabio vitale <fabiovital...@gmail.com>
Subject Re: user Digest 8 Nov 2014 11:27:49 -0000 Issue 10095
Date Sat, 08 Nov 2014 17:37:30 GMT
On Sat, Nov 8, 2014 at 12:27 PM, <user-digest-help@struts.apache.org> wrote:

>
> user Digest 8 Nov 2014 11:27:49 -0000 Issue 10095
>
> Topics (messages 216661 through 216666)
>
> Anyway to map properties to different request names?
>         216661 by: Paul Benedict
>         216662 by: JOSE L MARTINEZ-AVIAL
>         216663 by: Paul Benedict
>         216664 by: Heikki Hyyrö
>         216665 by: Christoph Nenning
>
> [SECURITY][ADVICE] File download issue
>         216666 by: Lukasz Lenart
>
> Administrivia:
>
> ---------------------------------------------------------------------
> To post to the list, e-mail: user@struts.apache.org
> To unsubscribe, e-mail: user-digest-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-digest-help@struts.apache.org
>
> ----------------------------------------------------------------------
>
>
>
> ---------- Forwarded message ----------
> From: Paul Benedict <pbenedict@apache.org>
> To: Apache Struts Users <user@struts.apache.org>
> Cc:
> Date: Wed, 5 Nov 2014 14:39:45 -0600
> Subject: Anyway to map properties to different request names?
> Let's say I have a getter/setter for field personId. That means in my
> markup, I need to have a field named personId too. However, I am not really
> found of bleeding Java naming conventions into my web page. Shouldn't there
> be a way -- is there a way? -- of assigning another name to it?
>
> Hopeful example:
>
> @RequestParam("person")
> public final void setPersonId(String personId) { ... }
>
> Cheers,
> Paul
>
>
> ---------- Forwarded message ----------
> From: JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com>
> To: Struts Users Mailing List <user@struts.apache.org>
> Cc:
> Date: Wed, 5 Nov 2014 15:47:48 -0500
> Subject: Re: Anyway to map properties to different request names?
> You only need to set the attribute name of the field
>
> <field name="personId" type="text"></input>
>
> You can even use a different Id, if you want to refer to the field in
> javascript.  Why does it bother you?
>
> 2014-11-05 15:39 GMT-05:00 Paul Benedict <pbenedict@apache.org>:
>
> > Let's say I have a getter/setter for field personId. That means in my
> > markup, I need to have a field named personId too. However, I am not
> really
> > found of bleeding Java naming conventions into my web page. Shouldn't
> there
> > be a way -- is there a way? -- of assigning another name to it?
> >
> > Hopeful example:
> >
> > @RequestParam("person")
> > public final void setPersonId(String personId) { ... }
> >
> > Cheers,
> > Paul
> >
>
>
> ---------- Forwarded message ----------
> From: Paul Benedict <pbenedict@apache.org>
> To: Struts Users Mailing List <user@struts.apache.org>
> Cc:
> Date: Wed, 5 Nov 2014 14:54:29 -0600
> Subject: Re: Anyway to map properties to different request names?
> It bothers me that the Java programming model dictates the parameter names.
> In theory "personId" could be sent as "a" -- although a variable named "a"
> in Java is bad naming conventions. There isn't a good technical reason to
> keep this 1:1 mapping. The shorter the bytes sent too the better.... And in
> reverse, if one is working on re-implementing an existing servlet/service,
> you have to give poor names to your Java model to match existing form
> names.
>
>
> Cheers,
> Paul
>
> On Wed, Nov 5, 2014 at 2:47 PM, JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com>
> wrote:
>
> > You only need to set the attribute name of the field
> >
> > <field name="personId" type="text"></input>
> >
> > You can even use a different Id, if you want to refer to the field in
> > javascript.  Why does it bother you?
> >
> > 2014-11-05 15:39 GMT-05:00 Paul Benedict <pbenedict@apache.org>:
> >
> > > Let's say I have a getter/setter for field personId. That means in my
> > > markup, I need to have a field named personId too. However, I am not
> > really
> > > found of bleeding Java naming conventions into my web page. Shouldn't
> > there
> > > be a way -- is there a way? -- of assigning another name to it?
> > >
> > > Hopeful example:
> > >
> > > @RequestParam("person")
> > > public final void setPersonId(String personId) { ... }
> > >
> > > Cheers,
> > > Paul
> > >
> >
>
>
> ---------- Forwarded message ----------
> From: "Heikki Hyyrö" <heikki.hyyro@uta.fi>
> To: Struts Users Mailing List <user@struts.apache.org>
> Cc:
> Date: Wed, 5 Nov 2014 23:13:06 +0200
> Subject: Re: Anyway to map properties to different request names?
> Paul Benedict <pbenedict@apache.org> kirjoitti 5.11.2014 kello 22.54:
> > It bothers me that the Java programming model dictates the parameter
> names.
> > In theory "personId" could be sent as "a" -- although a variable named
> "a"
> > in Java is bad naming conventions. There isn't a good technical reason to
> > keep this 1:1 mapping. The shorter the bytes sent too the better.... And
> in
> > reverse, if one is working on re-implementing an existing
> servlet/service,
> > you have to give poor names to your Java model to match existing form
> names.
>
>
> One simple (but perhaps ugly?) way is to provide also page-specific
> setters along with the usual JavaBean-setters:
>
> // Page provides personId using the name ”a”.
> public final void setA(String personId) { ... }
>
> // JavaBean-version (if also needed)
> public final void setPersonId(String personId) { ... }
>
> -Heikki
>
>
>
>
> ---------- Forwarded message ----------
> From: Christoph Nenning <Christoph.Nenning@lex-com.net>
> To: Struts Users Mailing List <user@struts.apache.org>
> Cc:
> Date: Thu, 6 Nov 2014 09:46:25 +0100
> Subject: Re: Anyway to map properties to different request names?
> > Paul Benedict <pbenedict@apache.org> kirjoitti 5.11.2014 kello 22.54:
> > > It bothers me that the Java programming model dictates the parameter
> names.
> > > In theory "personId" could be sent as "a" -- although a variable named
> "a"
> > > in Java is bad naming conventions. There isn't a good technical reason
> to
> > > keep this 1:1 mapping. The shorter the bytes sent too the better....
> And in
> > > reverse, if one is working on re-implementing an existing
> servlet/service,
> > > you have to give poor names to your Java model to match existing form
> names.
> >
> >
> > One simple (but perhaps ugly?) way is to provide also page-specific
> > setters along with the usual JavaBean-setters:
> >
> > // Page provides personId using the name ”a”.
> > public final void setA(String personId) { ... }
> >
> > // JavaBean-version (if also needed)
> > public final void setPersonId(String personId) { ... }
> >
> > -Heikki
> >
>
>
> This would be my suggestion, too.
>
>
> Regards,
> Christoph
>
>
> This Email was scanned by Sophos Anti Virus
>
>
> ---------- Forwarded message ----------
> From: Lukasz Lenart <lukaszlenart@apache.org>
> To: Struts Users Mailing List <user@struts.apache.org>
> Cc:
> Date: Fri, 7 Nov 2014 09:24:31 +0100
> Subject: [SECURITY][ADVICE] File download issue
> Hello,
>
> Please read the following links [1][2] as your public sites can be
> used to attack users' computers. The simplest solution is to be sure
> that all your download links define header "Content-disposition:
> attachment; filename=myfile.ext", you will find more details at the
> end of the pdf
>
> [1]
> http://blog.spiderlabs.com/2014/10/reflected-file-download-the-white-paper.html
> [2]
> https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message