This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSP and the fly likes Loading images with a a dynamic context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Loading images with a a dynamic context" Watch "Loading images with a a dynamic context" New topic

Loading images with a a dynamic context

Ernesto Pinto

Joined: Jun 19, 2006
Posts: 1
Hi! Greetings from Portugal ( sorry for my English)

I'm a JSP developper (but im new at Java technology, ive been a C++ and C# dev) and now im in a web based project for the last month or so, and me and my team foun a REAk probleam:

The all idea is to make a JSP page on the server that showed a uploaded image from client in the minute! The cliente upload the pic and after that it is loaded to page.

So we thaugth about this: upload the image to a certain folder (inside web f), and save te file name on a MySql database.

Then do something like this:

<img src="imagens/imagens2/<%=picture.listaResultado2[0][0]%>"

and, of course, picture.listaResultado2[0][0] is the filename, stored on the MySQL DB.

but, the JSP page doesnt load the image....we have to OPEN NETBEANS and sometimes re-compile all the code...and the refresh the JSP page and then ok, it works.

the html code is correct ( with the correct file name : <img src="imagens/imagens2/jessica_140188.jpg", for instance) , everything seems to be fine so...


i really need a help from u guys...


[ June 19, 2006: Message edited by: Bear Bibeault ]

java freedom!!!
pawank gupta
Ranch Hand

Joined: Jun 07, 2006
Posts: 34
check ur context with the dirctory structure because u have given the image path form dirctory is it so that ur image dirctory inside the same folder where ur jsp file resides.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63873

pawank gupta, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

JavaRanch Sheriff

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Loading images with a a dynamic context
It's not a secret anymore!