File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 17415

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!