问题标签 [railo]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
tomcat - Railo Tomcat 404 重定向和 CGI 变量
我在 Ubuntu - Railo - Tomcat(无 Apache)上遇到了 404 重定向问题。
我有站点的 /WEB-INF/web.xml 将 404 错误重定向到自定义 404.cfm,它尝试读取某些 CGI 变量并对其进行操作。问题是我没有得到所有的 CGI 变量,大多数都是空的。QUERY_STRING 是从缺少的模板传递的唯一变量。其余的要么为空,要么为 404.cfm。
我想要的是缺少模板的模板路径和查询字符串。
以下是我尝试过的一些 cfdump:
任何想法将不胜感激。请记住,Tomcat 是没有 Apache 的 Web 服务器。
coldfusion - 在内存中存储 INI 文件
我正在编写一个使用 ini 文件来存储所有状态代码(错误、成功代码等)的应用程序。一个非常简单的版本是这样的:
我的 CF 组件使用以下代码:
当我调用 getProfileString 时,我假设 Railo 打开文件,搜索键并返回值。所以随着我的应用程序的增长和我有更多的代码,我希望这个过程会减慢。那么有没有一种方法可以在我的 init 方法中打开文件并将其全部读入变量范围,然后从那里调用 getProfileString ?
variables - CGI.http_user_agent 为空 RAILO
我正在尝试CGI.http_user_agent
使用 RAILO 显示,但由于某种原因它是空的。其他人遇到过这个问题吗?这不应该一直存在吗?
我检查了我的日志,有时它存在,有时它不存在。
coldfusion - 如何从 ColdFusion 查询中丢弃一行?
给定一个查询(伪代码):
我如何摆脱第一条记录?在这种情况下,更改 SQL 不是一种选择。我试过了:myquery.RemoveRows(0,1);
但收到一个错误:
我在Railo 3 BTW
lucene - 我正在使用 Railo 3.1 和 CFSearch,我想分布在多台机器上
我可以将 lucene 索引(每 5 分钟一次)同步到另一对盒子并运行相同的应用程序来搜索吗?
我对做 App Server Clustering 不感兴趣。
coldfusion - Speed up QoQ's or an alternative approach?
I am building an application that performs a master query with many joins. This query data is then available to the whole application to play around with in a global variable. The query refreshes or gets the latest result set on each page refresh; so it's only in the same state for the life of the request.
In other parts of this application, I sometimes run 100's of QoQ's on this data - usually the result of recursive function calls. However, while QoQ is a great feature, it's not too fast and sometimes page loads can be between 3000 - 5000 ms on a bad day. It's just not fast enough.
Is there any kind of optimisation techniques I can do to make QoQ perform faster or perhaps an alternative method? I read an interesting article by Ben Nadel on Duplicate() function - is there any scope for using that and if so, how?
I would love to hear your thoughts.
Don't worry about crazy suggestions, this is a personal project so I'm willing to take risks. I'm running this on Railo compatible with CF8.
Many thanks, Michael.
coldfusion - IE 7 和 8 中的 cfvideoplayer javascript 错误
我在我的项目中使用带有彩盒效果的 Railo CFVideoPlayer 标签。它在除 IE(版本 7 和 8)之外的所有浏览器中都可以正常工作。IE 9 很好。我在 /railo-context/swfobject.js.cfm 中低于 JS 错误行# 11 并且我只得到加载符号。
消息:'null' 为空或不是对象行:11 字符:3894 代码:0 URI:http://Mysite/railo-context/swfobject.js.cfm
tomcat - 如何将 /var/www 声明为 Tomcat 和 Railo ROOT?
我想让 Apache/var/www
成为我 railo CMS 的根?我将 railo.war 放入/var/lib/tomcat6/webapps
并将以下内容放入我的/etc/tomcat6/server.xml
:
现在,当我将 index.cfm 放入 /var/www 并转到时,http://localhost
我收到以下错误
所以很明显Railo 不接受.cfm
s 在 webapps 文件夹之外?
非常感谢您的帮助!
hibernate - Hibernate 无法加载实体错误
我刚开始在一个新项目中使用 Hibernate,在我的第一个实体中,我遇到了一个错误,我似乎无法弄清楚。
我现在的架构只有两个表,大陆和国家,其中国家有一个大陆外键。
当我尝试运行调用大陆实体的代码时,我得到一个空白页。所有处理都会停止,但不会显示错误。当我通过 MXUnit 运行代码时,我实际上得到了一个错误。错误信息很简单Could Not Load an Entity: [continent#1]
。异常的原因是org.hibernate.exception.SQLGrammarException
。这就是我得到的全部。
我的实际实体代码是:
大陆.cfc
国家.cfc
以及调用该方法的代码。它在一个 ColdSpring bean 中
大陆豆.cfc
我找不到任何关于我能理解的错误消息的真正信息,所以这可能只是一个无效的语法。
regex - 如何在“http://”之前删除此 URL 的所有内容?
我正在使用 ColdFusion 进行一些网络抓取,并且大多数情况下一切正常。我得到的唯一其他问题是某些 URL 后面带有文本,现在导致错误。
不知道是什么原因造成的,但它可能是我的正则表达式。无论如何,文本出现在“http://”之前有一种独特的模式。我想简单地删除它之前的所有内容。
你有什么可以帮忙的机会吗?
以这个字符串为例:
我非常感谢您的帮助,因为正则表达式不是我设法腾出时间的东西 - 希望有一天我会!
谢谢。
编辑:
你好,
我认为发布我的整个函数可能会有所帮助,因为它可能是我最初的 REGEX 导致了这个问题。基本上,该函数接受一个参数。在这种情况下,它是 HTML 文件的内容(通过 CFHTTP)。
在某些情况下,每个 URL 看起来都可以正常工作。例如,如果我尝试 digg.com,它可以工作......但它会在 youtube.com 之类的东西上死掉。我想这将取决于他们特定的 HTML 格式。无论哪种方式,我所需要的只是图像标签上 SRC 属性的值。
这是我到目前为止所拥有的:
此功能有效。但是,在某些网站上,并非如此。它看起来有点过头,但其中大部分只是确保我获得有效图像路径的某些保护措施。
希望你能帮忙。
再次感谢。迈克尔