Meaningless Drivel is fun!
The moose likes Struts and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "" Watch "" New topic

kiran chirravuru

Joined: Nov 25, 2009
Posts: 26
When i try to upload document from the client machine i am getting .I used struts 2.0 for my web application and tomcat application server. Kindly help me

Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Kindly show us the code where the exception is thrown! (Don't forget to use code tags!)

OCJP 6 (93%)
kiran chirravuru

Joined: Nov 25, 2009
Posts: 26
I am not getting any exception when i run locally but when i run the web application on the remote tomcat application server as a service then i am getting The following is the code which i have used in the action class in struts 2.0

File srcfile = new File(srcfile path)----> this is the uploaded file path.
Then when i check for the existence of the file it gives error message that the file does not exist.

File desfile = new File(despath)-----> destination Path where i store my file.
Inputstream in = new Fileinputstream(srcfile)
byte[] arr = new byte[1024] ----> Here it gives file not found exception when i try to read the file.

I am not able trace the problem

Kindly help me it is major issue
I agree. Here's the link:
It's not a secret anymore!