Solved

specify a relative path for uploading files

Posted on 2004-04-06
7
749 Views
Last Modified: 2008-03-06
Hello there
I had problem with fileupload . I am using jsp with tomcat server and uploadBean package from javazoom(www.javazoom.com) .
The upload it self works except that i can't change the file path .It should be absolute like c:/.../..
i can't do like this ../image/folder  ??????????

the uploadBean is a bean that handle uploading ..I declare it and specify the folder to which
files are loaded like this


<jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
  <jsp:setProperty name="upBean" property="folderstore" value="D:/folder" />
</jsp:useBean>

when i tried to see others problem in javazoom forum no one seems to care if the folder path is absoulte ....i mean no one.
It doesnot seems to be right.

please help me

note(more info about the uploadBean is in www.javazoom.com)
0
Comment
Question by:Salamo
7 Comments
 
LVL 13

Accepted Solution

by:
copyPasteGhost earned 100 total points
ID: 10765049
http://www.devsphere.com/mapping/docs/guide/upload.html

this example should help you out.
Cheers,
Ghost
0
 
LVL 2

Expert Comment

by:anthony_castillon
ID: 10765073
Have you tried adding an <context> entry in the server.xml file in the config folder of Tomcat?  If you don't do so, Tomcat will look for your app in its webapps folder.  Otherwise, you can define where in your file system Tomcat should look for the root of your webapp.

anthony
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 10766226
don't do you mean not changing path? you said:
<jsp:setProperty name="upBean" property="folderstore" value="D:/folder" />
is the uploaded file not storing in the d:/folder dir?
0
 

Author Comment

by:Salamo
ID: 10773655
thank you all i will try your suggestions.
For Kennethxu  , the files are uploaded successfully to the specified path but if i wished to put my website on a real server i wont specify a folder path like C:/... ??????? . That's the problem.

For anthony castillon i realy didn't get your point  but i will try to look in it further may be i misunderstood something with context entry concept...although I'll be glad if you help me more .
 
To copyPastGhost i didn't read the example yet but it seems it's the answer.

THANKS ALL

0
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 10774171
glad I can help
cheers,
Ghost
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dateFashion java challenge 9 146
instanceof  operator in java 26 96
login jsp example 24 69
jdbc error in jsp application 20 64
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Use Windows Task Scheduler to print a Word document weekly so your printer ink won't dry out.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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