• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image Gallery from images in database.

 
zohaib khan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing image gallery from images stored in oracle database.

I am using JQuery ColorBox plugin (http://www.jacklmoore.com/colorbox/example1/) and I need to specify image in href for plugin.

My JSP page (http://localhost:8080/gallery/show_image.jsp?id=1) fetch image from database and show.

I can see image in browser when I run url http://localhost:8080/gallery/show_image.jsp?id=1.

But following not working when JSP page specify in href.



Any solution?

- Thanks
Zohaib.
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
zohaib khan wrote:Hi,

I can see image in browser when I run url http://localhost:8080/gallery/show_image.jsp?id=1.

But following not working when JSP page specify in href.





Do you mean that clicking on the link Grouped Photo 1 , does not gives you any image?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is a poor technology choice for serving images. You should be using a servlet. Please read this article to find out why.
 
zohaib khan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for reply.

Sorry I can not use servlet for some xyz reasons.

JQuery ColorBox plugin http://www.jacklmoore.com/colorbox/example1/ show images gallery.

Example 1 - No Transition + fixed width and height (75% of screen size)

Images are stored on images folder on file system and location specified in href.

I my case images are in oracle database and JSP page display image fetching from database.

But when I call jsp from href then it is not working with like file system image gallery.


- Thanks
Zohaib.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
zohaib khan wrote:Sorry I can not use servlet for some xyz reasons.

There is no valid reason that servlets cannot be used. None. Including "xyz".
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried.
 
zohaib khan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for reply and support.

Vishal img tag did not give expected result as it show image on same page instead of pop up.

I got it working using frames.

- Thanks
Zohaib.
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
zohaib khan wrote:Thanks guys for reply and support.

Vishal img tag did not give expected result as it show image on same page instead of pop up.

I got it working using frames.

- Thanks
Zohaib.


If you want it in pop up, then on click of a link you open a pop up (there's a whole lot of it using javascript : search for a custom pop up dialog in google)

Then in that pop up you white the img code. That's it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic