aspose file tools*
The moose likes JSP and the fly likes Image Gallery from images in database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Image Gallery from images in database." Watch "Image Gallery from images in database." New topic
Author

Image Gallery from images in database.

zohaib khan
Greenhorn

Joined: Apr 13, 2009
Posts: 22
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

Joined: Aug 09, 2012
Posts: 179
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?


Programming is about thinking, NOT coding
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

JSP is a poor technology choice for serving images. You should be using a servlet. Please read this article to find out why.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
zohaib khan
Greenhorn

Joined: Apr 13, 2009
Posts: 22
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

Joined: Jan 10, 2002
Posts: 61761
    
  67

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

Joined: Aug 09, 2012
Posts: 179
Have you tried.
zohaib khan
Greenhorn

Joined: Apr 13, 2009
Posts: 22
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

Joined: Aug 09, 2012
Posts: 179
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image Gallery from images in database.