7

我在带有 Java 1.7 的 Mac OS X 10.8 上的带有 Jetty 8 的 Railo 4.0.2.002 Express 中运行旧版 CF Fusebox 5.5 应用程序。我也在使用码头 urlrewrite http://tukey.org/urlrewrite/(如果相关的话)

为什么FORM提交表单时范围总是空白?但如果我使用URL范围,它工作正常。

该应用程序在所有其他版本的 CF 中运行良好,在这里也应该运行良好。

更新1:
另外,当我在onRequestStart里面做Application.cfc并且我转储FORM范围时,它在那里也是空的。

有人有这个问题吗?我认为它不一定是“保险丝盒”,所以我想知道这是否是 Railo 4 兼容性问题?

更新 2:
当表单发布到 /admin/index.cfm?event=Main.Login
时,表单范围工作正常。但是当它发布到 /admin/event/Main.Login 时,表单范围就消失了。

<?xml version="1.0" encoding="utf-8"?>

 <!DOCTYPE urlrewrite
     PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
     "http://tuckey.org/res/dtds/urlrewrite3.0.dtd">

<urlrewrite>
    <rule>
        <from>^/admin/event/(.*)</from>
          <to last="false">/admin/index.cfm?event=$1</to>
    </rule>
  <rule>
      <from>^/lms/event/(.*)</from>
      <to last="false">/lms/index.cfm?event=$1</to>
  </rule>
</urlrewrite>

更新 3:
还应注意,查尔斯(代理)正在正确检测“POST”请求,其中包含正确发送到服务器的电子邮件/密码和其他表单元素。
Jetty 服务器根本看不到它们,或者没有正确地将它们转发到 Railo 引擎或其他什么?

更新 4:
这是他们告诉您放置在web.xml. 我实际上把它放在了 Railo Express 的webdefault.xmlinetc/目录中,我猜它可能只是 Jetty 文件。

<filter>
    <filter-name>UrlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>UrlRewriteFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>
4

1 回答 1

0

I had a number of issues with Tuckey and ended up using Apache and modrewrite for features that Tuckey just didn't support. That being said Railo + Tomcat/Jetty is not ColdFusion with Jrun and the configuration was challenging to ensure that mod_rewrite had all the request information and even had the request at all. Even Adobe had to patch CF10 after release because they were missing original functionality from CF9-+JRUN connectors.

However, for your solution, you need to reach up and out. See the thread here.

https://groups.google.com/forum/#!msg/railo/uw-U9hCFu5k/bEmr_I2Kl8sJ

Other people have the same problem, and have worked around it by placing this in onRequestStart:

<cfscript>
    if(gethTTPRequestData().method eq "POST") {
            if(NOT structKeyExists(form,"fieldnames")) {
                    var paramMap = getPageContext().getRequest().getParameterMap();
                    var paramMapKeys = structKeyList(paramMap);
                    form.fieldnames = paramMapKeys;
                    for(x =1; x lte listLen(paramMapKeys); x++) {
                            param = listGetAt(paramMapKeys,x);
                            form[param] = paramMap[param][1];
                    }
            }
    }
</cfscript>

It's not clear if this is a bug in Jetty, Railo, or Tuckey.

于 2012-12-19T17:48:07.150 回答