Solved

Uploading Files To The Web Server!

Posted on 2004-09-19
10
245 Views
Last Modified: 2010-05-18
Hi,

I'm using the uploadbean servlets downloaded from
http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html

In the upload form, I'm able to direct my upload files to the folder that I
wanted by modifying the path in this line :

<jsp:setProperty name="upBean" property="folderstore" value="c:/uploads"/>

I have no problem doing this under Windows environment in my pc (localhost).
With this, all my files will be uploaded to uploads folder in my c:

And I have change my path to

"/home/screen/public_html/uploads" in order to get my files from the upload
form to uploads folder inside public_html. (Linux Hosting Environment)

And then, I also have chmod the uploads folder to 0777. However when I try to run it, it doesn't upload my file into the server. The error command is java.lang.Exception: No such file or directory.

Is there anything else I left out? Any help is appreciated.

Thank you.
0
Comment
Question by:kheefatt
  • 4
  • 3
10 Comments
 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 12099656
ummm..

Could you login to unix system and type this command?

$cd /home/screen/public_html/uploads

Does it be able to change to that directory?
0
 

Author Comment

by:kheefatt
ID: 12099707
I need to use telnet but I do not have access to the web server right now. However I'm asking for it access already. Will come back to u straight after I tried it!
0
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
ID: 12100313
Is this the same problem as this: http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21128326.html ?  

I think you're going to have to get in touch with your hosting company, and get the proper path off them...

(and I'd triple check the jsp:setProperty to make sure it is right -- just to be safe) ;-)

Tim
0
 

Author Comment

by:kheefatt
ID: 12100470
Yes TimYates is the same problem. I've been trying with the path that I got from their support page.

And then tried it out. It didnt work actually but then I know it is because of the permission access problem. I've then chmod the uploads folder to 0777. But then it show me another error which is error command is java.lang.Exception: No such file or directory. I'm now trying on other alternatives like using jspsmart. But anyway, I still hope that this one works because this is the onli upload function that comes with a status bar!

Yeah I'm trying to get in touch with the hosting company. Thanks ya for helping me out!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 35

Expert Comment

by:TimYates
ID: 12100521
> java.lang.Exception: No such file or directory

Are you writing straight into the folder (not inside other nested folders)?

Have you tried putting a trailing slash on the path?

<jsp:setProperty name="upBean" property="folderstore" value="/home/screen/public_html/uploads/"/>
0
 

Author Comment

by:kheefatt
ID: 12497268
I have left this question for a long time. Does anyone has a simple example on file upload? UploadBean doesnt seems to work!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12497303
Did you ever get in touch with the hosting company?
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12497336
UploadBean does work, but you need to know the directory it can write into...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Session migration 1 102
tomcat users xml 7 104
servlet concurrency 13 92
best tutorial on log4j and logging for servlets/jsp codes 1 63
Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Fine Tune your automatic Updates for Ubuntu / Debian
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now