共享的 modules/libraries:将您想要共享的 module/packages 放到该目录下,Starting and Configuring中有比较详细的描述。
[size=18]Create pages for the web application[/size]
Let's say that you have created a web application "testapp" and that it has a "docroot" directory where you will put your page files, so you must point the docroot attribute to it in the webapp's init file, as described above. The files in that directory will now be accessible in your browser by using the url base: http://server.com/testapp/
加入您创建了一个web应用程序”testapp”,在此目录中有一个 “docroot”目录用来仿制您的页面文件,您必须在webapp的 init文件中指定docroot属性,就像我们先前描述的。该文件将不能通过url访问:http://server.com/testapp/
Snakelets maps the rest of the URL to the filesystem (=the contents of the docroot directory) in a rather straightforward way, much the same as a normal web server such as Apache does this. A path component in the url maps to a directory on disk, and a file component usually maps to a file on disk. So that means that when the url http://server.com/testapp/office/page.html is requested, Snakelets will return the "page.html" file from the "office" directory in the docroot location. For Ypages it is the same, http://server.com/testapp/office/login.y will cause Snakelets to load and run the "login.y" ypage in the given location.
Snakelets 直接将URL映射到系统文件(=docroot 目录的内容),跟Apache一样。每一个路径组成部分都映射到硬盘上的某一个文件夹,文件映射到硬盘上的文件。所以,当 http://server.com/testapp/office/page.html被请求的时候,Snakelets将从docroot的office目录返回 ‘page.html’文件。对于Ypage也是同样。
It is impossible to request files outside the docroot location this way. That is nice, because you can protect your other files (web app source code and such) very easily just by placing them in a different directory as your web pages. You could fool around with the documentAllower function but this is more convenient and faster.
上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 1415 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 下一页
| 论坛热门帖子: | [lch203] 写得蛮好的linux学习笔记(10-21) [黑马制造] 学习java的30个目标(10-19) [笑傲股林] 做测试半年了,有点迷茫,应该再学些什么提高自己的测试水平和测试能力呢?(10-19) [udp8589] 大家用google的来吱一声? 用百度的~~也来报道下?(10-18) [沂偌掳兆] 本人总结的一些认为C++比较经典的书籍,希望对大家有用(10-18) |
| TAG标签: | 翻译 文档 使用 可以 页面 URL 如果 文件 webapp 一个 |
注册
个人空间
