I'm facing a strange problem here. The situation is like this:
I'm trying to set a value for an input
tag from a java string:
<input type="text" name="line" value=<%=line%> ></input>
line = "this is my new line"
the result is that value is getting only the first word("this") and not the whole string.
anyone knows why or how to make it right??
As everybody said use double quotes
The above line is only for correct your line and,if possible please do not use scriplets.Those are expired.
Please go through this How to avoid Java code in JSP files?
Put double quotes around the value like this -
HTML uses space to separate different attributes/tags.