Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
JSP
write file from URL problem
Mani kan
Greenhorn
Posts: 20
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i can a save a file to network drive normally when i run my application, when i deploy my application into
tomcat
server its raising an error?
here my code
java.io.BufferedInputStream in = new java.io.BufferedInputStream(new java.net.URL("http://192.168.1.101:8080/data/Learning.txt").openStream()); java.io.FileOutputStream fos = new java.io.FileOutputStream("//192.168.1.103/d/test.txt"); java.io.BufferedOutputStream bout = new BufferedOutputStream(fos,1024); byte data[] = new byte[1024]; while(in.read(data,0,1024)>=0) { bout.write(data); } bout.close(); in.close();
//192.168.1.103/d/test.txt ITS MY NETWORK DRIVE IN CLIENT MACHINE..
could anyone solve my issue?
ERROR:
exception org.apache.jasper.JasperException: An exception occurred processing JSP page /fileread1.jsp at line 32 29: java.io.BufferedInputStream in = new java.io.BufferedInputStream(new 30: 31: java.net.URL("http://192.168.1.101:8080/data/Learning.txt").openStream()); 32: java.io.FileOutputStream fos = new java.io.FileOutputStream("//192.168.1.103/d/test.txt"); 33: 34: java.io.BufferedOutputStream bout = new BufferedOutputStream(fos,1024); 35: byte data[] = new byte[1024]; Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:407) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.io.FileNotFoundException: \\192.168.1.103\d\test.txt (Access is denied) java.io.FileOutputStream.open(Native Method) java.io.FileOutputStream.<init>(Unknown Source) java.io.FileOutputStream.<init>(Unknown Source) org.apache.jsp.fileread1_jsp._jspService(fileread1_jsp.java:82) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Senthil Manoharan
Greenhorn
Posts: 28
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
You can try 192.168.1.103/d:/test.txt, I hope it will work.
Thanks and Regards
Senthil Kumar M
Mani kan
Greenhorn
Posts: 20
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
NOPE ITS NOT WORKING..
problem here is NETWORK PATH WAS NOT FOUND ?
Bear Bibeault
Sheriff
Posts: 67756
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I don't see how this is appreciably different from your other post on this topic, so I've closed this topic.
Also, please
KeepItDown
.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
yeah, but ... what would PIE do? Especially concerning this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem in copying file from server to client local machine folder
PUT request method not working
Downloading Server Problem?
Download a file from a https: website
java.net.UnknownHostException
More...