Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pictures and JSP & Mysql

Status
Not open for further replies.

Khanjan

Programmer
Feb 24, 2004
41
NL
Hi,



I have a Content Management Systeem, where you can put an article into the website. If the Admin wants to save an article with a picture, How can he do that?

I have hear somthing like this:

Make a file for the pictures on the server. Give the path as a HTML code, Like <a href>. And put this path into the article that you want to save.

When i want to see the article, the article is retrived from database with the path of the pictures. And you can see the pictures in your article.

Is this possible to do? If not, What is the easiest way to do this kind of things.

Thanx
 
Are you planning to store the pictures in the database as a BLOB or on the filesystem ?
 
I strongly recommend storing URL's to the images in the database rather then the image itself unless you have some deeper need to abuse your relational DB:)

 
I am not planning to to store the pictures in the database as a BLOB, but on the filesystem. I will make a file and upload all the pictures there. This file is not on the database.

How can i do this?

Should i upload the picture in his file and in JSP put the code <image.......>??????

Is there another way to do this??


 
Upload the file to the filestore.

Store the URL in the datastore

Use a JSP tag to load the image

Something like:
Code:
<img src="<jsp:getProperty YOUR PROPERTY>">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top