Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Attach Image in JSP  RSS feed

 
Talha-bin -Shakir
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone can help me to attach image in a JSP page.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "attach"? Generally, image are shown in HTML pages by using the "<img src="something.jpg">" tag.
 
Talha-bin -Shakir
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean by attach is "uploading image" in SQLServer using JSP. Can please someone give me any useful link.
Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't really use JSPs for file uploads; you'll need to use a servlet instead. See http://faq.javaranch.com/java/FileUpload for some discussion.

As to storing images in a DB -which is not a good idea in my opinion; why not store them as files?- you could use an attribute of type BLOB.
[ October 14, 2008: Message edited by: Ulf Dittmer ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!