Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 10th, 2005, 05:21 AM
poornima poornima is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Bangalore
Posts: 3 poornima User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 5 sec
Reputation Power: 0
image uploading problem in Java

Hi,

I have an image uploading problem.
The entire code is working in my local system.
But when i upload the code, it is not working from the Linux server.

The code I have given is RenderedImage image = null;
InputStream is = new BufferedInputStream(new FileInputStream(f));
image = ImageIO.read(is); OutputStream out1 = new BufferedOutputStream(new FileOutputStream(file));
ImageIO.write(image,"png",file);

Should I give any permission to upload the image file?

Can anybody please respond as soon as possible.

Thanking You

Reply With Quote
  #2  
Old June 10th, 2005, 07:54 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Linux is much pickier than Windows when it comes to permissions.

Make sure the folder you are uploading to has the proper write permissions.
A common solution is to change ownership on the folder to the same user that the server runs as.
Alternatively, you could give write permissions to "other"; this could be considered a security flaw.

Reply With Quote
  #3  
Old June 11th, 2005, 07:56 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m
Reputation Power: 5
I've had a similar problem. I work locally under Windows, the server my web app is on, is a Linux server. Whenever I upload .class files, I must not forget to change the permissions of these .class files. I always have to add the execute-permission for the user, group and other.
So, take a look at the rwx or read-write-execute permissions of your .class files. Without the x for execute, the .class file might give you problems.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > image uploading problem in Java


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway