This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Servlets and the fly likes Large text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Large text" Watch "Large text" New topic

Large text

Servin Park

Joined: May 10, 2002
Posts: 26
Hi all,
I am building a webapp using servlet/jsp with mySql. My question is "How to handle big articles from editors"
For instance, beginning of every week, my sports column editor updates content of the "Sports Section". I would like to make it so that the editor can type his column into a textarea (only the editor has access to) and click submit button to update the content. In behind the scene, I would use servlet and jsp to update the page (all visitors have access to) dynamically. What would be the most efficient way to store the content, which can be more than 1,000,000 characters, and make a call from servlet or jsp to update the page? I can only think of using "BLOB" data type in the database, but it somehow doesn't sound so appealing. Is there any other way that you could think of?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17282

One way would be to write the actual text out to a file and store the filename in the database.
Or you might consider a "CLOB", which is a Character Large Object. Which is sometimes actually implemented that way, but transparent to the database programmer.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Large text
It's not a secret anymore!