• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting Image height in a JSP

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

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.
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use this class to know the general properties of image files.
everything is included in the code. just go through it. :-)

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic