Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
Password Reminder
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #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

Reply With Quote
  #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

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.

Reply With Quote
  #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

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.

Reply With Quote
  #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

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
 thanks all of you.
 but respond me on vijaydange143@rediffmail.com

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

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

All times are GMT -4. The time now is 07:07 AM.

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