Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2007, 05:53 AM
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
To truncate jump of line in jsp
It wanted to know how can I truncate a jump of line in jsp, because I have a var that I rescue from the data base that it's flood of line jumps which they cause that when prints this var in jsp it is left a disaster I have used the methods, replace and replaceall, trying to replace \n by an empty space….

Eric
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-09-2007, 05:58 AM
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
RE: To truncate jump of line in jsp
Test this, surely that it is going to works:

Code:
col1=col1.replaceAll("\\n"," "); col1=col1.replaceAll("\\t"," "); col1=col1.replaceAll("\\r"," "); col1=col1.replaceAll("\\v"," "); col1=col1.replaceAll("\\chr(9)"," "); col1=col1.replaceAll("\\chr(10)"," "); col1=col1.replaceAll("\\chr(13)"," "); //col1=col1.replaceAll("\\-"," ");
Take care of that it validates those to him that knew that they were jumps of line of tabulator, vertical tabulator etc.

Daniel
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
new line within a string perplexingtrax New To Java 6 03-31-2008 05:46 AM
New Line in FlowLayout chris12295 New To Java 1 12-07-2007 07:49 PM
Eclipse- jump to method definition Java Tip Java Tips 0 11-07-2007 05:34 PM
Reading in data from file line by line bluekswing New To Java 1 10-02-2007 02:19 AM
how to know the number of the line simon New To Java 3 08-01-2007 06:59 PM


All times are GMT +3. The time now is 06:11 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org