Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
| Search | Today's Posts | Mark Forums Read
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 13th, 2005, 12:23 PM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Output my txt from DB using JSP

Hi all
I have a jsp program that inter information from user and put it in to database, but now I have a problem to output it, I can output just one line, but the output is about 500 character.
To input, I use <textArea > name=” note” rows=”3” cols=”44”></textArea>
I need to out put area this size,
Please help me thanks


  #2 (permalink)  
Old April 19th, 2005, 04:00 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Im not sure how to do this with HTML, other than trying the method you describe. You could use java/jsp to break the string down into set lengths and insert <br> at the relevant point.

  #3 (permalink)  
Old April 19th, 2005, 04:58 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello again, to do what I suggest you will to get the length of the string with something like:

int myInt = myString.length();

You could then use getChars to segment the string:

void getChars(int sourceStart, int sourceEnd, char target[], int targetStart)

You would need to devise a way to set the start and end values to segment the string into the appropriate lengths, then write the information back to a second string with the <br> inserted after each section.

Im sure there are examples that will help on the Sun Java site/forums.



  #4 (permalink)  
Old April 29th, 2005, 06:48 AM
Registered User
 
Join Date: Apr 2005
Location: pune, maharastra, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vijaydange143
Default

i am vijay s dange i am sucess in developing web portal as one problem related to this is how i will save images to database and how i will use that database for my
portal.
 thanks all of you.
 but respond me on vijaydange143@rediffmail.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to output dataset to .txt file not to .xml? nesrine C# 1 March 8th, 2007 11:34 AM
How to output dataset to .txt file not to .xml? nesrine ASP.NET 2.0 Professional 0 March 8th, 2007 05:36 AM
Disassembler (output on .txt file) gettipu J2EE 0 February 20th, 2005 03:19 PM
save file in csv, txt format in jsp URGENT ernidhi2003 JSP Basics 1 October 14th, 2004 04:59 PM
How Can I Add Info From a Txt File Into a DB? Lucy Classic ASP Professional 3 October 21st, 2003 11:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.