File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Getting Image height in a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting Image height in a JSP " Watch "Getting Image height in a JSP " New topic

Getting Image height in a JSP

Jos� Alberto Mu�iz Navarro
Ranch Hand

Joined: Oct 27, 2003
Posts: 33

I have an image in the tomcat/webapps/mywebapp/media folder and I want a jsp located in tomcat/webapps/mywebapp/ to print its height. However, I can't get it to work.

The way I thought of it is:

However, I get the following error:

I assume there's a problem for getting the web app to connect to my computer's X server. I'd like to know if there's a solution for this... or another idea. Because, as I understand it.. you actually need some kind of graphical server to be running for my code to work. And that's something I don't want, because that would mean I wouldn't be able to run the code on many servers.

Thanks a bunch for reading this.
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
use this class to know the general properties of image files.
everything is included in the code. just go through it. :-)

I agree. Here's the link:
subject: Getting Image height in a JSP
It's not a secret anymore!