dcsimg
how can i get the image height width from server's local directory
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   pranesh_sharma
Posted On:   Monday, August 19, 2002 11:42 PM

i have a problem, i m using a class javax.swing.ImageIcon in my jsp file, with this i m getting a image which is residing on server. from this i am able to get the height and the width of image. this thing is working fine on my local network as i have create a object of ImageIcon from filepath name like C:dirabc.gif and also it is working with java.net.URL but when i browse this on internet i shows me an exception Error: 500 Internal Servlet Error: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at java.awt.Toolkit$2.run(Toolkit.java:498) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolki   More>>

i have a problem, i m using a class javax.swing.ImageIcon in my jsp file, with this i m getting a image which is residing on server. from this i am able to get the height and the width of image. this thing is working fine on my local network as i have create a object of ImageIcon from filepath name like C:dirabc.gif and also it is working with java.net.URL but when i browse this on internet i shows me an exception

Error: 500


Internal Servlet Error:

			java.lang.NoClassDefFoundError
			
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.Toolkit$2.run(Toolkit.java:498)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:489)
at javax.swing.ImageIcon. (ImageIcon.java:77)
at javax.swing.ImageIcon. (ImageIcon.java:103)


how it can be possible that the code is running on same configuration (software and server and system) on LAN but not Internet. Please somebody help me.    <<Less

Re: how can i get the image height width from server's local directory

Posted By:   Gautam_Marwaha  
Posted On:   Tuesday, August 20, 2002 01:30 AM

Are you providing the correct URL as : http://machine:port/?. Post relavant parts of your code...
About | Sitemap | Contact