look up the (running) plugin object by its name (raises KeyError if not found)
查询(正在运行的)plugin对象,其名称作为参数(如果没有找到产生KeyError)。
getPluginNames()
a list of names of the installed plugins
已经安装的plugin 名称列表
getFullURL()
returns full URL of this snakelet (without query args). if you are using URL patterns, this cannot be used in that snakelet! (because the pattern ends up in the URL) Example: "http://desertfish.xs4all.nl:9080/test/snoop.sn" NOTE:The hostname in the url is the virtual-host-name from what Snakelets thinks is the vhost for this request. If you are running Snakelets behind a proxy (and/or the bindname is different), this hostname may not be correct! The solution is to enable the Vhost config and to define a correct virtual-host mapping for the 'real' hostname. You can still use a different bindname, if you wish.
返回当前snakelet的完整URL(不包括参数)。如果您使用URL样式,这将不能再snakelet中使用!(因为URL结尾的样式)例如:”http://deserfish.xs4all.n1:9080/test/snoop.sn” 注意:在url中的主机名是虚拟主机名。如果您正在使用代理方式(或者 bindname不同),这个主机名可能就是不正确的!解决方法是打开Vhost选项定义正确的虚拟主机映射真实主机名。如果您希望,您仍然可以使用不同的bindname。
getURL()
server-relative URL pattern of this snakelet or Ypage, example: "/test/snoop.sn" If you use a URL pattern for your snakelet, that pattern is returned (example: "/test/*.pdf")! So it is not safe to use this method for constructing URLs. Use the getRequestURLplain method of the request object instead! If you are not using URL patterns, you're safe. For Ypages with a form this is useful if the form should be posted to the page itself, you can then easily do <form action="<%=self.getURL()%>;" .... >;
snakelet 或 Ypage 的相对URL路径样式。比如:”/test/snoop.sn” ,如果您为您的snakelet使用URL式样,就会返回式样(如: “/test/*.pdf”)!所以使用这种方法构造URL很不安全。使用request 对象的 getRequestURLplain 方法代替!如果您没有使用URL式样,那么就是安全的。对于Ypage,用这个方法来传送表单是很方便的:<form action=”<%=self.getURL()%>;”…>;
上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2425 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 一个 |
注册
个人空间
