简体   繁体   English

如何从已部署的Web应用程序访问本地文件系统上的文件?

[英]how to access files on local file system from deployed web app?

I have a web app deployed on Tomcat on Windows 7. I have various files on the PC, local file system, that I want to access from my web app. 我在Windows 7的Tomcat上部署了一个Web应用程序。我想从Web应用程序访问PC上的各种文件(本地文件系统)。 How can I do this or is this possible? 我该怎么办或有可能吗?

Ok, looks like I found the solution. 好的,看起来我找到了解决方案。

Can just use the File() object with absolute paths and that does the trick. 可以将File()对象与绝对路径一起使用就可以了。

I thought there would be some special requirements for web apps but it looks like there isn't 我以为Web应用程序会有一些特殊要求,但似乎没有

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何直接从Web应用程序访问本地文件系统上的图像? - How to access images on the local file system directly from a web app? 如何从部署到JBoss EAP 6的Web应用程序访问部署到GlassFish 2服务器的EJB? - How to access EJB deployed to GlassFish 2 server from web app deployed to JBoss EAP 6? 如何从RESTFul Web服务访问本地文件 - How can I access local files from a RESTFul web service 使用IDEA,如何调试部署到本地tomcat的Web应用程序? - Using IDEA, how to debug web app that is deployed to local tomcat? 如何从部署在其上的Java Web应用程序访问tomcat日志文件? - How can I access tomcat log files from Java web application deployed on it? 从应用程序内的已部署Web应用程序中删除文件 - Delete file from deployed web app from within the app 如何从服务器上部署的Java Web服务访问本地文件? - How can I access a local file from a Java webservice deployed on a server? 使用Java从本地文件系统导入文件 - Importing files from local file system in Java 如何在Web服务器上编辑用户文件系统上的文件? - How to edit files on the users file system from my web server? 无法通过局域网连接的其他系统访问部署在jboss上的Web应用程序 - Unable to access web application deployed on jboss from other system connected via lan
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM