Here is a little jsp I just tested with:
========================================
<%
    String name = "Barb Johnson";
    String book = "How I beat my browser";
%>

<html>
<head>
<title>Sample Application JSP Page</title>
</head>
<body bgcolor=white>

<form>
<table border="0" border="100%">
<tr>
  <th align="right">Name:</th>
  <td align="left">
<!--    <input name="flname" size="30" value=<%= name %>> -->
    <input name="flname" size="30" value="<%= name %>">
  </td>
</tr>
<tr>
  <th align="right">Book:</th>
  <td align="left">
<!--    <input name="book" size="30" value=<%= book %>> -->
    <input name="book" size="30" value="<%= book %>">
  </td>
</tr>
</table>
</form>
</body>
</html>
=============================================================
Notice the lines that are uncommented vs. the lines right below them. The
commented out lines are what you have now. The ones right below them will put
the whole string in the text box.

jason

--- Barbara Johnson <[EMAIL PROTECTED]> wrote:
> Can anyone tell me how to solve this problem?
> I am making a series of forms for an educational application.
> I am able to insert data into a database ok. When I look into MySql the data
> is all there but when I
> repopulate the form from the database, the words are truncated as soon as it
> encounters a space.
>
>
> Here is a sample of my code:
>
>
>
>
> // query statement
> Statement stmt = con.createStatement();
> String queryStr = "SELECT firstname,lastname FROM author";
> ResultSet rs = stmt.executeQuery(queryStr);
>
>
> while (rs.next()){
>      String firstname = rs.getString(1);
>            String lastname = rs.getString(2);
>
> <!--Repopulate form from database -->
> <FORM name=authorform action="saveauthor.jsp" >
>
> <td>
>
>         <input name="firstname" size="30" value=<%= firstname%>>
>
>
>         <input name="lastname" size="30" value=<%= lastname%>>
>
> Thank you,
> Barb Johnson
> Instructional Programmer
> Northeast Ohio Universities College of Medicine
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to