Text box value is not being completely filled with request attribute
Mishaal Khan
Ranch Hand
Joined: Aug 21, 2008
Posts: 61
posted
0
Hi,
In a jsp,I am trying to fill the text box value from a request attribute i.e
Seller user = (Seller)request.getAttribute("seller");
<INPUT type="text" name="firstname" <% if (user != null) { %> value = <%= user.getCountry() %> <% } %>size="50" />
whats happening is it is displaying value only before the space ,for example if country is United States,its displaying only United,same thing is happening with other fields too.
Thanks for the reply.This logic is not applicable as it is displaying text box with value only if user is not null,whereas I need to display the text box in any case.Also even if i use this logic,its still not displaying the complete value.
<INPUT type="text" name="location" value = united states size="70" />
if I am displaying the value without text box,using only <%= user.getCountry() %>, its displaying complete value but in text box its displaying incomplete value. [ December 15, 2008: Message edited by: Mishaal Khan ]