Refer to page 100(JSP and JavaBeans, Chapter 4) of Professional JSP from
Wrox. The problem is that strings tend to break at the first space for
specific types of HTML form item. So you have to enclose the whole
string in quotes. Say, str, is your final string, then you should return
"\"" + str + "\"".
Arnab
-----Original Message-----
From: Jie Zhang [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 02, 2001 3:12 PM
To: [EMAIL PROTECTED]
Subject: Form get data problem, result sentence got shorten.
Hi,
When I programming with JSP, I met a strange result. Hope some one can
help me.
The problem is :
When I read data from mysql database, some multi-words data got
shortened, the result is just the first word. What I want to get is the
whole multi-words.
Here is the JSP lines:
When I write these in jsp file:
s[4] = rs.getString(5);
out.println("rotation is: "+s[4]+"\n");
I can get multi-words data from mysql,it's a good result.
result: ( rotation is: 55 1 0 0 )
But when I want to read multi-words data from mysql with:
<br>Rotation
<input TYPE="TEXT" name="rotation" size=30 value=<%= s[4] %> >
I could only get first word,not whole string,just part of string.
result: (55)
How to solve this problem?
Thanks.
========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets