I was more thinking about reading the string in java after I did
request.getParameter but unfortunately this does not work.
This is the code I'm using to do this:
private String newLine(String text) {
StringBuffer sb = new StringBuffer(text);
String otext = text;
String find = "\n";
String replace = "<BR>";
do { int found = othersrc.indexOf(find);
if (found == -1) break;
sb.replace(found, found + find.length(),
replace);
othersrc = sb.toString();
} while (true);
return text;
}
However, this does not work :-(
Any idea's???
Thanks,
Steven
----- Original Message -----
From: Venu Gopal
To: 'Steven Salaets'
Sent: Saturday, February 02, 2002 10:37 PM
Subject: RE: Detect newline in a form
hello Steven
I hope html list tag can do well for u.
cheers,
venu
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Steven
Salaets
Sent: Saturday, February 02, 2002 6:38 AM
To: [EMAIL PROTECTED]
Subject: Detect newline in a form
Hi everyone,
How can I handle new lines in a form?
For example:
list
- line1
- line 2
- line 3
- line 4
ofcourse I could add <BR> at the end of each line (in the form field) but I
would like to know if there is a trick to handle this by adding some code to
a servlet.
Thanks,
Steven.
----- Original Message -----
From: Venu Gopal
To: 'Steven Salaets'
Sent: Saturday, February 02, 2002 10:37 PM
Subject: RE: Detect newline in a form
hello Steven
I hope html list tag can do well for u.
cheers,
venu
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Steven
Salaets
Sent: Saturday, February 02, 2002 6:38 AM
To: [EMAIL PROTECTED]
Subject: Detect newline in a form
Hi everyone,
How can I handle new lines in a form?
For example:
list
- line1
- line 2
- line 3
- line 4
ofcourse I could add <BR> at the end of each line (in the form field) but I
would like to know if there is a trick to handle this by adding some code to
a servlet.
Thanks,
Steven.
___________________________________________________________________________
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