0

I Have this HTML tag

<button type="submit" name=<%=s %> value=<%=s %>><%=s%></button>

The <%=s %> is a String stored in server with white spaces, like "file one".

My problem is in getting the button name. I'm using the following piece of code:

String btnName = request.GetParameter(s);

It is working, unless if the string presents spaces like "file one". In this case, the part " one" is ignored.

How can I get the whole String?

Thx.

Jas
  • 385
  • 7
  • 22
  • 2
    Attributes should be in quotes, and [you should be using EL instead of scriptlets.](http://stackoverflow.com/questions/3177733/how-to-avoid-java-code-in-jsp-files) – Matt Ball Apr 03 '13 at 03:24
  • I'm not sure about this, but did you try surrounding it within double quotes? – asgs Apr 03 '13 at 03:25

1 Answers1

1

Put it like the following.

<button type="submit" name='<%=s %>' value='<%=s %>'><%=s%></button>

Note the new single quotes.

Pradeep Pati
  • 5,779
  • 3
  • 29
  • 43