我需要通过 Web URL 使我的网络共享文件夹可用。我正在使用 jetty runner 来服务目录。
我的网络共享是\\nas01.internal.local
我可以在文件资源管理器中使用此路径来浏览\复制\删除文件。我需要通过 Web URl 访问它。
使用 jetty-runner,我可以d:\
通过http://localhost:8080
,
java -jar jetty-runner.jar d:\
但我不能对网络共享做同样的事情
java -jar jetty-runner.jar \\nas01.internal.local
我收到以下错误,
2016-05-18 08:18:47.530:INFO::main: Logging initialized @228ms
2016-05-18 08:18:47.561:INFO:oejr.Runner:main: Runner
java.net.MalformedURLException: no protocol: \\nas01.internal.local
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:16
2)
at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:14
6)
at org.eclipse.jetty.runner.Runner.configure(Runner.java:418)
at org.eclipse.jetty.runner.Runner.main(Runner.java:556)
Usage: java [-Djetty.home=dir] -jar jetty-runner.jar [--help|--version] [ server
opts] [[ context opts] context ...]
Server opts:
--version - display version and exit
--log file - request log filename (with optional 'yyyy
_mm_dd' wildcard
--out file - info/warn/debug log filename (with option
al 'yyyy_mm_dd' wildcard
--host name|ip - interface to listen on (default is all in
terfaces)
--port n - port to listen on (default 8080)
--stop-port n - port to listen for stop command
--stop-key n - security string for stop command (require
d if --stop-port is present)
[--jar file]*n - each tuple specifies an extra jar to be a
dded to the classloader
[--lib dir]*n - each tuple specifies an extra directory o
f jars to be added to the classloader
[--classes dir]*n - each tuple specifies an extra directory o
f classes to be added to the classloader
--stats [unsecure|realm.properties] - enable stats gathering servlet context
[--config file]*n - each tuple specifies the name of a jetty
xml config file to apply (in the order defined)
Context opts:
[[--path /path] context]*n - WAR file, web app dir or context xml file
, optionally with a context path
码头有可能吗?