Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading images with a a dynamic context

 
Ernesto Pinto
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

WHATS WRONG???

i really need a help from u guys...

THX A LOT !

greetings
[ June 19, 2006: Message edited by: Bear Bibeault ]
 
pawank gupta
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 64713
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

thanks,
bear
JavaRanch Sheriff
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic